Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/21/21 15:27:58 (4 years ago)
Author:
mkommend
Message:

#2521: Added first version (draft) of ResultsProducingItem, an according view and a refactored ProblemView.

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering.Views/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering.Views/3.3/HeuristicLab.Problems.Orienteering.Views-3.3.csproj

    r17526 r17953  
    114114      <DependentUpon>OrienteeringProblemDataView.cs</DependentUpon>
    115115    </Compile>
    116     <Compile Include="OrienteeringProblemView.cs">
    117       <SubType>UserControl</SubType>
    118     </Compile>
     116    <Compile Include="OrienteeringProblemView.cs" />
    119117    <Compile Include="OrienteeringProblemView.Designer.cs">
    120118      <DependentUpon>OrienteeringProblemView.cs</DependentUpon>
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringProblemView.Designer.cs

    r17226 r17953  
    1 #region License Information
    2 /* HeuristicLab
    3  * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    4  *
    5  * This file is part of HeuristicLab.
    6  *
    7  * HeuristicLab is free software: you can redistribute it and/or modify
    8  * it under the terms of the GNU General Public License as published by
    9  * the Free Software Foundation, either version 3 of the License, or
    10  * (at your option) any later version.
    11  *
    12  * HeuristicLab is distributed in the hope that it will be useful,
    13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15  * GNU General Public License for more details.
    16  *
    17  * You should have received a copy of the GNU General Public License
    18  * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    19  */
    20 #endregion
     1//#region License Information
     2///* HeuristicLab
     3// * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4// *
     5// * This file is part of HeuristicLab.
     6// *
     7// * HeuristicLab is free software: you can redistribute it and/or modify
     8// * it under the terms of the GNU General Public License as published by
     9// * the Free Software Foundation, either version 3 of the License, or
     10// * (at your option) any later version.
     11// *
     12// * HeuristicLab is distributed in the hope that it will be useful,
     13// * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15// * GNU General Public License for more details.
     16// *
     17// * You should have received a copy of the GNU General Public License
     18// * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19// */
     20//#endregion
    2121
    22 namespace HeuristicLab.Problems.Orienteering.Views {
    23   partial class OrienteeringProblemView {
    24     /// <summary>
    25     /// Required designer variable.
    26     /// </summary>
    27     private System.ComponentModel.IContainer components = null;
     22//namespace HeuristicLab.Problems.Orienteering.Views {
     23//  partial class OrienteeringProblemView {
     24//    /// <summary>
     25//    /// Required designer variable.
     26//    /// </summary>
     27//    private System.ComponentModel.IContainer components = null;
    2828
    29     protected override void Dispose(bool disposing) {
    30       if (disposing && (components != null)) {
    31         components.Dispose();
    32       }
    33       base.Dispose(disposing);
    34     }
     29//    protected override void Dispose(bool disposing) {
     30//      if (disposing && (components != null)) {
     31//        components.Dispose();
     32//      }
     33//      base.Dispose(disposing);
     34//    }
    3535
    36     #region Component Designer generated code
     36//    #region Component Designer generated code
    3737
    38     /// <summary>
    39     /// Required method for Designer support - do not modify
    40     /// the contents of this method with the code editor.
    41     /// </summary>
    42     private void InitializeComponent() {
    43       this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
    44       this.parametersTabPage = new System.Windows.Forms.TabPage();
    45       this.visualizationTabPage = new System.Windows.Forms.TabPage();
    46       this.orienteeringSolutionView = new HeuristicLab.Problems.Orienteering.Views.OrienteeringSolutionView();
    47       ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
    48       this.problemInstanceSplitContainer.Panel1.SuspendLayout();
    49       this.problemInstanceSplitContainer.Panel2.SuspendLayout();
    50       this.problemInstanceSplitContainer.SuspendLayout();
    51       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    52       this.tabControl.SuspendLayout();
    53       this.parametersTabPage.SuspendLayout();
    54       this.visualizationTabPage.SuspendLayout();
    55       this.SuspendLayout();
    56       //
    57       // problemInstanceSplitContainer
    58       //
    59       //
    60       // problemInstanceSplitContainer.Panel2
    61       //
    62       this.problemInstanceSplitContainer.Panel2.Controls.Add(this.tabControl);
    63       //
    64       // parameterCollectionView
    65       //
    66       this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
    67       this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
    68       this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
    69       this.parameterCollectionView.Size = new System.Drawing.Size(497, 274);
    70       //
    71       // nameTextBox
    72       //
    73       this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    74       this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    75       //
    76       // tabControl
    77       //
    78       this.tabControl.AllowDrop = true;
    79       this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    80                   | System.Windows.Forms.AnchorStyles.Left)
    81                   | System.Windows.Forms.AnchorStyles.Right)));
    82       this.tabControl.Controls.Add(this.parametersTabPage);
    83       this.tabControl.Controls.Add(this.visualizationTabPage);
    84       this.tabControl.Location = new System.Drawing.Point(0, 27);
    85       this.tabControl.Name = "tabControl";
    86       this.tabControl.SelectedIndex = 0;
    87       this.tabControl.Size = new System.Drawing.Size(511, 306);
    88       this.tabControl.TabIndex = 4;
    89       //
    90       // parametersTabPage
    91       //
    92       this.parametersTabPage.BackColor = System.Drawing.SystemColors.Window;
    93       this.parametersTabPage.Controls.Add(this.parameterCollectionView);
    94       this.parametersTabPage.Location = new System.Drawing.Point(4, 22);
    95       this.parametersTabPage.Name = "parametersTabPage";
    96       this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    97       this.parametersTabPage.Size = new System.Drawing.Size(503, 280);
    98       this.parametersTabPage.TabIndex = 0;
    99       this.parametersTabPage.Text = "Parameters";
    100       //
    101       // visualizationTabPage
    102       //
    103       this.visualizationTabPage.BackColor = System.Drawing.SystemColors.Window;
    104       this.visualizationTabPage.Controls.Add(this.orienteeringSolutionView);
    105       this.visualizationTabPage.Location = new System.Drawing.Point(4, 22);
    106       this.visualizationTabPage.Name = "visualizationTabPage";
    107       this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
    108       this.visualizationTabPage.Size = new System.Drawing.Size(503, 280);
    109       this.visualizationTabPage.TabIndex = 1;
    110       this.visualizationTabPage.Text = "Visualization";
    111       //
    112       // orienteeringSolutionView
    113       //
    114       this.orienteeringSolutionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    115                   | System.Windows.Forms.AnchorStyles.Left)
    116                   | System.Windows.Forms.AnchorStyles.Right)));
    117       this.orienteeringSolutionView.Caption = "OrienteeringSolution View";
    118       this.orienteeringSolutionView.Content = null;
    119       this.orienteeringSolutionView.Location = new System.Drawing.Point(6, 6);
    120       this.orienteeringSolutionView.Name = "orienteeringSolutionView";
    121       this.orienteeringSolutionView.ReadOnly = false;
    122       this.orienteeringSolutionView.Size = new System.Drawing.Size(491, 268);
    123       this.orienteeringSolutionView.TabIndex = 0;
    124       //
    125       // TravelingSalesmanProblemView
    126       //
    127       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    128       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    129       this.Name = "OrienteeringProblemView";
    130       this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
    131       this.problemInstanceSplitContainer.Panel1.PerformLayout();
    132       this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
    133       this.problemInstanceSplitContainer.Panel2.PerformLayout();
    134       ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
    135       this.problemInstanceSplitContainer.ResumeLayout(false);
    136       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    137       this.tabControl.ResumeLayout(false);
    138       this.parametersTabPage.ResumeLayout(false);
    139       this.visualizationTabPage.ResumeLayout(false);
    140       this.ResumeLayout(false);
     38//    /// <summary>
     39//    /// Required method for Designer support - do not modify
     40//    /// the contents of this method with the code editor.
     41//    /// </summary>
     42//    private void InitializeComponent() {
     43//      this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
     44//      this.parametersTabPage = new System.Windows.Forms.TabPage();
     45//      this.visualizationTabPage = new System.Windows.Forms.TabPage();
     46//      this.orienteeringSolutionView = new HeuristicLab.Problems.Orienteering.Views.OrienteeringSolutionView();
     47//      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
     48//      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
     49//      this.problemInstanceSplitContainer.Panel2.SuspendLayout();
     50//      this.problemInstanceSplitContainer.SuspendLayout();
     51//      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     52//      this.tabControl.SuspendLayout();
     53//      this.parametersTabPage.SuspendLayout();
     54//      this.visualizationTabPage.SuspendLayout();
     55//      this.SuspendLayout();
     56//      //
     57//      // problemInstanceSplitContainer
     58//      //
     59//      //
     60//      // problemInstanceSplitContainer.Panel2
     61//      //
     62//      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.tabControl);
     63//      //
     64//      // parameterCollectionView
     65//      //
     66//      this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
     67//      this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
     68//      this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
     69//      this.parameterCollectionView.Size = new System.Drawing.Size(497, 274);
     70//      //
     71//      // nameTextBox
     72//      //
     73//      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     74//      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
     75//      //
     76//      // tabControl
     77//      //
     78//      this.tabControl.AllowDrop = true;
     79//      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     80//                  | System.Windows.Forms.AnchorStyles.Left)
     81//                  | System.Windows.Forms.AnchorStyles.Right)));
     82//      this.tabControl.Controls.Add(this.parametersTabPage);
     83//      this.tabControl.Controls.Add(this.visualizationTabPage);
     84//      this.tabControl.Location = new System.Drawing.Point(0, 27);
     85//      this.tabControl.Name = "tabControl";
     86//      this.tabControl.SelectedIndex = 0;
     87//      this.tabControl.Size = new System.Drawing.Size(511, 306);
     88//      this.tabControl.TabIndex = 4;
     89//      //
     90//      // parametersTabPage
     91//      //
     92//      this.parametersTabPage.BackColor = System.Drawing.SystemColors.Window;
     93//      this.parametersTabPage.Controls.Add(this.parameterCollectionView);
     94//      this.parametersTabPage.Location = new System.Drawing.Point(4, 22);
     95//      this.parametersTabPage.Name = "parametersTabPage";
     96//      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
     97//      this.parametersTabPage.Size = new System.Drawing.Size(503, 280);
     98//      this.parametersTabPage.TabIndex = 0;
     99//      this.parametersTabPage.Text = "Parameters";
     100//      //
     101//      // visualizationTabPage
     102//      //
     103//      this.visualizationTabPage.BackColor = System.Drawing.SystemColors.Window;
     104//      this.visualizationTabPage.Controls.Add(this.orienteeringSolutionView);
     105//      this.visualizationTabPage.Location = new System.Drawing.Point(4, 22);
     106//      this.visualizationTabPage.Name = "visualizationTabPage";
     107//      this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
     108//      this.visualizationTabPage.Size = new System.Drawing.Size(503, 280);
     109//      this.visualizationTabPage.TabIndex = 1;
     110//      this.visualizationTabPage.Text = "Visualization";
     111//      //
     112//      // orienteeringSolutionView
     113//      //
     114//      this.orienteeringSolutionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     115//                  | System.Windows.Forms.AnchorStyles.Left)
     116//                  | System.Windows.Forms.AnchorStyles.Right)));
     117//      this.orienteeringSolutionView.Caption = "OrienteeringSolution View";
     118//      this.orienteeringSolutionView.Content = null;
     119//      this.orienteeringSolutionView.Location = new System.Drawing.Point(6, 6);
     120//      this.orienteeringSolutionView.Name = "orienteeringSolutionView";
     121//      this.orienteeringSolutionView.ReadOnly = false;
     122//      this.orienteeringSolutionView.Size = new System.Drawing.Size(491, 268);
     123//      this.orienteeringSolutionView.TabIndex = 0;
     124//      //
     125//      // TravelingSalesmanProblemView
     126//      //
     127//      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     128//      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
     129//      this.Name = "OrienteeringProblemView";
     130//      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
     131//      this.problemInstanceSplitContainer.Panel1.PerformLayout();
     132//      this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
     133//      this.problemInstanceSplitContainer.Panel2.PerformLayout();
     134//      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
     135//      this.problemInstanceSplitContainer.ResumeLayout(false);
     136//      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     137//      this.tabControl.ResumeLayout(false);
     138//      this.parametersTabPage.ResumeLayout(false);
     139//      this.visualizationTabPage.ResumeLayout(false);
     140//      this.ResumeLayout(false);
    141141
    142     }
     142//    }
    143143
    144     #endregion
     144//    #endregion
    145145
    146     private HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl;
    147     private System.Windows.Forms.TabPage parametersTabPage;
    148     private System.Windows.Forms.TabPage visualizationTabPage;
    149     private OrienteeringSolutionView orienteeringSolutionView;
    150   }
    151 }
     146//    private HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl;
     147//    private System.Windows.Forms.TabPage parametersTabPage;
     148//    private System.Windows.Forms.TabPage visualizationTabPage;
     149//    private OrienteeringSolutionView orienteeringSolutionView;
     150//  }
     151//}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringProblemView.cs

    r17525 r17953  
    1 #region License Information
    2 /* HeuristicLab
    3  * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    4  *
    5  * This file is part of HeuristicLab.
    6  *
    7  * HeuristicLab is free software: you can redistribute it and/or modify
    8  * it under the terms of the GNU General Public License as published by
    9  * the Free Software Foundation, either version 3 of the License, or
    10  * (at your option) any later version.
    11  *
    12  * HeuristicLab is distributed in the hope that it will be useful,
    13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15  * GNU General Public License for more details.
    16  *
    17  * You should have received a copy of the GNU General Public License
    18  * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    19  */
    20 #endregion
     1//#region License Information
     2///* HeuristicLab
     3// * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4// *
     5// * This file is part of HeuristicLab.
     6// *
     7// * HeuristicLab is free software: you can redistribute it and/or modify
     8// * it under the terms of the GNU General Public License as published by
     9// * the Free Software Foundation, either version 3 of the License, or
     10// * (at your option) any later version.
     11// *
     12// * HeuristicLab is distributed in the hope that it will be useful,
     13// * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15// * GNU General Public License for more details.
     16// *
     17// * You should have received a copy of the GNU General Public License
     18// * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19// */
     20//#endregion
    2121
    22 using System;
    23 using HeuristicLab.MainForm;
    24 using HeuristicLab.Optimization.Views;
     22//TODO: ProblemView - Refactor to new problem view and add visualization
    2523
    26 namespace HeuristicLab.Problems.Orienteering.Views {
    27   [View("Orienteering Problem View")]
    28   [Content(typeof(OrienteeringProblem), true)]
    29   public partial class OrienteeringProblemView : ProblemView {
    30     public new OrienteeringProblem Content {
    31       get { return (OrienteeringProblem)base.Content; }
    32       set { base.Content = value; }
    33     }
     24//using System;
     25//using HeuristicLab.MainForm;
     26//using HeuristicLab.Optimization.Views;
    3427
    35     public OrienteeringProblemView() {
    36       InitializeComponent();
    37     }
     28//namespace HeuristicLab.Problems.Orienteering.Views {
     29//  [View("Orienteering Problem View")]
     30//  [Content(typeof(OrienteeringProblem), true)]
     31//  public partial class OrienteeringProblemView : ProblemView {
     32//    public new OrienteeringProblem Content {
     33//      get { return (OrienteeringProblem)base.Content; }
     34//      set { base.Content = value; }
     35//    }
    3836
    39     protected override void DeregisterContentEvents() {
    40       Content.BestKnownSolutionParameter.ValueChanged -= BestKnownSolutionParameter_ValueChanged;
    41       base.DeregisterContentEvents();
    42     }
    43     protected override void RegisterContentEvents() {
    44       base.RegisterContentEvents();
    45       Content.BestKnownSolutionParameter.ValueChanged += BestKnownSolutionParameter_ValueChanged;
    46     }
     37//    public OrienteeringProblemView() {
     38//      InitializeComponent();
     39//    }
    4740
    48     protected override void OnContentChanged() {
    49       base.OnContentChanged();
    50       if (Content == null) {
    51         orienteeringSolutionView.Content = null;
    52       } else {
    53         orienteeringSolutionView.Content = Content.BestKnownSolution;
    54       }
    55     }
     41//    protected override void DeregisterContentEvents() {
     42//      Content.BestKnownSolutionParameter.ValueChanged -= BestKnownSolutionParameter_ValueChanged;
     43//      base.DeregisterContentEvents();
     44//    }
     45//    protected override void RegisterContentEvents() {
     46//      base.RegisterContentEvents();
     47//      Content.BestKnownSolutionParameter.ValueChanged += BestKnownSolutionParameter_ValueChanged;
     48//    }
    5649
    57     protected override void SetEnabledStateOfControls() {
    58       base.SetEnabledStateOfControls();
    59       orienteeringSolutionView.Enabled = Content != null && !ReadOnly && !Locked;
    60     }
     50//    protected override void OnContentChanged() {
     51//      base.OnContentChanged();
     52//      if (Content == null) {
     53//        orienteeringSolutionView.Content = null;
     54//      } else {
     55//        orienteeringSolutionView.Content = Content.BestKnownSolution;
     56//      }
     57//    }
    6158
    62     private void BestKnownSolutionParameter_ValueChanged(object sender, EventArgs e) {
    63       orienteeringSolutionView.Content = Content.BestKnownSolution;
    64     }
    65   }
    66 }
     59//    protected override void SetEnabledStateOfControls() {
     60//      base.SetEnabledStateOfControls();
     61//      orienteeringSolutionView.Enabled = Content != null && !ReadOnly && !Locked;
     62//    }
     63
     64//    private void BestKnownSolutionParameter_ValueChanged(object sender, EventArgs e) {
     65//      orienteeringSolutionView.Content = Content.BestKnownSolution;
     66//    }
     67//  }
     68//}
Note: See TracChangeset for help on using the changeset viewer.