private ToPropertyPageInfoArray ( ) : Microsoft.ManagementConsole.Internal.PropertyPageInfo[] | ||
return | Microsoft.ManagementConsole.Internal.PropertyPageInfo[] |
internal override void ProcessRequest(Request request) { if (request.RequestInfo is ExtensionPagesRequestInfo) { ExtensionPagesRequestInfo requestInfo = request.RequestInfo as ExtensionPagesRequestInfo; PropertyPageCollection propertyPageCollection = new PropertyPageCollection(); IRequestStatus requestStatus = request.RequestStatus; SyncStatus status2 = new SyncStatus(requestStatus); try { this.OnAddPropertyPages(propertyPageCollection); PropertyPagesResponse response = new PropertyPagesResponse(); response.SetPropertyPages(propertyPageCollection.ToPropertyPageInfoArray()); requestStatus.ProcessResponse(response); } finally { status2.Close(); } this._extensionPropertySheet = SnapInBase.SnapInInstance.SheetManager.CreatePropertySheet(requestInfo.SheetId, propertyPageCollection, null); } else { base.ProcessRequest(request); } }
public bool ShowPropertySheet(string title, bool hideApplyButton) { this.ThrowIfViewShutdown("ShowPropertySheet"); if (!this._view.Initialized || !this._view.Visible) { TraceSources.ExecutiveSource.TraceEvent(TraceEventType.Warning, 12, "Ignoring property sheet request since view hasn't been initialized or is hidden."); return true; } if (title == null) { throw new ArgumentNullException("title"); } if (this._selectionObject == null) { throw new InvalidOperationException(Microsoft.ManagementConsole.Internal.Utility.LoadResourceString(Microsoft.ManagementConsole.Internal.Strings.SelectionDataObjectNull)); } int num = SnapInBase.SnapInInstance.SheetManager.FindPropertySheet(this._selectionObject); if (num != -1) { FindPropertySheetForViewCommand command = new FindPropertySheetForViewCommand(); command.SelectionId = num; FindPropertySheetCommandResult result = (FindPropertySheetCommandResult) SnapInBase.SnapInInstance.SnapInPlatform.ProcessCommand(command); if ((result != null) && result.SheetExists) { return false; } } PropertyPageCollection propertyPageCollection = new PropertyPageCollection(); this._view.OnAddPropertyPages(propertyPageCollection); CreatePropertySheetForViewCommand command2 = new CreatePropertySheetForViewCommand(); command2.Title = title; command2.HideApplyButton = hideApplyButton; command2.ViewId = this._view.ViewInstanceId; command2.PropertyPagesData = propertyPageCollection.ToPropertyPageInfoArray(); CreatePropertySheetCommandResult result2 = (CreatePropertySheetCommandResult) SnapInBase.SnapInInstance.SnapInPlatform.ProcessCommand(command2); if ((result2 != null) && (result2.SheetId != -1)) { SnapInBase.SnapInInstance.SheetManager.CreatePropertySheet(result2.SheetId, propertyPageCollection, new AuxiliarySelectionData(this)); } return true; }
internal void GetPropertyPages(int sheetId, IRequestStatus requestStatus) { if (requestStatus == null) { throw new ArgumentNullException("requestStatus", Microsoft.ManagementConsole.Internal.Utility.LoadResourceString(Microsoft.ManagementConsole.Internal.Strings.ScopeNodeRequestInterfaceNull)); } PropertyPageCollection propertyPageCollection = new PropertyPageCollection(); SyncStatus status = new SyncStatus(requestStatus); try { this.OnAddPropertyPages(propertyPageCollection); PropertyPagesResponse response = new PropertyPagesResponse(); response.SetPropertyPages(propertyPageCollection.ToPropertyPageInfoArray()); requestStatus.ProcessResponse(response); } finally { status.Close(); } SnapInBase.SnapInInstance.SheetManager.CreatePropertySheet(sheetId, propertyPageCollection, null); }
public bool ShowPropertySheet(string title, bool hideApplyButton) { if (title == null) { throw new ArgumentNullException("title"); } FindPropertySheetForScopeNodeCommand command = new FindPropertySheetForScopeNodeCommand(); command.ScopeNodeId = base.Id; FindPropertySheetCommandResult result = (FindPropertySheetCommandResult) SnapInBase.SnapInInstance.SnapInPlatform.ProcessCommand(command); if ((result != null) && result.SheetExists) { return false; } PropertyPageCollection propertyPageCollection = new PropertyPageCollection(); this.OnAddPropertyPages(propertyPageCollection); CreatePropertySheetForScopeNodeCommand command2 = new CreatePropertySheetForScopeNodeCommand(); command2.Title = title; command2.ScopeNodeId = base.Id; command2.HideApplyButton = hideApplyButton; command2.PropertyPagesData = propertyPageCollection.ToPropertyPageInfoArray(); CreatePropertySheetCommandResult result2 = (CreatePropertySheetCommandResult) SnapInBase.SnapInInstance.SnapInPlatform.ProcessCommand(command2); if ((result2 != null) && (result2.SheetId != -1)) { SnapInBase.SnapInInstance.SheetManager.CreatePropertySheet(result2.SheetId, propertyPageCollection, null); } return true; }
internal void GetPropertyPages(int sheetId, long selectionId, IRequestStatus requestStatus) { if (requestStatus == null) { throw new ArgumentNullException("requestStatus"); } PropertyPageCollection propertyPageCollection = new PropertyPageCollection(); SyncStatus status = new SyncStatus(requestStatus); try { if ((this.SelectionData.SelectionCardinality == SelectionCardinality.None) || (selectionId != this.SelectionData.Id)) { TraceSources.ExecutiveSource.TraceEvent(TraceEventType.Warning, 12, "Request for pages for sheet {0} in view {1} selection id {2} ignored since selection has changed.", new object[] { sheetId, this._viewInstanceId, selectionId }); requestStatus.ProcessResponse(new PropertyPagesResponse()); return; } this.OnAddPropertyPages(propertyPageCollection); PropertyPagesResponse response = new PropertyPagesResponse(); response.SetPropertyPages(propertyPageCollection.ToPropertyPageInfoArray()); requestStatus.ProcessResponse(response); } finally { status.Close(); } SnapInBase.SnapInInstance.SheetManager.CreatePropertySheet(sheetId, propertyPageCollection, new AuxiliarySelectionData(this.SelectionData)); }