Exemplo n.º 1
0
 internal PropertySheet CreatePropertySheet(int sheetId, PropertyPageCollection pageCollection, AuxiliarySelectionData auxiliarySelectionData)
 {
     if (pageCollection == null)
     {
         throw new ArgumentNullException("pageCollection");
     }
     PropertySheet sheet = new PropertySheet(this, sheetId, auxiliarySelectionData);
     sheet.AddPropertyPages(pageCollection);
     this.AddPropertySheet(sheet);
     return sheet;
 }
Exemplo n.º 2
0
 private void HandleKeepAliveRequest(int selectionId, bool keepAlive, KeepAlivePurpose purpose, IRequestStatus requestStatus)
 {
     AuxiliarySelectionDataCollection clipboardSelectionDatas = null;
     SyncStatus status = new SyncStatus(requestStatus);
     try
     {
         if (purpose == KeepAlivePurpose.Clipboard)
         {
             clipboardSelectionDatas = this.ClipboardSelectionDatas;
         }
         else if (purpose == KeepAlivePurpose.RunningTask)
         {
             clipboardSelectionDatas = this._snapIn.RunningTaskSelectionDatas;
         }
         if (clipboardSelectionDatas != null)
         {
             if (keepAlive)
             {
                 if (this.SelectionData.Id == selectionId)
                 {
                     clipboardSelectionDatas[selectionId] = new AuxiliarySelectionData(this.SelectionData);
                 }
                 else
                 {
                     TraceSources.ExecutiveSource.TraceEvent(TraceEventType.Warning, 12, "Request Keep Alive {0} in view {1} selection id {2} ignored since selection has changed.", new object[] { keepAlive, this._viewInstanceId, selectionId });
                 }
             }
             else
             {
                 clipboardSelectionDatas.Remove(selectionId);
             }
         }
     }
     finally
     {
         status.Close();
     }
 }