private void Notify(int index, MmcListViewColumn[] columns, ColumnCollectionChangeType action) { if (this.ItemsChanged != null) { this.ItemsChanged(this, new ColumnCollectionEventArgs(index, columns, action)); } }
public ColumnCollectionEventArgs(int index, MmcListViewColumn[] items, ColumnCollectionChangeType changeType) { this._index = index; this._items = items; this._changeType = changeType; }
private void SynchronizeColumns(MmcListViewColumn[] items, int index, ColumnCollectionChangeType changeType) { if (items == null) { throw new ArgumentNullException("items"); } ISnapInPlatform snapInPlatform = base.SnapIn.SnapInPlatform; if (snapInPlatform == null) { throw Microsoft.ManagementConsole.Internal.Utility.CreateClassNotInitializedException("MmcListView", "SynchronizeColumns"); } if (items.Length < 1) { TraceSources.ExecutiveSource.TraceEvent(TraceEventType.Verbose, 12, "Empty column update for view {0}.", new object[] { base.ViewInstanceId }); } else { UpdateColumnsCommand command = new UpdateColumnsCommand(); command.ViewInstanceId = base.ViewInstanceId; command.ChangeType = changeType; command.Index = index; ColumnData[] data = new ColumnData[items.Length]; for (int i = 0; i < items.Length; i++) { data[i] = items[i].Data; } command.SetData(data); snapInPlatform.ProcessCommand(command); } }