Example #1
0
        public SpatialTableFinder()
        {
            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.
            SpatialTableFinderViewModel _spatialtablefinderViewModel = (SpatialTableFinderViewModel)base.DataContext;
        }
Example #2
0
        private void DgForResults2_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                var itm = dgForResults2.SelectedItem;

                DataRowView drv = itm as DataRowView;
                SpatialTableFinderViewModel vm = FrameworkApplication.DockPaneManager.Find("QProSapAddIn_SpatialTableFinder") as SpatialTableFinderViewModel;
                vm.SelRow        = drv;
                vm.CurrentSchema = drv["OWNER"].ToString();
                vm.CurrentTable  = drv["TABLE_NAME"].ToString();
            }
            catch { }
        }
Example #3
0
 public async Task GetSpatTabsCb()
 {
     try
     {
         await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
         {
             bool dpexists = FrameworkApplication.DockPaneManager.IsDockPaneCreated("QProSapAddIn_SpatialTableFinder");
             if (dpexists)
             {
                 SpatialTableFinderViewModel vm = FrameworkApplication.DockPaneManager.Find("QProSapAddIn_SpatialTableFinder") as SpatialTableFinderViewModel;
                 Task r = vm.GetSpatTabsCallback();
             }
         });
     }
     catch (Exception ex)
     { MessageBox.Show("Error  :  " + ex.Message.ToString() + " "); }
 }
Example #4
0
 public async Task AddToMapCb2()
 {
     try
     {
         await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
         {
             bool dpexists = FrameworkApplication.DockPaneManager.IsDockPaneCreated("QProSapAddIn_SpatialTableFinder");
             if (dpexists)
             {
                 var cpd = new CancelableProgressorSource();
                 SpatialTableFinderViewModel vm = FrameworkApplication.DockPaneManager.Find("QProSapAddIn_SpatialTableFinder") as SpatialTableFinderViewModel;
                 Task r = vm.AddToMapCallback2(cpd);
             }
         });
     }
     catch (Exception ex)
     { MessageBox.Show("Error  :  " + ex.Message.ToString() + " "); }
 }
 protected override void OnClick()
 {
     SpatialTableFinderViewModel.Show();
 }