Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/16/11 12:00:36 (13 years ago)
Author:
mkommend
Message:

#1479: Integrated trunk changes.

Location:
branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3
Files:
4 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj

    r6675 r6784  
    128128      <DependentUpon>BatchRunView.cs</DependentUpon>
    129129    </Compile>
     130    <Compile Include="RunCollectionModifierListView.cs">
     131      <SubType>UserControl</SubType>
     132    </Compile>
     133    <Compile Include="RunCollectionModifierListView.Designer.cs">
     134      <DependentUpon>RunCollectionModifierListView.cs</DependentUpon>
     135    </Compile>
    130136    <Compile Include="RunCollectionContentConstraintView.cs">
    131137      <SubType>UserControl</SubType>
     
    157163    <Compile Include="RunCollectionBoxPlotView.Designer.cs">
    158164      <DependentUpon>RunCollectionBoxPlotView.cs</DependentUpon>
    159     </Compile>
    160     <Compile Include="RunCollectionModificationEvaluatorView.cs">
    161       <SubType>UserControl</SubType>
    162     </Compile>
    163     <Compile Include="RunCollectionModificationEvaluatorView.Designer.cs">
    164       <DependentUpon>RunCollectionModificationEvaluatorView.cs</DependentUpon>
    165165    </Compile>
    166166    <Compile Include="RunCollectionComparisonConstraintView.cs">
     
    307307      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
    308308      <Name>HeuristicLab.Optimization-3.3</Name>
    309     </ProjectReference>
    310     <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    311       <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
    312       <Name>HeuristicLab.Parameters-3.3</Name>
    313309    </ProjectReference>
    314310    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
  • branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/HeuristicLabOptimizationViewsPlugin.cs.frame

    r6675 r6784  
    3838  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
    3939  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    40   [PluginDependency("HeuristicLab.Parameters", "3.3")]
    4140  [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions","3.3")]
    4241  public class HeuristicLabOptimizationViewsPlugin : PluginBase {
  • branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs

    r5744 r6784  
    6565      this.constraintPage = new System.Windows.Forms.TabPage();
    6666      this.runCollectionConstraintCollectionView = new HeuristicLab.Optimization.Views.RunCollectionConstraintCollectionView();
     67      this.modifiersPage = new System.Windows.Forms.TabPage();
     68      this.runCollectionModifiersListView = new HeuristicLab.Optimization.Views.RunCollectionModifiersListView();
    6769      this.splitContainer.Panel1.SuspendLayout();
    6870      this.splitContainer.Panel2.SuspendLayout();
     
    7476      this.runPage.SuspendLayout();
    7577      this.constraintPage.SuspendLayout();
     78      this.modifiersPage.SuspendLayout();
    7679      this.SuspendLayout();
    7780      //
     
    235238      this.tabControl.Controls.Add(this.runPage);
    236239      this.tabControl.Controls.Add(this.constraintPage);
     240      this.tabControl.Controls.Add(this.modifiersPage);
    237241      this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
    238242      this.tabControl.Location = new System.Drawing.Point(0, 0);
     
    274278      this.runCollectionConstraintCollectionView.Size = new System.Drawing.Size(518, 351);
    275279      this.runCollectionConstraintCollectionView.TabIndex = 0;
     280      //
     281      // modifiersPage
     282      //
     283      this.modifiersPage.Controls.Add(this.runCollectionModifiersListView);
     284      this.modifiersPage.Location = new System.Drawing.Point(4, 22);
     285      this.modifiersPage.Name = "modifiersPage";
     286      this.modifiersPage.Padding = new System.Windows.Forms.Padding(3);
     287      this.modifiersPage.Size = new System.Drawing.Size(524, 357);
     288      this.modifiersPage.TabIndex = 2;
     289      this.modifiersPage.Text = "Modification";
     290      this.modifiersPage.UseVisualStyleBackColor = true;
     291      //
     292      // runCollectionModifiersListView
     293      //
     294      this.runCollectionModifiersListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     295            | System.Windows.Forms.AnchorStyles.Left)
     296            | System.Windows.Forms.AnchorStyles.Right)));
     297      this.runCollectionModifiersListView.Caption = "Modifier View";
     298      this.runCollectionModifiersListView.Content = null;
     299      this.runCollectionModifiersListView.Evaluator = null;
     300      this.runCollectionModifiersListView.Location = new System.Drawing.Point(3, 3);
     301      this.runCollectionModifiersListView.Name = "runCollectionModifiersListView";
     302      this.runCollectionModifiersListView.ReadOnly = false;
     303      this.runCollectionModifiersListView.Size = new System.Drawing.Size(518, 351);
     304      this.runCollectionModifiersListView.TabIndex = 0;
    276305      //
    277306      // RunCollectionView
     
    291320      this.runPage.ResumeLayout(false);
    292321      this.constraintPage.ResumeLayout(false);
     322      this.modifiersPage.ResumeLayout(false);
    293323      this.ResumeLayout(false);
    294324
     
    314344    private Button clearButton;
    315345    private CheckBox showDetailsCheckBox;
     346    private TabPage modifiersPage;
     347    private RunCollectionModifiersListView runCollectionModifiersListView;
    316348  }
    317349}
  • branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs

    r6675 r6784  
    5858      itemsGroupBox.Text = "Runs";
    5959      itemListViewItemMapping = new Dictionary<IRun, List<ListViewItem>>();
     60      runCollectionModifiersListView.Evaluator = EvaluateModifications;
    6061    }
    6162
     
    9899        }
    99100      }
    100       var modifierMenuItem = new ToolStripMenuItem();
    101       modifierMenuItem.Text = "Modify RunCollection";
    102       modifierMenuItem.Click += ModifierMenuItem_OnClick;
    103       analyzeRunsToolStripDropDownButton.DropDownItems.Add(modifierMenuItem);
    104101    }
    105102
     
    122119          runCollectionConstraintCollectionView.Content = RunCollection.Constraints;
    123120          runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
     121          if (!tabControl.TabPages.Contains(modifiersPage))
     122            tabControl.TabPages.Add(modifiersPage);
     123          runCollectionModifiersListView.Content = RunCollection.Modifiers;
    124124        }
    125125        foreach (IRun item in Content) {
     
    134134        if (tabControl.TabPages.Contains(constraintPage))
    135135          tabControl.TabPages.Remove(constraintPage);
     136        if (tabControl.TabPages.Contains(modifiersPage))
     137          tabControl.TabPages.Remove(modifiersPage);
    136138      }
    137139    }
     
    340342      }
    341343    }
    342     private void ModifierMenuItem_OnClick(object sender, EventArgs args) {
    343       var modifier = new RunCollectionModificationEvaluator();
    344       modifier.RunCollection.AddRange(Content.Select(r => (IRun)r.Clone()));
    345       MainFormManager.MainForm.ShowContent(modifier);
    346     }
    347344    private void removeButton_Click(object sender, EventArgs e) {
    348345      if (itemsListView.SelectedItems.Count > 0) {
     
    357354    #endregion
    358355
    359     #region CheckBox Events
     356    #region Control Events
    360357    private void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) {
    361358      if (showDetailsCheckBox.Checked) {
     
    368365      }
    369366    }
     367    private void EvaluateModifications() {
     368      if (RunCollection == null)
     369        return;
     370      ReadOnly = true;
     371      try {
     372        RunCollection.Modify();
     373      } finally {
     374        ReadOnly = false;
     375      }
     376    }
    370377    #endregion
    371378
Note: See TracChangeset for help on using the changeset viewer.