Пример #1
0
 /// <summary>
 /// Handle closing of the progress window.
 /// </summary>
 /// <param name="sender">Event sender.</param>
 /// <param name="e">Event arguments.</param>
 private void progressWindow_Closed(object sender, EventArgs e)
 {
     this.progressWindow = null;
 }
Пример #2
0
        /// <summary>
        /// Show the progress window with the given progress value.
        /// </summary>
        /// <param name="progressText">Progress text to display.</param>
        /// <param name="progressValue">Progress value from 0 to 100 percent.</param>
        private void ShowProgress(string progressText, double progressValue)
        {
            if ( this.progressWindow == null )
            {
                // Create a new progress window.
                this.progressWindow = new ProgressWindow();
                this.progressWindow.Owner = this.owner;
                this.progressWindow.Cancel += new CancelEventHandler(this.progressWindow_Cancel);
                this.progressWindow.Closed += new System.EventHandler(this.progressWindow_Closed);
                this.progressWindow.Title = "Import Shapefile";
            }

            // Show the progress window with new progress text and value.
            this.progressWindow.ProgressText = progressText;
            this.progressWindow.ProgressValue = progressValue;
            this.progressWindow.Show();
        }