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);
        }
Ejemplo n.º 2
0
		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);
		}
Ejemplo n.º 3
0
 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;
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 7
0
 public PropertyPageDialog(ExchangePropertyPageControl propertyPage) : this()
 {
     this.RegisterPropertyPage(propertyPage);
 }
Ejemplo n.º 8
0
 public static PropertyPageDialog WrapPageAsDialog(ExchangePropertyPageControl page)
 {
     return(new PropertyPageDialog(page));
 }
Ejemplo n.º 9
0
 public DialogResult ShowDialog(ExchangePropertyPageControl propertyPage)
 {
     return(this.ShowDialog(ExchangeUserControl.WrapPageAsDialog(propertyPage)));
 }