예제 #1
0
        /// <summary>
        /// Adds the specified dialog box view.
        /// </summary>
        /// <param name="view"></param>
        public void AddDialogBoxView(WorkspaceDialogBoxView view)
        {
            // ensure content and any existing dialogs are disabled
            _workspaceContent.Enabled = false;
            CollectionUtils.ForEach(_dialogBoxForms, lb => lb.Enabled = false);

            // position and display the new dialog
            var dialogForm = view.DialogBoxForm;

            dialogForm.CentreInControl(_workspaceContent);

            // show, with the owner as the desktop form
            dialogForm.Show(_owner.DesktopView.DesktopForm);

            // add to list
            _dialogBoxForms.Add(dialogForm);
        }
예제 #2
0
        /// <summary>
        /// Removes the specified dialog box view.
        /// </summary>
        /// <param name="view"></param>
        public void RemoveDialogBoxView(WorkspaceDialogBoxView view)
        {
            // close the dialog and remove it
            var form = view.DialogBoxForm;

            form.Close();
            _dialogBoxForms.Remove(form);

            // re-enable the appropriate thing
            var previousDialogBox = CollectionUtils.LastElement(_dialogBoxForms);

            if (previousDialogBox != null)
            {
                // enable and activate previous dialog box in the list
                previousDialogBox.Enabled = true;
                previousDialogBox.Activate();
            }
            else
            {
                // activate the workspace content
                _workspaceContent.Enabled = true;
                _owner.Activate();
            }
        }
예제 #3
0
 internal void RemoveDialogBoxView(WorkspaceDialogBoxView view)
 {
     _dialogBoxManager.RemoveDialogBoxView(view);
 }
예제 #4
0
 internal void AddDialogBoxView(WorkspaceDialogBoxView view)
 {
     _dialogBoxManager.AddDialogBoxView(view);
 }