Example #1
0
        void ProgressControllerWorkEnded(object sender, ProgressController.ProgressControllerEventArgs e)
        {
            ProgressController controller = sender as ProgressController;

            if (!m_progress_controllers.Contains(controller))
            {
                throw new Exception("A ProgressController was not added to the progress controller list");
            }

            // work is completed, remove the event callbacks and reenable the control
            controller.WorkEnded   -= new EventHandler <ProgressController.ProgressControllerEventArgs>(ProgressControllerWorkEnded);
            controller.WorkStarted -= new EventHandler <ProgressController.ProgressControllerEventArgs>(ProgressControllerWorkStarted);

            m_progress_controllers.Remove(controller);

            // enable the control as the work has been completed
            MapCompressorToolTip.Active = false;
            this.Enabled = true;
        }
Example #2
0
 void ProgressControllerWorkStarted(object sender, ProgressController.ProgressControllerEventArgs e)
 {
     // disable the control as work is in progress
     MapCompressorToolTip.Active = true;
     this.Enabled = false;
 }