本文整理汇总了C#中CollectionItemsChangedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# CollectionItemsChangedEventArgs类的具体用法?C# CollectionItemsChangedEventArgs怎么用?C# CollectionItemsChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CollectionItemsChangedEventArgs类属于命名空间,在下文中一共展示了CollectionItemsChangedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckedItemsChanged
//Variable selection changed
//Add or remove data row
private void CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<StringValue>> checkedItems) {
foreach (IndexedItem<StringValue> item in checkedItems.Items) {
string variableName = item.Value.Value;
//variable is displayed -> remove
if (VariableIsDisplayed(variableName)) {
dataTable.Rows.Remove(variableName);
dataTable.SelectedRows.Remove(variableName);
dataTablePerVariable.Remove(dataTablePerVariable.Find(x => (x.Name == variableName)));
//variable isnt't displayed -> add
} else {
DataRow row = GetDataRow(variableName);
DataRow selectedRow = GetSelectedDataRow(variableName);
dataTable.Rows.Add(row);
PreprocessingDataTable pdt = new PreprocessingDataTable(variableName);
pdt.Rows.Add(row);
dataTablePerVariable.Add(pdt);
//update selection
if (selectedRow != null) {
dataTable.SelectedRows.Add(selectedRow);
pdt.SelectedRows.Add(selectedRow);
}
}
}
// update chart if not in all in one mode
if (Content != null && !Content.AllInOneMode)
GenerateChart();
}
示例2: JobsOnChanged
private void JobsOnChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<Job>> e) {
foreach (var job in e.OldItems)
job.Value.TasksChanged -= JobOnTasksChanged;
foreach (var job in e.Items)
job.Value.TasksChanged += JobOnTasksChanged;
FillGanttChart();
}
示例3: Content_ItemsAdded
private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
if (suppressUpdates) return;
if (InvokeRequired) {
Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded), sender, e);
return;
}
UpdateDataTableComboBox(); // will trigger AddRuns
}
示例4: Content_ItemsRemoved
private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
if (suppressUpdates) return;
if (InvokeRequired) {
Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved), sender, e);
return;
}
UpdateDataTableComboBox();
RemoveRuns(e.Items);
}
示例5: Runs_ItemsRemoved
private void Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
if (Optimizer != null) Optimizer.Runs.RemoveRange(e.Items);
}
示例6: Runs_CollectionReset
private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
if (Optimizer != null) Optimizer.Runs.RemoveRange(e.OldItems);
foreach (IRun run in e.Items) {
IItem item;
run.Results.TryGetValue("Execution Time", out item);
TimeSpanValue executionTime = item as TimeSpanValue;
if (executionTime != null) ExecutionTime += executionTime.Value;
}
}
示例7: Runs_ItemsAdded
private void Runs_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
foreach (IRun run in e.Items) {
IItem item;
run.Results.TryGetValue("Execution Time", out item);
TimeSpanValue executionTime = item as TimeSpanValue;
if (executionTime != null) {
if (Optimizer.ExecutionState == ExecutionState.Started)
runsExecutionTime += executionTime.Value;
else
ExecutionTime += executionTime.Value;
}
}
}
示例8: Content_CollectionReset
private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
DeregisterRunEvents(e.OldItems);
RegisterRunEvents(e.Items);
if (!suppressUpdates) UpdateAll();
}
示例9: Optimizer_Runs_ItemsRemoved
private void Optimizer_Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
Runs.RemoveRange(e.Items);
}
示例10: convertersList_Changed
private void convertersList_Changed(object sender, CollectionItemsChangedEventArgs<IndexedItem<IItemToSolutionMessageConverter>> e) {
BuildDispatcher();
}
示例11: rows_CollectionReset
private void rows_CollectionReset(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
foreach (DataRow row in e.OldItems)
this.DeregisterRowEvents(row);
foreach (DataRow row in e.Items)
this.RegisterRowEvents(row);
if (e.OldItems.Count() != e.Items.Count())
this.OnColumnsChanged();
this.OnColumnNamesChanged();
this.OnReset();
}
示例12: AnalyzerOperators_ItemsAdded
private void AnalyzerOperators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IAnalyzer>> e) {
foreach (var analyzer in e.Items) {
foreach (var parameter in analyzer.Value.Parameters.OfType<IScopeTreeLookupParameter>()) {
parameter.Depth = 2;
}
}
}
示例13: Runs_CollectionReset
private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
runsCounter = runs.Count;
}
示例14: Content_CollectionReset
private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
if (suppressUpdates) return;
if (InvokeRequired) Invoke((Action<object, CollectionItemsChangedEventArgs<IRun>>)Content_CollectionReset, sender, e);
else {
UpdateComboboxes();
RebuildDataTableAsync();
}
}
示例15: ConnectionInfos_ItemsRemoved
private void ConnectionInfos_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IConnectionInfo> e) {
foreach (IConnectionInfo connectionInfo in e.Items)
this.RemoveConnectionInfo(connectionInfo);
}