Пример #1
0
 private SelectionData()
 {
     this._id = -1;
     this._uniqueNodeTypes = new Guid[0];
     this._sharedData = new WritableSharedData();
     this._description = string.Empty;
     this._actionsPaneItems = new ActionsPaneItemCollection();
     this._actionsPaneHelpItems = new ActionsPaneItemCollection();
     this._pasteTargetInfo = new PasteTargetInfo();
 }
Пример #2
0
 internal SelectionData(View view)
 {
     this._id = -1;
     this._uniqueNodeTypes = new Guid[0];
     this._sharedData = new WritableSharedData();
     this._description = string.Empty;
     this._actionsPaneItems = new ActionsPaneItemCollection();
     this._actionsPaneHelpItems = new ActionsPaneItemCollection();
     this._pasteTargetInfo = new PasteTargetInfo();
     if (view == null)
     {
         throw new ArgumentNullException("view");
     }
     this._view = view;
     this._sharedData.Changed += new WritableSharedDataItem.SharedDataChangedEventHandler(this.OnSharedDataChanged);
     this._actionsPaneItems.Changed += new ActionsPaneItemCollection.ActionsPaneItemCollectionEventHandler(this.OnActionsPaneItemsChanged);
     this._actionsPaneHelpItems.Changed += new ActionsPaneItemCollection.ActionsPaneItemCollectionEventHandler(this.OnActionsPaneHelpItemsChanged);
 }
Пример #3
0
 internal void OnPasteTargetInfoChanged(PasteTargetInfo selectionPasteInfo)
 {
     ISnapInPlatform snapInPlatform = this.SnapIn.SnapInPlatform;
     if (snapInPlatform == null)
     {
         throw Microsoft.ManagementConsole.Internal.Utility.CreateClassNotInitializedException("SnapIn", "OnPasteTargetInfoChanged");
     }
     UpdateViewPasteTargetInfoCommand command = new UpdateViewPasteTargetInfoCommand();
     command.ViewInstanceId = this.ViewInstanceId;
     command.PasteTargetInfo = selectionPasteInfo;
     snapInPlatform.ProcessCommand(command);
 }
 private void ReadNextPasteTargetInfo(PasteTargetInfo obj)
 {
     obj.DefaultDragAndDropVerb = (DragAndDropVerb) this._source.Get_NodeData_PasteTargetInfo_DefaultDragAndDropVerb()[this._currentIndex];
     int num = this._source.Get_NodeData_PasteTargetInfo_AllowedClipboardFormats_Count()[this._currentIndex];
     string[] allowedClipboardFormats = null;
     if (num >= 0)
     {
         allowedClipboardFormats = new string[num];
     }
     int index = 0;
     for (index = 0; index < num; index++)
     {
         allowedClipboardFormats[index] = this._strings.ReadString();
         this._NodeData_PasteTargetInfo_AllowedClipboardFormats_Offset++;
     }
     obj.SetAllowedClipboardFormats(allowedClipboardFormats);
 }
 private void WriteNextPasteTargetInfo(PasteTargetInfo obj)
 {
     this._NodeData_PasteTargetInfo_DefaultDragAndDropVerb[this._currentIndex] = (int) obj.DefaultDragAndDropVerb;
     string[] allowedClipboardFormats = obj.GetAllowedClipboardFormats();
     int length = -1;
     if (allowedClipboardFormats != null)
     {
         length = allowedClipboardFormats.Length;
         int index = 0;
         for (index = 0; index < length; index++)
         {
             this.WriteString(allowedClipboardFormats[index]);
         }
     }
     this._NodeData_PasteTargetInfo_AllowedClipboardFormats_Count[this._currentIndex] = length;
 }