private void PropertiesButton_Click(object sender, EventArgs e) { ExchangePropertyPageControl exchangePropertyPageControl = (ExchangePropertyPageControl)Activator.CreateInstance(this.CurrentFeature.PropertyPageControl); exchangePropertyPageControl.Context = new DataContext(AutomatedNestedDataHandler.CreateDataHandlerWithParentSchema(this.ParentPage.Context)); this.ParentPage.ShowDialog(exchangePropertyPageControl); }
private void PropertySheetDialog_Load(object sender, EventArgs e) { ExchangePropertyPageControl exchangePropertyPageControl = (ExchangePropertyPageControl)this.tabControl.SelectedTab.Tag; if (!this.maxPageSize.IsEmpty) { Size clientSize = exchangePropertyPageControl.ClientSize; Size sz = clientSize - this.maxPageSize; base.ClientSize -= sz; } this.SetActivePage(exchangePropertyPageControl); }
protected void RegisterPropertyPage(ExchangePropertyPageControl ctrl) { if (ctrl != null) { ctrl.TabIndex = 0; base.Controls.Add(ctrl); base.Controls.SetChildIndex(ctrl, 0); ctrl.IsDirtyChanged += this.page_IsDirtyChanged; base.Name += ctrl.Name; this.Text = ctrl.Text; ctrl.SetActived += this.page_SetActived; ctrl.OnSetActive(); this.control = ctrl; } }
protected override void OnExecute() { base.OnExecute(); ExchangePropertyPageControl exchangePropertyPageControl = this.CreateDialogControl(); DataContext context = exchangePropertyPageControl.Context; if (context != null) { context.DataSaved += delegate(object param0, EventArgs param1) { this.RefreshResultsThreadSafely(context); }; context.RefreshOnSave = (context.RefreshOnSave ?? base.GetDefaultRefreshObject()); } base.ResultPane.ShowDialog(exchangePropertyPageControl); }
public static ExchangePropertyPageControl WrapUserControlAsPage(BindableUserControl control) { ExchangePropertyPageControl exchangePropertyPageControl = new ExchangePropertyPageControl(); exchangePropertyPageControl.SuspendLayout(); control.Dock = DockStyle.Fill; exchangePropertyPageControl.Padding = new Padding(13, 12, 0, 12); exchangePropertyPageControl.Controls.Add(control); exchangePropertyPageControl.Text = control.Text; exchangePropertyPageControl.AutoSize = true; exchangePropertyPageControl.AutoSizeMode = AutoSizeMode.GrowAndShrink; exchangePropertyPageControl.AutoScaleDimensions = ExchangeUserControl.DefaultAutoScaleDimension; exchangePropertyPageControl.AutoScaleMode = AutoScaleMode.Font; exchangePropertyPageControl.ResumeLayout(false); exchangePropertyPageControl.PerformLayout(); exchangePropertyPageControl.HelpTopic = control.GetType().FullName; return(exchangePropertyPageControl); }
protected bool PromptToModifyRecipientScope(IUIService uiService, ExchangePropertyPageControl scopeControl) { if (scopeControl == null) { throw new ArgumentNullException("scopeControl"); } using (PropertyPageDialog propertyPageDialog = new PropertyPageDialog(scopeControl)) { ScopeSettings scopeSettings = new ScopeSettings(); scopeSettings.CopyFrom(this.ScopeSettings); scopeControl.Context = new DataContext(new ExchangeDataHandler()); scopeControl.Context.DataHandler.DataSource = scopeSettings; if (uiService.ShowDialog(propertyPageDialog) == DialogResult.OK && scopeSettings.ObjectState == ObjectState.Changed) { this.ScopeSettings.CopyChangesFrom(scopeSettings); this.UpdateText(); return(true); } } return(false); }
public PropertyPageDialog(ExchangePropertyPageControl propertyPage) : this() { this.RegisterPropertyPage(propertyPage); }
public static PropertyPageDialog WrapPageAsDialog(ExchangePropertyPageControl page) { return(new PropertyPageDialog(page)); }
public DialogResult ShowDialog(ExchangePropertyPageControl propertyPage) { return(this.ShowDialog(ExchangeUserControl.WrapPageAsDialog(propertyPage))); }