Ejemplo n.º 1
0
    //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();

    }
 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();
 }
 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
 }
 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);
 }
Ejemplo n.º 5
0
 protected virtual void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs <IndexedItem <T> > e)
 {
     if (InvokeRequired)
     {
         Invoke(new CollectionItemsChangedEventHandler <IndexedItem <T> >(Content_ItemsRemoved), sender, e);
     }
     else
     {
         List <ListViewItem> listViewItems = new List <ListViewItem>();
         foreach (IndexedItem <T> item in e.Items)
         {
             listViewItems.Add(itemsListView.Items[item.Index]);
         }
         foreach (ListViewItem listViewItem in listViewItems)
         {
             RemoveListViewItem(listViewItem);
         }
         RebuildImageList();
     }
 }
Ejemplo n.º 6
0
 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;
             }
         }
     }
 }
Ejemplo n.º 7
0
 protected virtual void item_ItemsAdded(object sender, CollectionItemsChangedEventArgs <IItemTree <T> > e)
 {
     if (InvokeRequired)
     {
         Invoke(new CollectionItemsChangedEventHandler <IItemTree <T> >(item_ItemsAdded), sender, e);
     }
     else
     {
         TreeNode node = GetNodeByItem(sender as T);
         if (node != null)
         {
             foreach (T item in e.Items)
             {
                 AddChildNodes(item, node.Nodes, true);
                 node.ExpandAll();
                 UpdateNodeItemImage(node);
             }
         }
     }
 }
Ejemplo n.º 8
0
 protected virtual void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs <T> e)
 {
     if (InvokeRequired)
     {
         Invoke(new CollectionItemsChangedEventHandler <T>(Content_ItemsRemoved), sender, e);
     }
     else
     {
         foreach (T item in e.Items)
         {
             //remove only the first matching ListViewItem, because the IItem could be contained multiple times in the ItemCollection
             ListViewItem listviewItem = GetListViewItemsForItem(item).FirstOrDefault();
             if (listviewItem != null)
             {
                 RemoveListViewItem(listviewItem);
             }
         }
         RebuildImageList();
     }
 }
Ejemplo n.º 9
0
        protected override void CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs <IndexedItem <StringValue> > checkedItems)
        {
            base.CheckedItemsChanged(sender, checkedItems);
            if (SuppressCheckedChangedUpdate)
            {
                return;
            }

            foreach (var variable in checkedItems.Items)
            {
                if (Content.VariableItemList.ItemChecked(variable.Value))
                {
                    ShowChartOnTable(variable.Value.Value, variable.Index);
                }
                else
                {
                    HideChartFromTable(variable.Value.Value, variable.Index);
                }
            }
        }
Ejemplo n.º 10
0
 private void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs <IndexedItem <double> > e)
 {
     if (InvokeRequired)
     {
         Invoke(new CollectionItemsChangedEventHandler <IndexedItem <double> >(Values_ItemsReplaced), sender, e);
     }
     else
     {
         DataRow row = null;
         valuesRowsTable.TryGetValue((IObservableList <double>)sender, out row);
         if (row != null)
         {
             Series rowSeries = chart.Series[row.Name];
             if (!invisibleSeries.Contains(rowSeries))
             {
                 if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram)
                 {
                     rowSeries.Points.Clear();
                     FillSeriesWithRowValues(rowSeries, row);
                 }
                 else
                 {
                     foreach (IndexedItem <double> item in e.Items)
                     {
                         if (IsInvalidValue(item.Value))
                         {
                             rowSeries.Points[item.Index].IsEmpty = true;
                         }
                         else
                         {
                             rowSeries.Points[item.Index].YValues = new double[] { item.Value };
                             rowSeries.Points[item.Index].IsEmpty = false;
                         }
                     }
                 }
                 RecalculateAxesScale(chart.ChartAreas[0]);
                 UpdateYCursorInterval();
             }
         }
     }
 }
Ejemplo n.º 11
0
 private void Optimizers_ItemsReplaced(object sender, CollectionItemsChangedEventArgs <IndexedItem <IOptimizer> > e)
 {
     if (syncTasksWithOptimizers && this.ItemTask.ComputeInParallel)
     {
         childHiveTasksLock.EnterWriteLock();
         try {
             foreach (var item in e.OldItems)
             {
                 this.childHiveTasks.Remove(this.GetChildByOptimizer(item.Value));
             }
             foreach (var item in e.Items)
             {
                 if (GetChildByOptimizer(item.Value) == null && item.Value.Name != "Placeholder")
                 {
                     this.childHiveTasks.Add(new OptimizerHiveTask(item.Value));
                 }
             }
         }
         finally { childHiveTasksLock.ExitWriteLock(); }
     }
 }
Ejemplo n.º 12
0
 private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs <IRun> e)
 {
     if (suppressUpdates)
     {
         return;
     }
     if (InvokeRequired)
     {
         Invoke(new CollectionItemsChangedEventHandler <IRun>(Content_ItemsAdded), sender, e);
     }
     else
     {
         var items = e.Items.Select(CreateListViewItem).ToArray();
         itemsListView.Items.AddRange(items);
         AdjustListViewColumnSizes();
         analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
         clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
         runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
         UpdateGroupBoxText();
     }
 }
Ejemplo n.º 13
0
        private void Algorithm_Runs_ItemsAdded(object sender, CollectionItemsChangedEventArgs <IRun> e)
        {
            OKBProblem problem = Problem as OKBProblem;

            foreach (IRun run in e.Items)
            {
                if (problem != null)
                {
                    OKBRun okbRun = new OKBRun(AlgorithmId, problem.ProblemId, run, UserId);
                    runs.Add(okbRun);
                    if (StoreRunsAutomatically)
                    {
                        okbRun.Store();
                    }
                }
                else
                {
                    runs.Add(run);
                }
            }
        }
Ejemplo n.º 14
0
        protected override void CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs <IndexedItem <StringValue> > checkedItems)
        {
            base.CheckedItemsChanged(sender, checkedItems);

            foreach (IndexedItem <StringValue> item in checkedItems.Items)
            {
                string variableName = item.Value.Value;

                if (IsVariableChecked(variableName))
                {
                    // ToDo: avoid clearing all rows, but how?
                    allInOneDataTable.Rows.Clear();
                    var rows = Content.VariableItemList.CheckedItems.Select(r => allInOneDataRows[r.Value.Value]);
                    allInOneDataTable.Rows.AddRange(rows);
                }
                else
                {
                    allInOneDataTable.Rows.Remove(variableName);
                }
            }
        }
Ejemplo n.º 15
0
 private void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs <IndexedItem <Tuple <T, double> > > e)
 {
     if (InvokeRequired)
     {
         Invoke(new CollectionItemsChangedEventHandler <IndexedItem <Tuple <T, double> > >(Values_ItemsReplaced), sender, e);
     }
     else
     {
         IndexedDataRow <T> row = null;
         valuesRowsTable.TryGetValue((IObservableList <Tuple <T, double> >)sender, out row);
         if (row != null)
         {
             if (row.Values.Count == 0)
             {
                 RemoveDataRow(row);
             }
             else
             {
                 Series rowSeries = chart.Series[row.Name];
                 if (!invisibleSeries.Contains(rowSeries))
                 {
                     if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram)
                     {
                         rowSeries.Points.Clear();
                         FillSeriesWithRowValues(rowSeries, row);
                     }
                     else
                     {
                         foreach (IndexedItem <Tuple <T, double> > item in e.Items)
                         {
                             rowSeries.Points[item.Index].SetValueXY(item.Value.Item1, item.Value.Item2);
                         }
                     }
                     RecalculateAxesScale(chart.ChartAreas[0]);
                     UpdateYCursorInterval();
                 }
             }
         }
     }
 }
 protected override void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs <RefreshableJob> e)
 {
     if (InvokeRequired)
     {
         Invoke(new CollectionItemsChangedEventHandler <RefreshableJob>(Content_ItemsRemoved), sender, e);
     }
     else
     {
         base.Content_ItemsRemoved(sender, e);
         foreach (var item in e.Items)
         {
             item.ItemImageChanged -= new EventHandler(item_ItemImageChanged);
         }
         if (Content != null && Content.Count == 0)
         {
             foreach (ColumnHeader c in this.itemsListView.Columns)
             {
                 c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
             }
         }
     }
 }
        //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();
            }
        }
Ejemplo n.º 18
0
        private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs <IRun> e)
        {
            if (suppressUpdates)
            {
                return;
            }
            if (InvokeRequired)
            {
                Invoke(new CollectionItemsChangedEventHandler <IRun>(Content_ItemsAdded), sender, e);
            }
            else
            {
                foreach (IRun item in e.Items)
                {
                    AddListViewItem(CreateListViewItem(item));
                }

                AdjustListViewColumnSizes();
                analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
                clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
                runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
            }
        }
Ejemplo n.º 19
0
 protected virtual void item_CollectionReset(object sender, CollectionItemsChangedEventArgs <IItemTree <T> > e)
 {
     if (InvokeRequired)
     {
         Invoke(new CollectionItemsChangedEventHandler <IItemTree <T> >(item_CollectionReset), sender, e);
     }
     else
     {
         TreeNode node = GetNodeByItem(sender as T);
         if (node != null)
         {
             foreach (T item in e.OldItems)
             {
                 RemoveChildNodes(item, node.Nodes);
             }
             RebuildImageList();
             foreach (T item in e.Items)
             {
                 AddChildNodes(item, node.Nodes, true);
             }
         }
     }
 }
Ejemplo n.º 20
0
        private void RunOnResultChanged(object sender, CollectionItemsChangedEventArgs <KeyValuePair <string, IItem> > e)
        {
            bool columnsChanged = false;

            foreach (var result in e.Items)
            {
                columnsChanged |= AddResult(result.Key, result.Value);
            }
            foreach (var result in e.OldItems)
            {
                columnsChanged |= RemoveResultName(result.Key);
            }
            if (columnsChanged)
            {
                columnNameCache = null;
            }
            OnReset();
            if (columnsChanged)
            {
                OnColumnsChanged();
                OnColumnNamesChanged();
            }
        }
Ejemplo n.º 21
0
        private void RunOnParameterChanged(object sender, CollectionItemsChangedEventArgs <KeyValuePair <string, IItem> > e)
        {
            bool columnsChanged = false;

            foreach (var param in e.Items)
            {
                columnsChanged |= AddParameter(param.Key, param.Value);
            }
            foreach (var param in e.OldItems)
            {
                columnsChanged |= RemoveParameterName(param.Key);
            }
            if (columnsChanged)
            {
                columnNameCache = null;
            }
            OnReset();
            if (columnsChanged)
            {
                OnColumnsChanged();
                OnColumnNamesChanged();
            }
        }
Ejemplo n.º 22
0
 private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs <IndexedItem <double> > e)
 {
     if (InvokeRequired)
     {
         Invoke(new CollectionItemsChangedEventHandler <IndexedItem <double> >(Values_CollectionReset), sender, e);
     }
     else
     {
         DataRow row = null;
         valuesRowsTable.TryGetValue((IObservableList <double>)sender, out row);
         if (row != null)
         {
             Series rowSeries = chart.Series[row.Name];
             if (!invisibleSeries.Contains(rowSeries))
             {
                 rowSeries.Points.Clear();
                 FillSeriesWithRowValues(rowSeries, row);
                 RecalculateAxesScale(chart.ChartAreas[0]);
                 UpdateYCursorInterval();
             }
         }
     }
 }
Ejemplo n.º 23
0
        protected virtual void Content_ItemsReplaced(object sender, CollectionItemsChangedEventArgs <KeyValuePair <string, object> > e)
        {
            var oldVariables = e.OldItems;

            foreach (var variable in oldVariables)
            {
                var item = variable.Value as IItem;
                if (item != null)
                {
                    item.ToStringChanged -= item_ToStringChanged;
                }
            }
            var newVariables = e.Items;

            foreach (var variable in newVariables)
            {
                var item = variable.Value as IItem;
                if (item != null)
                {
                    item.ToStringChanged += item_ToStringChanged;
                }
            }
            InvokeVariableAction(UpdateVariable, e.Items);
        }
Ejemplo n.º 24
0
    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();
    }
Ejemplo n.º 25
0
 private void convertersList_Changed(object sender, CollectionItemsChangedEventArgs<IndexedItem<IItemToSolutionMessageConverter>> e) {
   BuildDispatcher();
 }
Ejemplo n.º 26
0
 private void Rows_CollectionReset(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
   if (InvokeRequired)
     Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset), sender, e);
   else {
     RemoveDataRows(e.OldItems);
     AddDataRows(e.Items);
   }
 }
Ejemplo n.º 27
0
 private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
   if (InvokeRequired)
     Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_CollectionReset), sender, e);
   else {
     DataRow row = null;
     valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
     if (row != null) {
       Series rowSeries = chart.Series[row.Name];
       if (!invisibleSeries.Contains(rowSeries)) {
         rowSeries.Points.Clear();
         FillSeriesWithRowValues(rowSeries, row);
         RecalculateAxesScale(chart.ChartAreas[0]);
         UpdateYCursorInterval();
       }
     }
   }
 }
Ejemplo n.º 28
0
 protected virtual void ValidValues_ItemsAdded(object sender, CollectionItemsChangedEventArgs <T> e)
 {
 }
 protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs <IndexedItem <ISymbolicExpressionTreeCrossover> > e)
 {
     base.Operators_ItemsAdded(sender, e);
     ParameterizeCrossovers();
 }
Ejemplo n.º 30
0
 private void Parameters_Changed(object sender, CollectionItemsChangedEventArgs <IParameter> args)
 {
     OnSignatureChanged();
 }
 protected override void Operators_ItemsReplaced(object sender, CollectionItemsChangedEventArgs <IndexedItem <IRealVectorCrossover> > e)
 {
     base.Operators_ItemsReplaced(sender, e);
     ParameterizeCrossovers();
 }
Ejemplo n.º 32
0
 private void OnHiveTasksReset(CollectionItemsChangedEventArgs<HiveTask> e) {
   var handler = HiveTasksReset;
   if (handler != null) handler(this, e);
 }
Ejemplo n.º 33
0
 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();
   }
 }
Ejemplo n.º 34
0
 protected override void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs <T> e)
 {
     base.Content_ItemsRemoved(sender, e);
     SetNumberOfCheckItems();
 }
Ejemplo n.º 35
0
 private void LayerAnalyzerOperators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IAnalyzer>> e) {
   foreach (var analyzer in e.Items) {
     IParameter resultParameter;
     if (analyzer.Value.Parameters.TryGetValue("Results", out resultParameter)) {
       var lookupParameter = resultParameter as ILookupParameter;
       if (lookupParameter != null)
         lookupParameter.ActualName = "LayerResults";
     }
     foreach (var parameter in analyzer.Value.Parameters.OfType<IScopeTreeLookupParameter>()) {
       parameter.Depth = 1;
     }
   }
 }
Ejemplo n.º 36
0
 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;
     }
   }
 }
 private void ConnectionInfos_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IConnectionInfo> e) {
   foreach (IConnectionInfo connectionInfo in e.Items)
     this.RemoveConnectionInfo(connectionInfo);
 }
 private void SelectedRows_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
   if (InvokeRequired)
     Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced), sender, e);
   else {
     RemoveSelectedDataRows(e.OldItems);
     AddSelectedDataRows(e.Items);
   }
 }
Ejemplo n.º 39
0
 private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   runsCounter = runs.Count;
 }
 private void HiveTasks_CollectionReset(object sender, CollectionItemsChangedEventArgs<HiveTask> e) {
   if (InvokeRequired)
     Invoke(new CollectionItemsChangedEventHandler<HiveTask>(HiveTasks_CollectionReset), sender, e);
   else {
     SetEnabledStateOfControls();
   }
 }
Ejemplo n.º 41
0
 private void ConstraintData_CollectionReset(object sender, CollectionItemsChangedEventArgs <IRun> e)
 {
     base.OnConstraintDataChanged();
 }
Ejemplo n.º 42
0
 private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
   this.OnReset();
 }
Ejemplo n.º 43
0
 private void collectedValues_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
   Parameters.RemoveRange(e.Items);
 }
Ejemplo n.º 44
0
 // NOTE: The ItemsReplaced event does not have to be handled here as it is only fired when the name (i.e. key) of a parameter
 // changes. As the same parameter is also contained in the Parameters collection of the operator, the Parameters collection
 // will react on this name change on its own.
 #endregion
 private void collectedValues_CollectionReset(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
   Parameters.RemoveRange(e.OldItems);
   Parameters.AddRange(e.Items);
 }
        protected override void CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs <IndexedItem <StringValue> > checkedItems)
        {
            base.CheckedItemsChanged(sender, checkedItems);

            GenerateLayout();
        }
 private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   RegisterRunEvents(e.Items);
   if (!suppressUpdates) UpdateComboBoxes();
 }
Ejemplo n.º 47
0
 protected void Selectors_CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs <IndexedItem <ISelector> > e)
 {
     BuildOperatorGraph();
 }
Ejemplo n.º 48
0
 private void Optimizer_Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   Runs.RemoveRange(e.Items);
 }
 private void symbols_CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<ISymbol>> e) {
   ICheckedItemList<ISymbol> checkedItemList = (ICheckedItemList<ISymbol>)sender;
   foreach (var indexedItem in e.Items)
     indexedItem.Value.Enabled = checkedItemList.ItemChecked(indexedItem.Value);
 }
Ejemplo n.º 50
0
 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;
   }
 }
Ejemplo n.º 51
0
 private void participants_ItemsRemoved(object sender, CollectionItemsChangedEventArgs e)
 {
 }
Ejemplo n.º 52
0
 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;
     }
   }
 }
 protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs <IndexedItem <IIntegerVectorManipulator> > e)
 {
     base.Operators_ItemsAdded(sender, e);
     ParameterizeOperators(e.Items);
 }
Ejemplo n.º 54
0
 private void Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   if (Optimizer != null) Optimizer.Runs.RemoveRange(e.Items);
 }
Ejemplo n.º 55
0
 private void Rows_ItemsAdded(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
   if (InvokeRequired)
     Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsAdded), sender, e);
   else {
     AddDataRows(e.Items);
   }
 }
 private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   DeregisterRunEvents(e.OldItems);
   RegisterRunEvents(e.Items);
   if (!suppressUpdates) UpdateAll();
 }
Ejemplo n.º 57
0
 private void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
   if (InvokeRequired)
     Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsReplaced), sender, e);
   else {
     DataRow row = null;
     valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
     if (row != null) {
       Series rowSeries = chart.Series[row.Name];
       if (!invisibleSeries.Contains(rowSeries)) {
         if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram) {
           rowSeries.Points.Clear();
           FillSeriesWithRowValues(rowSeries, row);
         } else {
           foreach (IndexedItem<double> item in e.Items) {
             if (IsInvalidValue(item.Value))
               rowSeries.Points[item.Index].IsEmpty = true;
             else {
               rowSeries.Points[item.Index].YValues = new double[] { item.Value };
               rowSeries.Points[item.Index].IsEmpty = false;
             }
           }
         }
         RecalculateAxesScale(chart.ChartAreas[0]);
         UpdateYCursorInterval();
       }
     }
   }
 }
 private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   if (suppressUpdates) return;
   if (InvokeRequired) {
     Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset), sender, e);
     return;
   }
   RemoveRuns(e.OldItems);
   UpdateDataTableComboBox();
   UpdateDataRowComboBox();
   RebuildCombinedDataTable();
 }
Ejemplo n.º 59
0
 private void Optimizer_Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
   Runs.RemoveRange(e.OldItems);
   Runs.AddRange(e.Items);
 }
Ejemplo n.º 60
0
    private void rows_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
      foreach (DataRow row in e.Items)
        this.DeregisterRowEvents(row);

      this.OnColumnsChanged();
      this.OnColumnNamesChanged();
      this.OnReset();
    }