Ejemplo n.º 1
0
 internal void ProcessRequestMessage(PropertyPageMessageRequestInfo requestInfo, IRequestStatus requestStatus)
 {
     PropertySheet propertySheet = this.GetPropertySheet(requestInfo.SheetId);
     SyncStatus status = new SyncStatus(requestStatus);
     try
     {
         requestStatus.ProcessResponse(propertySheet.ProcessRequestMessage(requestInfo));
     }
     finally
     {
         status.Close();
     }
 }
Ejemplo n.º 2
0
 internal PropertyPageMessageResponse ProcessRequestMessage(PropertyPageMessageRequestInfo requestInfo)
 {
     PropertyPage propertyPage = this.GetPropertyPage(requestInfo.PageId);
     this._inRequestOperation = true;
     PropertyPageMessageResponse response = new PropertyPageMessageResponse();
     response.AllowRequestedOperation = false;
     if (requestInfo is ApplyPropertyPageMessageRequestInfo)
     {
         if (propertyPage.OnApply())
         {
             propertyPage.ClearDirtyFlag();
             response.AllowRequestedOperation = true;
         }
     }
     else if (requestInfo is OkPropertyPageMessageRequestInfo)
     {
         if (propertyPage.OnOK())
         {
             propertyPage.ClearDirtyFlag();
             response.AllowRequestedOperation = true;
         }
     }
     else if (requestInfo is KillActivePropertyPageMessageRequestInfo)
     {
         response.AllowRequestedOperation = propertyPage.OnKillActive();
     }
     else
     {
         if (!(requestInfo is QueryCancelPropertyPageMessageRequestInfo))
         {
             throw new InvalidOperationException(Microsoft.ManagementConsole.Internal.Utility.LoadResourceString(Microsoft.ManagementConsole.Internal.Strings.PropertySheetUnknownMessage));
         }
         response.AllowRequestedOperation = propertyPage.QueryCancel();
     }
     response.NewActivePageId = this._newActivePageId;
     this._inRequestOperation = false;
     this._newActivePageId = -1;
     return response;
 }