Example #1
0
 private void Notify(int index, ResultNode[] items, ResultNodeCollectionChangeType action)
 {
     if (this.ItemsChanged != null)
     {
         this.ItemsChanged(this, new ResultNodeCollectionEventArgs(index, items, action));
     }
 }
 public ResultNodeCollectionEventArgs(int index, ResultNode[] items, ResultNodeCollectionChangeType changeType)
 {
     this._index = index;
     this._items = items;
     this._changeType = changeType;
 }
Example #3
0
 private void SynchronizeResultNodes(ResultNode[] items, int index, ResultNodeCollectionChangeType changeType)
 {
     ISnapInPlatform snapInPlatform = base.SnapIn.SnapInPlatform;
     if (snapInPlatform == null)
     {
         throw Microsoft.ManagementConsole.Internal.Utility.CreateClassNotInitializedException("MmcListView", "SynchronizeResultNodes");
     }
     if (items == null)
     {
         throw new ArgumentNullException("items");
     }
     if (items.Length < 1)
     {
         TraceSources.ExecutiveSource.TraceEvent(TraceEventType.Verbose, 12, "Empty result nodes update for view {0}.", new object[] { base.ViewInstanceId });
     }
     else
     {
         UpdateResultNodesCommand command = new UpdateResultNodesCommand();
         command.ViewInstanceId = base.ViewInstanceId;
         command.ChangeType = changeType;
         command.Index = index;
         NodeData[] data = new NodeData[items.Length];
         for (int i = 0; i < items.Length; i++)
         {
             data[i] = items[i].Data;
         }
         command.SetData(data);
         snapInPlatform.ProcessCommand(command);
     }
 }