当前位置: 首页>>代码示例>>C#>>正文


C# CollectionItemsChangedEventArgs类代码示例

本文整理汇总了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();

    }
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:35,代码来源:PreprocessingChartView.cs

示例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();
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:JobShopSchedulingProblemView.cs

示例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
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:8,代码来源:RunCollectionChartAggregationView.cs

示例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);
 }
开发者ID:t-h-e,项目名称:HeuristicLab.CFGGP,代码行数:9,代码来源:RunCollectionChartAverageView.cs

示例5: Runs_ItemsRemoved

 private void Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   if (Optimizer != null) Optimizer.Runs.RemoveRange(e.Items);
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:3,代码来源:BatchRun.cs

示例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;
   }
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:9,代码来源:BatchRun.cs

示例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;
     }
   }
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:13,代码来源:BatchRun.cs

示例8: Content_CollectionReset

 private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   DeregisterRunEvents(e.OldItems);
   RegisterRunEvents(e.Items);
   if (!suppressUpdates) UpdateAll();
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:5,代码来源:SampleSizeInfluenceView.cs

示例9: Optimizer_Runs_ItemsRemoved

 private void Optimizer_Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   Runs.RemoveRange(e.Items);
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:3,代码来源:BatchRun.cs

示例10: convertersList_Changed

 private void convertersList_Changed(object sender, CollectionItemsChangedEventArgs<IndexedItem<IItemToSolutionMessageConverter>> e) {
   BuildDispatcher();
 }
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:3,代码来源:SolutionMessageBuilder.cs

示例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();
    }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:11,代码来源:DataTable.cs

示例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;
     }
   }
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:AlpsGeneticAlgorithm.cs

示例13: Runs_CollectionReset

 private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   runsCounter = runs.Count;
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:3,代码来源:BenchmarkAlgorithm.cs

示例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();
   }
 }
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:8,代码来源:ChartAnalysisView.cs

示例15: ConnectionInfos_ItemsRemoved

 private void ConnectionInfos_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IConnectionInfo> e) {
   foreach (IConnectionInfo connectionInfo in e.Items)
     this.RemoveConnectionInfo(connectionInfo);
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:4,代码来源:GraphVisualizationInfoView.cs


注:本文中的CollectionItemsChangedEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。