Example #1
1
 protected override async void OnClick()
 {   //If you run this in the DEBUGGER you will NOT see the dialog
     uint maxSteps = 10;
     var  pd       = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog(
         "Doing my thing - cancelable", "Canceled", maxSteps, false);
     await
     ProgressDialogModule.RunCancelableProgress(
         new CancelableProgressorSource(pd), maxSteps);
 }
 protected override async void OnClick()
 {   //If you run this in the DEBUGGER you will NOT see the dialog
     uint maxSteps = 10;
     var pd = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog(
         "Doing my thing - cancelable", "Canceled", maxSteps, false);
     await
         ProgressDialogModule.RunCancelableProgress(
             new CancelableProgressorSource(pd), maxSteps);
 }
Example #3
0
 private static Task DoSomeWork(ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog progDialog)
 {
     return(QueuedTask.Run(async() =>
     {
         for (uint iSeconds = 0; iSeconds < 10; iSeconds++)
         {
             await Task.Delay(1000);
         }
         progDialog.Hide();
     }));
 }
        protected override async void OnClick()
        {
            // If you run this in the DEBUGGER you will NOT see the dialog progressor
            var pd = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog("Toggle switches - cancelable", "Canceled", 6, false);

            string returnedValue = await ToggleSwitchesModule.RunCancelableToggleSwwitches(new CancelableProgressorSource(pd), MapView.Active.Extent);

            if (!String.IsNullOrEmpty(returnedValue))
            {
                ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(returnedValue);
            }
        }
        /// <summary>
        /// Create a  diagram based on the Enclosure Diagram template from the current selection set and apply the EnclosureLayout custom telco layout to its content
        /// </summary>
        protected override async void OnClick()
        {
            if (MapView.Active == null || MapView.Active.Map == null)
            {
                return;
            }

            // If you run this in the DEBUGGER you will NOT see the dialog progressor
            var pd = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog("Generate Enclosure Diagram - Cancelable", "Canceled", 6, false);

            string returnedValue = await RunCancelableEnclosure(new CancelableProgressorSource(pd));

            if (!string.IsNullOrEmpty(returnedValue))
            {
                ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(returnedValue);
            }
        }
Example #6
0
        /// <summary>
        /// Generates File List and Attempts To Load it
        /// </summary>
        private async void LoadFiles()
        {
            if (await CheckRequirements())
            {
                await GenerateFileList();

                if (ValidateFileList())
                {
                    var maxCount = Convert.ToUInt32(_fileList.Count());
                    var pd       = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog("Copying Files", "Canceled", maxCount, false);

                    await CloneFiles(new CancelableProgressorSource(pd), maxCount);
                }
                else
                {
                    MessageBox.Show("Current Configuration Could Not Match Any Files in the File Workspace", "Something Went Wrong ...");
                }
            }
        }
 protected override async void OnClick()
 {   //#2 create just a ProgressDialog for manual control
     progDialog = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog ("Manual Dialog with programmatic show and hide");
     progDialog.Show();
     await DoSomeWork(progDialog);
 }
Example #8
0
 protected override async void OnClick()
 {   //#2 create just a ProgressDialog for manual control
     progDialog = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog("Manual Dialog with programmatic show and hide");
     progDialog.Show();
     await DoSomeWork(progDialog);
 }