Пример #1
0
        /// <summary>
        /// Removes the closed form from the collection of active forms.
        /// </summary>
        private void Form_Closed(object source, EventArgs e)
        {
            IView winFormView = (IView)source;

            //Get the views related to the current task
            Hashtable taskActiveViews = (Hashtable)_activeViews[winFormView.TaskId];
            Hashtable taskActiveForms = (Hashtable)_activeForms[winFormView.TaskId];

            //Get the view related to the form that fires this event
            string currentView = (string)taskActiveViews[source];

            //Remove the view and its form
            if (currentView != null)
            {
                CleanUpChildWindows((WindowsFormView)source);
                taskActiveForms.Remove(currentView);
                if (taskActiveForms.Count == 0)
                {
                    _activeForms.Remove(winFormView.TaskId);
                    CleanUpControls(winFormView.TaskId);
                }

                taskActiveViews.Remove(source);
                if (taskActiveViews.Count == 0)
                {
                    _activeViews.Remove(winFormView.TaskId);
                }
            }

            if (GetActiveViewCount() == 0)
            {
                UIPManager.OnCompletion();
            }
        }
Пример #2
0
 private void WizardContainer_Closed(object sender, EventArgs e)
 {
     UIPManager.OnCompletion();
 }