Example #1
0
 private static void AddToOpenForms(ExchangeForm form)
 {
     if (!ExchangeForm.OpenForms.Contains(form))
     {
         ExchangeForm.OpenForms.Add(form);
     }
 }
Example #2
0
 private static void RemoveFromOpenForms(ExchangeForm form)
 {
     if (ExchangeForm.OpenForms.Contains(form))
     {
         ExchangeForm.OpenForms.Remove(form);
     }
 }
 void IExchangeFormOwner.OnExchangeFormLoad(ExchangeForm form)
 {
     if (form != null)
     {
         this.childrenFormsList.Add(form);
     }
 }
Example #4
0
        internal static bool ActivateSingleInstanceForm(string formName)
        {
            ExchangeForm openForm = ExchangeForm.GetOpenForm(formName);

            if (openForm != null)
            {
                openForm.Activate();
            }
            return(openForm != null);
        }
Example #5
0
 protected override void OnShown(EventArgs e)
 {
     base.OnShown(e);
     if (ExchangeForm.Test_FormShown != null)
     {
         ExchangeForm.Test_FormShown(this, EventArgs.Empty);
     }
     if (ManagementGuiSqmSession.Instance.Enabled)
     {
         ManagementGuiSqmSession.Instance.AddToStreamDataPoint(SqmDataID.DATAID_EMC_GUI_ACTION, new object[]
         {
             3U,
             base.GetType().Name
         });
     }
 }
        void IExchangeFormOwner.OnExchangeFormClosed(ExchangeForm formToClose)
        {
            WizardForm wizardForm = formToClose as WizardForm;

            if (wizardForm != null && wizardForm.WizardPages.Count > 0 && this.ListControl != null)
            {
                WizardPage wizardPage = wizardForm.WizardPages[wizardForm.WizardPages.Count - 1];
                if (wizardPage != null && wizardPage.Context != null && wizardPage.Context.DataHandler != null && wizardPage.Context.DataHandler.SavedResults != null && wizardPage.Context.DataHandler.SavedResults.Count == 1)
                {
                    this.ListControl.SelectItemBySpecifiedIdentity(this.GetIdentityFromObject(wizardPage.Context.DataHandler.SavedResults[0]), false);
                }
            }
            if (formToClose != null)
            {
                this.childrenFormsList.Remove(formToClose);
            }
        }
        private void ShowPropertySheetDailog(string propertySheetName, string dialogNamePrefix, bool bulkEditing)
        {
            SelectedObjects selectedComponents = new SelectedObjects(base.ResultPane.SelectedObjects);
            Guid            value = Guid.Empty;

            if (this.SelectedObjectsDictionary.ContainsKey(selectedComponents))
            {
                value = this.SelectedObjectsDictionary[selectedComponents];
            }
            else
            {
                value = Guid.NewGuid();
                this.SelectedObjectsDictionary[selectedComponents] = value;
            }
            string text = dialogNamePrefix + value.ToString();

            if (!ExchangeForm.ActivateSingleInstanceForm(text))
            {
                ExchangePropertyPageControl[] array = bulkEditing ? this.OnGetBulkSelectionPropertyPageControls() : this.OnGetSingleSelectionPropertyPageControls();
                if (!bulkEditing)
                {
                    List <ExchangePropertyPageControl> list = new List <ExchangePropertyPageControl>();
                    foreach (ExchangePropertyPageControl exchangePropertyPageControl in array)
                    {
                        if (exchangePropertyPageControl.HasPermission())
                        {
                            list.Add(exchangePropertyPageControl);
                        }
                    }
                    array = list.ToArray();
                }
                this.ApplyOptionsOnPage(array, bulkEditing);
                PropertySheetDialog propertySheetDialog = new PropertySheetDialog(propertySheetName, array);
                propertySheetDialog.Name      = text;
                propertySheetDialog.HelpTopic = base.ResultPane.SelectionHelpTopic + "Property";
                propertySheetDialog.Closed   += delegate(object param0, EventArgs param1)
                {
                    if (this.SelectedObjectsDictionary.ContainsKey(selectedComponents))
                    {
                        this.SelectedObjectsDictionary.Remove(selectedComponents);
                    }
                };
                propertySheetDialog.ShowModeless(base.ResultPane, null);
            }
        }
        protected override void OnExecute()
        {
            base.OnExecute();
            string sharedFormName = this.GetSharedFormName();

            if (!string.IsNullOrEmpty(sharedFormName))
            {
                if (!ExchangeForm.ActivateSingleInstanceForm(sharedFormName))
                {
                    this.ShowWizardForm(this.InternalCreateWizardForm(), sharedFormName);
                    return;
                }
            }
            else
            {
                this.ShowWizardForm(this.InternalCreateWizardForm());
            }
        }
Example #9
0
 protected override void OnHandleDestroyed(EventArgs e)
 {
     ExchangeForm.RemoveFromOpenForms(this);
     base.OnHandleDestroyed(e);
 }
Example #10
0
 protected override void OnHandleCreated(EventArgs e)
 {
     ExchangeForm.AddToOpenForms(this);
     base.OnHandleCreated(e);
 }