ArcGIS Pro SDK 通知框

发布时间:2024年01月19日

样式

代码

using ArcGIS.Core.CIM;
using ArcGIS.Core.Data;
using ArcGIS.Core.Geometry;
using ArcGIS.Desktop.Catalog;
using ArcGIS.Desktop.Core;
using ArcGIS.Desktop.Editing;
using ArcGIS.Desktop.Extensions;
using ArcGIS.Desktop.Framework;
using ArcGIS.Desktop.Framework.Contracts;
using ArcGIS.Desktop.Framework.Dialogs;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Layouts;
using ArcGIS.Desktop.Mapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProAppModule9
{
    internal class Button1 : Button
    {
        protected override void OnClick()
        {

            Notification notification = new Notification();
            try
            {
                if (Project.Current == null)
                    return;
                notification.Title = "提示";
                notification.Message = "XXXXXXXXXXXXXXXX";
                notification.ImageUrl = @"pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericInformation16.png";
                ArcGIS.Desktop.Framework.FrameworkApplication.AddNotification(notification);
            }
            catch (Exception ex)
            {
                ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(ex.Message);
            }
        }
    }
}

文章来源:https://blog.csdn.net/qq_39397927/article/details/135697344
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。