private void ApplyOptionsOnPage(ExchangePropertyPageControl[] pages, bool bulkEditing)
 {
     if (pages != null && pages.Length > 0)
     {
         ArrayList        arrayList        = new ArrayList();
         DataContextFlags dataContextFlags = new DataContextFlags();
         dataContextFlags.SelectedObjectsCount      = base.ResultPane.SelectedObjects.Count;
         dataContextFlags.SelectedObjectDetailsType = base.ResultPane.SelectedObjectDetailsType;
         for (int i = 0; i < pages.Length; i++)
         {
             DataContext context = pages[i].Context;
             if (context != null && !arrayList.Contains(context))
             {
                 arrayList.Add(context);
                 dataContextFlags.Pages.Add(pages[i]);
                 context.DataSaved += delegate(object param0, EventArgs param1)
                 {
                     this.RefreshResultsThreadSafely(context);
                 };
                 if (context.RefreshOnSave == null)
                 {
                     context.RefreshOnSave = base.GetDefaultRefreshObject();
                 }
             }
         }
         AutomatedDataHandler automatedDataHandler = pages[0].DataHandler as AutomatedDataHandler;
         if (automatedDataHandler != null)
         {
             automatedDataHandler.ReaderExecutionContextFactory = new MonadCommandExecutionContextForPropertyPageFactory();
             automatedDataHandler.SaverExecutionContextFactory  = new MonadCommandExecutionContextForPropertyPageFactory();
         }
     }
 }
Exemple #2
0
 protected override void VerifyCorruptedObject()
 {
     if (base.Context.IsDataSourceCorrupted)
     {
         if (DialogResult.OK == base.ShowMessage(this.CreateErrorMessageForCorruptedObject(), MessageBoxButtons.OKCancel))
         {
             base.Context.OverrideCorruptedValuesWithDefault();
             if (base.Context.IsDirty)
             {
                 AutomatedDataHandler automatedDataHandler = base.DataHandler as AutomatedDataHandler;
                 if (automatedDataHandler != null)
                 {
                     automatedDataHandler.RefreshDataObjectStore();
                 }
                 base.ForceIsDirty(true);
                 return;
             }
         }
         else
         {
             base.DisableRelatedPages(false);
         }
     }
 }
Exemple #3
0
        public bool HasPermission()
        {
            AutomatedDataHandler automatedDataHandler = base.DataHandler as AutomatedDataHandler;

            return(automatedDataHandler == null || automatedDataHandler.HasViewPermissionForPage(base.Name));
        }