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;
     }
 }
Example #4
0
        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);
        }
Example #5
0
        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);
        }
Example #6
0
 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);
 }
Example #8
0
 public static PropertyPageDialog WrapPageAsDialog(ExchangePropertyPageControl page)
 {
     return(new PropertyPageDialog(page));
 }
Example #9
0
 public DialogResult ShowDialog(ExchangePropertyPageControl propertyPage)
 {
     return(this.ShowDialog(ExchangeUserControl.WrapPageAsDialog(propertyPage)));
 }