Ejemplo n.º 1
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);
 }