Ejemplo n.º 1
0
        /// <summary>
        /// Event handler for ProjectClosing event.
        /// </summary>
        /// <param name="args">The ProjectClosing arguments.</param>
        /// <returns></returns>
        private Task OnProjectClosing(ArcGIS.Desktop.Core.Events.ProjectClosingEventArgs args)
        {
            // if already canceled, ignore
            if (args.Cancel)
            {
                return(Task.CompletedTask);
            }

            //var config = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.PerUserRoamingAndLocal);
            //Console.WriteLine(config == null);
            //var targetProjFolder = @"c:\temp";
            //var result = MessageBox.Show($@"Soll das aktuelle Projekt in ein anderes Verzeichnis als          {targetProjFolder} kopiert werden ?", "Projekt sichern", System.Windows.MessageBoxButton.YesNoCancel, System.Windows.MessageBoxImage.Question);
            return(Task.CompletedTask);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Event handler for ProjectClosing event.
        /// </summary>
        /// <param name="args">The ProjectClosing arguments.</param>
        /// <returns></returns>
        private Task OnProjectClosing(ArcGIS.Desktop.Core.Events.ProjectClosingEventArgs args)
        {
            // if already Canceled, ignore
            if (args.Cancel)
            {
                return(Task.CompletedTask);
            }

            // save current changes
            SaveChanges();

            // reset the control
            ClearControlProperties();

            return(Task.CompletedTask);
        }