public DialogResult ShowDialog(string caption, string dialogHelpTopic, ExchangePropertyPageControl[] pages) { foreach (ExchangePropertyPageControl exchangePropertyPageControl in pages) { exchangePropertyPageControl.AutoScaleDimensions = ExchangeUserControl.DefaultAutoScaleDimension; exchangePropertyPageControl.AutoScaleMode = AutoScaleMode.Font; } DialogResult result; using (PropertySheetDialog propertySheetDialog = new PropertySheetDialog(caption, pages)) { propertySheetDialog.HelpTopic = dialogHelpTopic; result = this.ShowDialog(propertySheetDialog); } return(result); }
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); } }