コード例 #1
0
        public TableViewerPanel()
        {
            InitializeComponent();

            //  We have declared the view model instance declaratively in the xaml.
            //  Get the reference to it here, so we can use it in the button click event.
            TableViewerPanelViewModel _tableviewerpanelViewModel = (TableViewerPanelViewModel)base.DataContext;
        }
コード例 #2
0
 public async Task RefreshSchemasCb()
 {
     await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
     {
         bool dpexists = FrameworkApplication.DockPaneManager.IsDockPaneCreated("QProSapAddIn_TableViewerPanel");
         if (dpexists)
         {
             TableViewerPanelViewModel vm = FrameworkApplication.DockPaneManager.Find("QProSapAddIn_TableViewerPanel") as TableViewerPanelViewModel;
             Task r = vm.RefreshSchemasCallback();
         }
     });
 }
コード例 #3
0
 public async Task ExecuteSqlCb()
 {
     try {
         await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
         {
             bool dpexists = FrameworkApplication.DockPaneManager.IsDockPaneCreated("QProSapAddIn_TableViewerPanel");
             if (dpexists)
             {
                 var cpd = new CancelableProgressorSource();
                 TableViewerPanelViewModel vm = FrameworkApplication.DockPaneManager.Find("QProSapAddIn_TableViewerPanel") as TableViewerPanelViewModel;
                 Task r = vm.ExecuteSqlCallback(cpd);
             }
         });
     }
     catch (Exception ex)
     { MessageBox.Show("Error  :  " + ex.Message.ToString() + " "); }
 }
コード例 #4
0
        public async Task AddToTOCCb()
        {
            try {
                await QueuedTask.Run(() =>
                {
                    bool dpexists = FrameworkApplication.DockPaneManager.IsDockPaneCreated("QProSapAddIn_TableViewerPanel");
                    if (dpexists)
                    {
                        TableViewerPanelViewModel vm = FrameworkApplication.DockPaneManager.Find("QProSapAddIn_TableViewerPanel") as TableViewerPanelViewModel;

                        //var pd = new ProgressDialog("Adding data to map.", "Canceled", false);
                        //pd.Show();
                        var cpd = new CancelableProgressorSource();
                        Task r  = vm.AddToTOCCallback(cpd);
                    }
                });
            }
            catch (Exception ex)
            { MessageBox.Show("Error  :  " + ex.Message.ToString() + " "); }
        }