Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/21 15:53:37 (3 years ago)
Author:
dpiringe
Message:

#3026

  • added a new protected virtual property in CheckedItemListView to be able to change the text of the groupBox
  • removed event handling in ResultCollectionPostProcessorControl and overwrote the new property GroupBoxText
  • added a new section in ExportJsonDialog for result collection processors
  • renamed IResultCollectionPostProcessor to IResultCollectionProcessor + all connected classes
  • added/changed the workflow of ResultCollectionProcessors in JsonTemplateGenerator and JsonTemplateInstantiator
    • also changed Constants.cs -> added a new section in template ResultCollectionProcessorItems
Location:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.Designer.cs

    r18047 r18050  
    177177      // postProcessorListView
    178178      this.postProcessorListControl = new ResultCollectionPostProcessorControl();
    179       this.postProcessorListControl.Content = new CheckedItemList<IResultCollectionPostProcessor>();
    180       this.postProcessorListControl.Content.Add(new SymRegPythonPostProcessor());
     179      this.postProcessorListControl.Content = new CheckedItemList<IResultCollectionProcessor>();
    181180      this.postProcessorListControl.Location = new System.Drawing.Point(0, 6);
    182181      this.postProcessorListControl.Dock = System.Windows.Forms.DockStyle.Fill;
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs

    r18047 r18050  
    2222    private IOptimizer Optimizer { get; set; }
    2323    private IList<IJsonItemVM> VMs { get; set; }
    24     private ICheckedItemList<IResultCollectionPostProcessor> PostProcessors { get; set; }
     24    private ICheckedItemList<IResultCollectionProcessor> PostProcessors { get; set; }
    2525    #endregion
    2626
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ResultCollectionPostProcessorControl.cs

    r18047 r18050  
    1111
    1212namespace HeuristicLab.JsonInterface.OptimizerIntegration {
    13   public partial class ResultCollectionPostProcessorControl : Core.Views.CheckedItemListView<IResultCollectionPostProcessor> {
     13  public partial class ResultCollectionPostProcessorControl : Core.Views.CheckedItemListView<IResultCollectionProcessor> {
    1414    public ResultCollectionPostProcessorControl() {
    1515      InitializeComponent();
    1616    }
    1717
    18     #region Content Events
    19     protected override void OnContentChanged() {
    20       base.OnContentChanged();
    21       if (Content != null) {
    22         SetNumberOfCheckItems();
    23       }
    24     }
     18    protected override string GroupBoxText => "Result Collection Processors";
    2519
    26     protected override void Content_CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<IResultCollectionPostProcessor>> e) {
    27       base.Content_CheckedItemsChanged(sender, e);
    28       if (InvokeRequired)
    29         Invoke(new CollectionItemsChangedEventHandler<IndexedItem<IResultCollectionPostProcessor>>(Content_CheckedItemsChanged), sender, e);
    30       else {
    31         SetNumberOfCheckItems();
    32       }
    33     }
    34     protected override void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<IResultCollectionPostProcessor>> e) {
    35       base.Content_CollectionReset(sender, e);
    36       SetNumberOfCheckItems();
    37     }
    38     protected override void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IResultCollectionPostProcessor>> e) {
    39       base.Content_ItemsAdded(sender, e);
    40       SetNumberOfCheckItems();
    41     }
    42     protected override void Content_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<IResultCollectionPostProcessor>> e) {
    43       base.Content_ItemsMoved(sender, e);
    44       SetNumberOfCheckItems();
    45     }
    46     protected override void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<IResultCollectionPostProcessor>> e) {
    47       base.Content_ItemsRemoved(sender, e);
    48       SetNumberOfCheckItems();
    49     }
    50     protected override void Content_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<IResultCollectionPostProcessor>> e) {
    51       base.Content_ItemsReplaced(sender, e);
    52       SetNumberOfCheckItems();
    53     }
    54     #endregion
    55 
    56     private void SetNumberOfCheckItems() { // TODO: eigene override für "Post Processors" -> Item Naming
    57       if (InvokeRequired) {
    58         Invoke((Action)SetNumberOfCheckItems);
    59       } else {
    60         this.itemsGroupBox.Text = String.Format("Post Processors (Checked: {0}/{1})", Content.CheckedItems.Count(), Content.Count);
    61       }
    62     }
    6320  }
    6421}
Note: See TracChangeset for help on using the changeset viewer.