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());
            }
        }