Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17953 for branches


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
Files:
5 added
17 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Core.Views/3.3/NamedItemView.Designer.cs

    r17226 r17953  
    6767      this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    6868                  | System.Windows.Forms.AnchorStyles.Right)));
    69       this.nameTextBox.Location = new System.Drawing.Point(58, 0);
     69      this.nameTextBox.Location = new System.Drawing.Point(50, 0);
    7070      this.nameTextBox.Name = "nameTextBox";
    71       this.nameTextBox.Size = new System.Drawing.Size(268, 20);
     71      this.nameTextBox.Size = new System.Drawing.Size(274, 20);
    7272      this.nameTextBox.TabIndex = 1;
    7373      this.nameTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.nameTextBox_KeyDown);
  • branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/Interfaces/IParameterizedItem.cs

    r17709 r17953  
    3030  public interface IParameterizedItem : IItem {
    3131    IKeyedItemCollection<string, IParameter> Parameters { get; }
    32     // TODO: Move the following to separate interface, not only paramterized items
    33     // could be collected for run. Mabe ICollectible
     32    // TODO: Move the following to separate interface, not only parameterized items
     33    // could be collected in runs. Maybe ICollectible
    3434    void CollectParameterValues(IDictionary<string, IItem> values);
    3535  }
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj

    r16723 r17953  
    166166      <DependentUpon>ExperimentListView.cs</DependentUpon>
    167167    </Compile>
     168    <Compile Include="ProblemInstanceProvidersControl.cs">
     169      <SubType>UserControl</SubType>
     170    </Compile>
     171    <Compile Include="ProblemInstanceProvidersControl.Designer.cs">
     172      <DependentUpon>ProblemInstanceProvidersControl.cs</DependentUpon>
     173    </Compile>
    168174    <Compile Include="ResultParameterView.cs">
    169175      <SubType>UserControl</SubType>
     
    184190    <Compile Include="ProblemView.Designer.cs">
    185191      <DependentUpon>ProblemView.cs</DependentUpon>
     192    </Compile>
     193    <Compile Include="ResultsProducingItemView.cs">
     194      <SubType>UserControl</SubType>
     195    </Compile>
     196    <Compile Include="ResultsProducingItemView.Designer.cs">
     197      <DependentUpon>ResultsProducingItemView.cs</DependentUpon>
    186198    </Compile>
    187199    <Compile Include="RunCollectionModifierListView.cs">
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/ProblemView.Designer.cs

    r17226 r17953  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.components = new System.ComponentModel.Container();
    4748      this.problemInstanceSplitContainer = new System.Windows.Forms.SplitContainer();
    48       this.libraryLabel = new System.Windows.Forms.Label();
    49       this.problemInstanceProviderComboBox = new System.Windows.Forms.ComboBox();
    50       this.problemInstanceProviderViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    51       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     49      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
     50      this.ContentPanel = new System.Windows.Forms.Panel();
     51      this.namedItemView = new HeuristicLab.Core.Views.NamedItemView();
     52      this.problemInstanceProvidersControl = new HeuristicLab.Optimization.Views.ProblemInstanceProvidersControl();
     53      this.resultsProducingItemView = new HeuristicLab.Optimization.Views.ResultsProducingItemView();
    5254      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
    5355      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
    5456      this.problemInstanceSplitContainer.Panel2.SuspendLayout();
    5557      this.problemInstanceSplitContainer.SuspendLayout();
     58      this.ContentPanel.SuspendLayout();
    5659      this.SuspendLayout();
    57       //
    58       // parameterCollectionView
    59       //
    60       this.parameterCollectionView.Location = new System.Drawing.Point(6, 27);
    61       this.parameterCollectionView.Size = new System.Drawing.Size(501, 303);
    62       //
    63       // nameTextBox
    64       //
    65       this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    66       this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    67       this.nameTextBox.Location = new System.Drawing.Point(47, 1);
    68       this.nameTextBox.Size = new System.Drawing.Size(438, 20);
    69       //
    70       // nameLabel
    71       //
    72       this.nameLabel.Location = new System.Drawing.Point(3, 6);
    73       //
    74       // infoLabel
    75       //
    76       this.infoLabel.Location = new System.Drawing.Point(491, 4);
    7760      //
    7861      // problemInstanceSplitContainer
    7962      //
    80       this.problemInstanceSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    81             | System.Windows.Forms.AnchorStyles.Left)
    82             | System.Windows.Forms.AnchorStyles.Right)));
     63      this.problemInstanceSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
    8364      this.problemInstanceSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
    8465      this.problemInstanceSplitContainer.IsSplitterFixed = true;
     
    8970      // problemInstanceSplitContainer.Panel1
    9071      //
    91       this.problemInstanceSplitContainer.Panel1.Controls.Add(this.libraryLabel);
    92       this.problemInstanceSplitContainer.Panel1.Controls.Add(this.problemInstanceProviderComboBox);
    93       this.problemInstanceSplitContainer.Panel1.Controls.Add(this.problemInstanceProviderViewHost);
     72      this.problemInstanceSplitContainer.Panel1.Controls.Add(this.problemInstanceProvidersControl);
    9473      this.problemInstanceSplitContainer.Panel1MinSize = 10;
    9574      //
    9675      // problemInstanceSplitContainer.Panel2
    9776      //
    98       this.problemInstanceSplitContainer.Panel2.Controls.Add(this.nameLabel);
    99       this.problemInstanceSplitContainer.Panel2.Controls.Add(this.nameTextBox);
    100       this.problemInstanceSplitContainer.Panel2.Controls.Add(this.parameterCollectionView);
    101       this.problemInstanceSplitContainer.Panel2.Controls.Add(this.infoLabel);
    102       this.problemInstanceSplitContainer.Size = new System.Drawing.Size(511, 363);
     77      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.namedItemView);
     78      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.ContentPanel);
     79      this.problemInstanceSplitContainer.Size = new System.Drawing.Size(960, 709);
    10380      this.problemInstanceSplitContainer.SplitterDistance = 26;
    10481      this.problemInstanceSplitContainer.TabIndex = 13;
    10582      //
    106       // libraryLabel
     83      // ContentPanel
    10784      //
    108       this.libraryLabel.AutoSize = true;
    109       this.libraryLabel.Location = new System.Drawing.Point(3, 6);
    110       this.libraryLabel.Name = "libraryLabel";
    111       this.libraryLabel.Size = new System.Drawing.Size(41, 13);
    112       this.libraryLabel.TabIndex = 17;
    113       this.libraryLabel.Text = "Library:";
    114       //
    115       // problemInstanceProviderComboBox
    116       //
    117       this.problemInstanceProviderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    118       this.problemInstanceProviderComboBox.FormattingEnabled = true;
    119       this.problemInstanceProviderComboBox.Location = new System.Drawing.Point(50, 2);
    120       this.problemInstanceProviderComboBox.Name = "problemInstanceProviderComboBox";
    121       this.problemInstanceProviderComboBox.Size = new System.Drawing.Size(208, 21);
    122       this.problemInstanceProviderComboBox.TabIndex = 18;
    123       this.problemInstanceProviderComboBox.SelectedIndexChanged += new System.EventHandler(this.problemInstanceProviderComboBox_SelectedIndexChanged);
    124       //
    125       // problemInstanceProviderViewHost
    126       //
    127       this.problemInstanceProviderViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     85      this.ContentPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    12886            | System.Windows.Forms.AnchorStyles.Left)
    12987            | System.Windows.Forms.AnchorStyles.Right)));
    130       this.problemInstanceProviderViewHost.Caption = "ProblemInstanceConsumerView";
    131       this.problemInstanceProviderViewHost.Content = null;
    132       this.problemInstanceProviderViewHost.Enabled = false;
    133       this.problemInstanceProviderViewHost.Location = new System.Drawing.Point(264, 1);
    134       this.problemInstanceProviderViewHost.Name = "problemInstanceProviderViewHost";
    135       this.problemInstanceProviderViewHost.ReadOnly = false;
    136       this.problemInstanceProviderViewHost.Size = new System.Drawing.Size(247, 23);
    137       this.problemInstanceProviderViewHost.TabIndex = 0;
    138       this.problemInstanceProviderViewHost.ViewsLabelVisible = false;
    139       this.problemInstanceProviderViewHost.ViewType = null;
     88      this.ContentPanel.Controls.Add(this.resultsProducingItemView);
     89      this.ContentPanel.Location = new System.Drawing.Point(0, 33);
     90      this.ContentPanel.Name = "ContentPanel";
     91      this.ContentPanel.Size = new System.Drawing.Size(960, 646);
     92      this.ContentPanel.TabIndex = 2;
     93      //
     94      // namedItemView
     95      //
     96      this.namedItemView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     97            | System.Windows.Forms.AnchorStyles.Right)));
     98      this.namedItemView.Caption = "NamedItem View";
     99      this.namedItemView.Content = null;
     100      this.namedItemView.Location = new System.Drawing.Point(0, 3);
     101      this.namedItemView.Name = "namedItemView";
     102      this.namedItemView.ReadOnly = false;
     103      this.namedItemView.Size = new System.Drawing.Size(960, 21);
     104      this.namedItemView.TabIndex = 1;
     105      //
     106      // problemInstanceProvidersControl
     107      //
     108      this.problemInstanceProvidersControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     109            | System.Windows.Forms.AnchorStyles.Left)
     110            | System.Windows.Forms.AnchorStyles.Right)));
     111      this.problemInstanceProvidersControl.Consumer = null;
     112      this.problemInstanceProvidersControl.Location = new System.Drawing.Point(0, 0);
     113      this.problemInstanceProvidersControl.Margin = new System.Windows.Forms.Padding(0);
     114      this.problemInstanceProvidersControl.Name = "problemInstanceProvidersControl";
     115      this.problemInstanceProvidersControl.Size = new System.Drawing.Size(960, 26);
     116      this.problemInstanceProvidersControl.TabIndex = 0;
     117      //
     118      // resultsProducingItemView
     119      //
     120      this.resultsProducingItemView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     121            | System.Windows.Forms.AnchorStyles.Left)
     122            | System.Windows.Forms.AnchorStyles.Right)));
     123      this.resultsProducingItemView.Caption = "Results Producing Item View";
     124      this.resultsProducingItemView.Content = null;
     125      this.resultsProducingItemView.Location = new System.Drawing.Point(3, 3);
     126      this.resultsProducingItemView.Name = "resultsProducingItemView";
     127      this.resultsProducingItemView.ReadOnly = false;
     128      this.resultsProducingItemView.Size = new System.Drawing.Size(954, 640);
     129      this.resultsProducingItemView.TabIndex = 0;
    140130      //
    141131      // ProblemView
     
    144134      this.Controls.Add(this.problemInstanceSplitContainer);
    145135      this.Name = "ProblemView";
    146       this.Size = new System.Drawing.Size(511, 363);
    147       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     136      this.Size = new System.Drawing.Size(960, 709);
    148137      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
    149       this.problemInstanceSplitContainer.Panel1.PerformLayout();
    150138      this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
    151       this.problemInstanceSplitContainer.Panel2.PerformLayout();
    152139      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
    153140      this.problemInstanceSplitContainer.ResumeLayout(false);
     141      this.ContentPanel.ResumeLayout(false);
    154142      this.ResumeLayout(false);
    155143
     
    158146    #endregion
    159147
     148    protected HeuristicLab.Optimization.Views.ResultsProducingItemView resultsProducingItemView;
    160149    protected System.Windows.Forms.SplitContainer problemInstanceSplitContainer;
    161     protected HeuristicLab.MainForm.WindowsForms.ViewHost problemInstanceProviderViewHost;
    162     protected System.Windows.Forms.Label libraryLabel;
    163     protected System.Windows.Forms.ComboBox problemInstanceProviderComboBox;
     150    private System.Windows.Forms.ToolTip toolTip;
     151    private ProblemInstanceProvidersControl problemInstanceProvidersControl;
     152    private Core.Views.NamedItemView namedItemView;
     153    private System.Windows.Forms.Panel ContentPanel;
    164154  }
    165155}
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/ProblemView.cs

    r17226 r17953  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using HeuristicLab.Core.Views;
    2623using HeuristicLab.MainForm;
     24using HeuristicLab.MainForm.WindowsForms;
    2725using HeuristicLab.Problems.Instances;
    28 using HeuristicLab.Problems.Instances.Views;
    2926
    3027namespace HeuristicLab.Optimization.Views {
     
    3431  [View("Problem View")]
    3532  [Content(typeof(IProblem), true)]
    36   public partial class ProblemView : ParameterizedNamedItemView {
     33  public partial class ProblemView : AsynchronousContentView {
    3734
    3835    public new IProblem Content {
     
    4138    }
    4239
    43     protected IEnumerable<IProblemInstanceProvider> problemInstanceProviders;
    44     public IEnumerable<IProblemInstanceProvider> ProblemInstanceProviders {
    45       get { return new List<IProblemInstanceProvider>(problemInstanceProviders); }
    46     }
    4740
    48     public IProblemInstanceProvider SelectedProvider { get; protected set; }
    4941
    5042    /// <summary>
     
    5547    }
    5648
     49    protected override void RegisterContentEvents() {
     50      base.RegisterContentEvents();
     51      Content.NameChanged += Content_NameChanged;
     52    }
     53
     54    protected override void DeregisterContentEvents() {
     55      Content.NameChanged -= Content_NameChanged;
     56      base.DeregisterContentEvents();
     57    }
     58
    5759    protected override void OnContentChanged() {
    5860      base.OnContentChanged();
    59       if (Content == null) {
    60         problemInstanceProviders = null;
    61         problemInstanceProviderComboBox.DataSource = null;
    62         problemInstanceSplitContainer.Panel1Collapsed = true;
    63       } else {
    64         var consumer = Content as IProblemInstanceConsumer;
    65         if (consumer != null) {
    66           problemInstanceProviders = ProblemInstanceManager.GetProviders(Content);
    67           bool expand = problemInstanceProviders.Any();
    68           if (expand) {
    69             problemInstanceProviderComboBox.DisplayMember = "Name";
    70             problemInstanceProviderComboBox.DataSource = ProblemInstanceProviders.OrderBy(x => x.Name).ToList();
    71           }
    72           problemInstanceSplitContainer.Panel1Collapsed = !expand;
    73         } else
    74           problemInstanceSplitContainer.Panel1Collapsed = true;
    75       }
    76       SetEnabledStateOfControls();
     61      problemInstanceProvidersControl.Consumer = Content as IProblemInstanceConsumer;
     62      namedItemView.Content = Content;
     63      resultsProducingItemView.Content = Content;
     64
     65      if (!problemInstanceProvidersControl.ProvidersAvailable) problemInstanceSplitContainer.Panel1Collapsed = true;
     66      if (Content == null) return;
     67
     68      Caption = Content.Name;
    7769    }
    7870
    79     protected virtual void problemInstanceProviderComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
    80       if (problemInstanceProviderComboBox.SelectedIndex >= 0) {
    81         SelectedProvider = (IProblemInstanceProvider)problemInstanceProviderComboBox.SelectedItem;
    82         problemInstanceProviderViewHost.Content = SelectedProvider;
    83         var view = (ProblemInstanceProviderView)problemInstanceProviderViewHost.ActiveView;
    84         var consumer = (IProblemInstanceConsumer)Content;
    85         view.Consumer = consumer;
    86         if (CheckForIProblemInstanceExporter(consumer))
    87           view.Exporter = (IProblemInstanceExporter)Content;
    88         else view.Exporter = null;
    89         SetTooltip();
    90       } else {
    91         SelectedProvider = null;
     71    protected virtual void Content_NameChanged(object sender, EventArgs e) {
     72      if (InvokeRequired) {
     73        Invoke(new EventHandler(Content_NameChanged), sender, e);
     74        return;
    9275      }
    93       SetEnabledStateOfControls();
     76      Caption = Content.Name;
    9477    }
    9578
    96     protected bool CheckForIProblemInstanceExporter(IProblemInstanceConsumer content) {
    97       return Content.GetType().GetInterfaces()
    98                     .Any(x => x == typeof(IProblemInstanceExporter));
    99     }
    100 
    101     #region ToolTip
    102     protected void SetTooltip() {
    103       toolTip.SetToolTip(problemInstanceProviderComboBox, GetProviderToolTip());
    104     }
    105 
    106     private string GetProviderToolTip() {
    107       var provider = SelectedProvider;
    108       string toolTip = provider.Name;
    109 
    110       if (!String.IsNullOrEmpty(provider.ReferencePublication)) {
    111         toolTip = toolTip
    112             + Environment.NewLine + Environment.NewLine
    113             + provider.ReferencePublication;
    114       }
    115       if (provider.WebLink != null) {
    116         toolTip = toolTip
    117             + Environment.NewLine
    118             + provider.WebLink.ToString();
    119       }
    120 
    121       return toolTip;
    122     }
    123     #endregion
    12479  }
    12580}
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/IProblem.cs

    r17699 r17953  
    3131  /// Interface to represent an optimization problem.
    3232  /// </summary>
    33   public interface IProblem : IParameterizedNamedItem, IStorableContent {
     33  public interface IProblem : IResultsProducingItem, IStorableContent {
    3434    //TODO extract into interface? ResultsProducingItems? Problem and Algorithm
    35     ResultCollection Results { get; }
     35    //ResultCollection Results { get; }
    3636
    3737    event EventHandler Reset;
     
    4141  //TODO move members to generic IProblem after every problem used the new architecture
    4242  //TODO ABE: We can maybe use it as non-generic interface that exports IEncoding Encoding { get; }
    43   //TODO ABE: and which is explicitely implemented in some base class
     43  //TODO ABE: and which is explicitly implemented in some base class
    4444  [StorableType("1dbe48d6-c008-4e40-86ad-c222450a3187")]
    4545  public interface IEncodedProblem : IProblem {
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj

    r17695 r17953  
    164164    <Compile Include="Interfaces\ILocalImprovementAlgorithmOperator.cs" />
    165165    <Compile Include="Interfaces\IMultiObjectiveOperator.cs" />
     166    <Compile Include="Results\IResultsProducingItem.cs" />
    166167    <Compile Include="MultiObjective\CrowdingCalculator.cs" />
    167168    <Compile Include="MultiObjective\DominationCalculator.cs" />
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceProviderViewGeneric.Designer.cs

    r17252 r17953  
    6767      // instancesComboBox
    6868      //
    69       this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     69      this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    7070            | System.Windows.Forms.AnchorStyles.Right)));
    7171      this.instancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    7272      this.instancesComboBox.FormattingEnabled = true;
    73       this.instancesComboBox.Location = new System.Drawing.Point(60, 2);
     73      this.instancesComboBox.ItemHeight = 13;
     74      this.instancesComboBox.Location = new System.Drawing.Point(60, 1);
    7475      this.instancesComboBox.Name = "instancesComboBox";
    7576      this.instancesComboBox.Size = new System.Drawing.Size(540, 21);
     
    113114      this.splitContainer2.Panel2.Controls.Add(this.instanceLabel);
    114115      this.splitContainer2.Panel2.Controls.Add(this.instancesComboBox);
    115       this.splitContainer2.Size = new System.Drawing.Size(632, 23);
     116      this.splitContainer2.Size = new System.Drawing.Size(632, 25);
    116117      this.splitContainer2.SplitterDistance = 25;
    117118      this.splitContainer2.TabIndex = 21;
     
    119120      // exportButton
    120121      //
    121       this.exportButton.Location = new System.Drawing.Point(1, 0);
     122      this.exportButton.Location = new System.Drawing.Point(0, 0);
    122123      this.exportButton.Name = "exportButton";
    123124      this.exportButton.Size = new System.Drawing.Size(24, 24);
     
    125126      this.exportButton.Text = "Export";
    126127      this.exportButton.UseVisualStyleBackColor = true;
    127       this.exportButton.Click += new System.EventHandler(exportButton_Click);
     128      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
    128129      //
    129130      // splitContainer1
    130131      //
    131       this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     132      this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    132133            | System.Windows.Forms.AnchorStyles.Right)));
    133134      this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
    134135      this.splitContainer1.IsSplitterFixed = true;
    135       this.splitContainer1.Location = new System.Drawing.Point(33, -1);
     136      this.splitContainer1.Location = new System.Drawing.Point(30, 0);
    136137      this.splitContainer1.Name = "splitContainer1";
    137138      //
     
    143144      //
    144145      this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
    145       this.splitContainer1.Size = new System.Drawing.Size(661, 23);
     146      this.splitContainer1.Size = new System.Drawing.Size(661, 25);
    146147      this.splitContainer1.SplitterDistance = 25;
    147148      this.splitContainer1.TabIndex = 21;
     
    155156      this.importButton.Text = "Import";
    156157      this.importButton.UseVisualStyleBackColor = true;
    157       this.importButton.Click += new System.EventHandler(importButton_Click);
     158      this.importButton.Click += new System.EventHandler(this.importButton_Click);
    158159      //
    159160      // libraryInfoButton
    160161      //
    161       this.libraryInfoButton.Location = new System.Drawing.Point(3, -1);
     162      this.libraryInfoButton.Location = new System.Drawing.Point(3, 0);
    162163      this.libraryInfoButton.Name = "libraryInfoButton";
    163164      this.libraryInfoButton.Size = new System.Drawing.Size(24, 24);
     
    167168      this.libraryInfoButton.Click += new System.EventHandler(this.libraryInfoButton_Click);
    168169      //
    169       // ProblemInstanceProviderViewGeneric
     170      // ProblemInstanceProviderView
    170171      //
    171172      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    172173      this.Controls.Add(this.libraryInfoButton);
    173174      this.Controls.Add(this.splitContainer1);
    174       this.Name = "ProblemInstanceProviderViewGeneric";
     175      this.Name = "ProblemInstanceProviderView";
     176      this.Size = new System.Drawing.Size(694, 24);
    175177      this.splitContainer2.Panel1.ResumeLayout(false);
    176178      this.splitContainer2.Panel2.ResumeLayout(false);
  • 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//}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/HeuristicLab.Problems.QuadraticAssignment.Views-3.3.csproj

    r16723 r17953  
    131131      <DependentUpon>QAPVisualizationControl.cs</DependentUpon>
    132132    </Compile>
    133     <Compile Include="QuadraticAssignmentProblemView.cs">
    134       <SubType>UserControl</SubType>
    135     </Compile>
     133    <Compile Include="QuadraticAssignmentProblemView.cs" />
    136134    <Compile Include="QuadraticAssignmentProblemView.Designer.cs">
    137135      <DependentUpon>QuadraticAssignmentProblemView.cs</DependentUpon>
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.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.QuadraticAssignment.Views {
    23   partial class QuadraticAssignmentProblemView {
    24     /// <summary>
    25     /// Required designer variable.
    26     /// </summary>
    27     private System.ComponentModel.IContainer components = null;
     22//namespace HeuristicLab.Problems.QuadraticAssignment.Views {
     23//  partial class QuadraticAssignmentProblemView {
     24//    /// <summary>
     25//    /// Required designer variable.
     26//    /// </summary>
     27//    private System.ComponentModel.IContainer components = null;
    2828
    29     /// <summary>
    30     /// Clean up any resources being used.
    31     /// </summary>
    32     /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    33     protected override void Dispose(bool disposing) {
    34       if (disposing && (components != null)) {
    35         components.Dispose();
    36       }
    37       base.Dispose(disposing);
    38     }
     29//    /// <summary>
     30//    /// Clean up any resources being used.
     31//    /// </summary>
     32//    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
     33//    protected override void Dispose(bool disposing) {
     34//      if (disposing && (components != null)) {
     35//        components.Dispose();
     36//      }
     37//      base.Dispose(disposing);
     38//    }
    3939
    40     #region Component Designer generated code
     40//    #region Component Designer generated code
    4141
    42     /// <summary>
    43     /// Required method for Designer support - do not modify
    44     /// the contents of this method with the code editor.
    45     /// </summary>
    46     private void InitializeComponent() {
    47       this.tabControl = new System.Windows.Forms.TabControl();
    48       this.problemTabPage = new System.Windows.Forms.TabPage();
    49       this.visualizationTabPage = new System.Windows.Forms.TabPage();
    50       this.qapView = new HeuristicLab.Problems.QuadraticAssignment.Views.QAPVisualizationControl();
    51       ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
    52       this.problemInstanceSplitContainer.Panel1.SuspendLayout();
    53       this.problemInstanceSplitContainer.Panel2.SuspendLayout();
    54       this.problemInstanceSplitContainer.SuspendLayout();
    55       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    56       this.tabControl.SuspendLayout();
    57       this.problemTabPage.SuspendLayout();
    58       this.visualizationTabPage.SuspendLayout();
    59       this.SuspendLayout();
    60       //
    61       // problemInstanceSplitContainer
    62       //
    63       //
    64       // problemInstanceSplitContainer.Panel2
    65       //
    66       this.problemInstanceSplitContainer.Panel2.Controls.Add(this.tabControl);
    67       //
    68       // parameterCollectionView
    69       //
    70       this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
    71       this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
    72       this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
    73       this.parameterCollectionView.Size = new System.Drawing.Size(497, 274);
    74       //
    75       // nameTextBox
    76       //
    77       this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    78       this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    79       //
    80       // tabControl
    81       //
    82       this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    83             | System.Windows.Forms.AnchorStyles.Left)
    84             | System.Windows.Forms.AnchorStyles.Right)));
    85       this.tabControl.Controls.Add(this.problemTabPage);
    86       this.tabControl.Controls.Add(this.visualizationTabPage);
    87       this.tabControl.Location = new System.Drawing.Point(0, 27);
    88       this.tabControl.Name = "tabControl";
    89       this.tabControl.SelectedIndex = 0;
    90       this.tabControl.Size = new System.Drawing.Size(511, 306);
    91       this.tabControl.TabIndex = 8;
    92       //
    93       // problemTabPage
    94       //
    95       this.problemTabPage.BackColor = System.Drawing.SystemColors.Window;
    96       this.problemTabPage.Controls.Add(this.parameterCollectionView);
    97       this.problemTabPage.Location = new System.Drawing.Point(4, 22);
    98       this.problemTabPage.Name = "problemTabPage";
    99       this.problemTabPage.Padding = new System.Windows.Forms.Padding(3);
    100       this.problemTabPage.Size = new System.Drawing.Size(503, 280);
    101       this.problemTabPage.TabIndex = 0;
    102       this.problemTabPage.Text = "Problem";
    103       //
    104       // visualizationTabPage
    105       //
    106       this.visualizationTabPage.BackColor = System.Drawing.SystemColors.Window;
    107       this.visualizationTabPage.Controls.Add(this.qapView);
    108       this.visualizationTabPage.Location = new System.Drawing.Point(4, 22);
    109       this.visualizationTabPage.Name = "visualizationTabPage";
    110       this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
    111       this.visualizationTabPage.Size = new System.Drawing.Size(503, 280);
    112       this.visualizationTabPage.TabIndex = 1;
    113       this.visualizationTabPage.Text = "Visualization";
    114       //
    115       // qapView
    116       //
    117       this.qapView.Assignment = null;
    118       this.qapView.Distances = null;
    119       this.qapView.Dock = System.Windows.Forms.DockStyle.Fill;
    120       this.qapView.Location = new System.Drawing.Point(3, 3);
    121       this.qapView.Name = "qapView";
    122       this.qapView.Size = new System.Drawing.Size(497, 274);
    123       this.qapView.TabIndex = 0;
    124       this.qapView.Weights = null;
    125       //
    126       // QuadraticAssignmentProblemView
    127       //
    128       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    129       this.Name = "QuadraticAssignmentProblemView";
    130       this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
    131       this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
    132       this.problemInstanceSplitContainer.Panel2.PerformLayout();
    133       ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
    134       this.problemInstanceSplitContainer.ResumeLayout(false);
    135       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    136       this.tabControl.ResumeLayout(false);
    137       this.problemTabPage.ResumeLayout(false);
    138       this.visualizationTabPage.ResumeLayout(false);
    139       this.ResumeLayout(false);
     42//    /// <summary>
     43//    /// Required method for Designer support - do not modify
     44//    /// the contents of this method with the code editor.
     45//    /// </summary>
     46//    private void InitializeComponent() {
     47//      this.tabControl = new System.Windows.Forms.TabControl();
     48//      this.problemTabPage = new System.Windows.Forms.TabPage();
     49//      this.visualizationTabPage = new System.Windows.Forms.TabPage();
     50//      this.qapView = new HeuristicLab.Problems.QuadraticAssignment.Views.QAPVisualizationControl();
     51//      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
     52//      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
     53//      this.problemInstanceSplitContainer.Panel2.SuspendLayout();
     54//      this.problemInstanceSplitContainer.SuspendLayout();
     55//      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     56//      this.tabControl.SuspendLayout();
     57//      this.problemTabPage.SuspendLayout();
     58//      this.visualizationTabPage.SuspendLayout();
     59//      this.SuspendLayout();
     60//      //
     61//      // problemInstanceSplitContainer
     62//      //
     63//      //
     64//      // problemInstanceSplitContainer.Panel2
     65//      //
     66//      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.tabControl);
     67//      //
     68//      // parameterCollectionView
     69//      //
     70//      this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
     71//      this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
     72//      this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
     73//      this.parameterCollectionView.Size = new System.Drawing.Size(497, 274);
     74//      //
     75//      // nameTextBox
     76//      //
     77//      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     78//      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
     79//      //
     80//      // tabControl
     81//      //
     82//      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     83//            | System.Windows.Forms.AnchorStyles.Left)
     84//            | System.Windows.Forms.AnchorStyles.Right)));
     85//      this.tabControl.Controls.Add(this.problemTabPage);
     86//      this.tabControl.Controls.Add(this.visualizationTabPage);
     87//      this.tabControl.Location = new System.Drawing.Point(0, 27);
     88//      this.tabControl.Name = "tabControl";
     89//      this.tabControl.SelectedIndex = 0;
     90//      this.tabControl.Size = new System.Drawing.Size(511, 306);
     91//      this.tabControl.TabIndex = 8;
     92//      //
     93//      // problemTabPage
     94//      //
     95//      this.problemTabPage.BackColor = System.Drawing.SystemColors.Window;
     96//      this.problemTabPage.Controls.Add(this.parameterCollectionView);
     97//      this.problemTabPage.Location = new System.Drawing.Point(4, 22);
     98//      this.problemTabPage.Name = "problemTabPage";
     99//      this.problemTabPage.Padding = new System.Windows.Forms.Padding(3);
     100//      this.problemTabPage.Size = new System.Drawing.Size(503, 280);
     101//      this.problemTabPage.TabIndex = 0;
     102//      this.problemTabPage.Text = "Problem";
     103//      //
     104//      // visualizationTabPage
     105//      //
     106//      this.visualizationTabPage.BackColor = System.Drawing.SystemColors.Window;
     107//      this.visualizationTabPage.Controls.Add(this.qapView);
     108//      this.visualizationTabPage.Location = new System.Drawing.Point(4, 22);
     109//      this.visualizationTabPage.Name = "visualizationTabPage";
     110//      this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
     111//      this.visualizationTabPage.Size = new System.Drawing.Size(503, 280);
     112//      this.visualizationTabPage.TabIndex = 1;
     113//      this.visualizationTabPage.Text = "Visualization";
     114//      //
     115//      // qapView
     116//      //
     117//      this.qapView.Assignment = null;
     118//      this.qapView.Distances = null;
     119//      this.qapView.Dock = System.Windows.Forms.DockStyle.Fill;
     120//      this.qapView.Location = new System.Drawing.Point(3, 3);
     121//      this.qapView.Name = "qapView";
     122//      this.qapView.Size = new System.Drawing.Size(497, 274);
     123//      this.qapView.TabIndex = 0;
     124//      this.qapView.Weights = null;
     125//      //
     126//      // QuadraticAssignmentProblemView
     127//      //
     128//      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
     129//      this.Name = "QuadraticAssignmentProblemView";
     130//      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
     131//      this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
     132//      this.problemInstanceSplitContainer.Panel2.PerformLayout();
     133//      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
     134//      this.problemInstanceSplitContainer.ResumeLayout(false);
     135//      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     136//      this.tabControl.ResumeLayout(false);
     137//      this.problemTabPage.ResumeLayout(false);
     138//      this.visualizationTabPage.ResumeLayout(false);
     139//      this.ResumeLayout(false);
    140140
    141     }
     141//    }
    142142
    143     #endregion
     143//    #endregion
    144144
    145     private System.Windows.Forms.TabControl tabControl;
    146     private System.Windows.Forms.TabPage problemTabPage;
    147     private System.Windows.Forms.TabPage visualizationTabPage;
    148     private QAPVisualizationControl qapView;
    149   }
    150 }
     145//    private System.Windows.Forms.TabControl tabControl;
     146//    private System.Windows.Forms.TabPage problemTabPage;
     147//    private System.Windows.Forms.TabPage visualizationTabPage;
     148//    private QAPVisualizationControl qapView;
     149//  }
     150//}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.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 using System;
    23 using System.Windows.Forms;
    24 using HeuristicLab.MainForm;
    25 using HeuristicLab.MainForm.WindowsForms;
    26 using HeuristicLab.Optimization.Views;
     22//TODO: ProblemView - Refactor to new problem view and add visualization
    2723
    28 namespace HeuristicLab.Problems.QuadraticAssignment.Views {
    29   [View("Quadratic Assignment Problem View")]
    30   [Content(typeof(QuadraticAssignmentProblem), IsDefaultView = true)]
    31   public sealed partial class QuadraticAssignmentProblemView : ProblemView {
    32     public new QuadraticAssignmentProblem Content {
    33       get { return (QuadraticAssignmentProblem)base.Content; }
    34       set { base.Content = value; }
    35     }
     24//using System;
     25//using System.Windows.Forms;
     26//using HeuristicLab.MainForm;
     27//using HeuristicLab.MainForm.WindowsForms;
     28//using HeuristicLab.Optimization.Views;
    3629
    37     public QuadraticAssignmentProblemView() {
    38       InitializeComponent();
    39     }
     30//namespace HeuristicLab.Problems.QuadraticAssignment.Views {
     31//  [View("Quadratic Assignment Problem View")]
     32//  [Content(typeof(QuadraticAssignmentProblem), IsDefaultView = true)]
     33//  public sealed partial class QuadraticAssignmentProblemView : ProblemView {
     34//    public new QuadraticAssignmentProblem Content {
     35//      get { return (QuadraticAssignmentProblem)base.Content; }
     36//      set { base.Content = value; }
     37//    }
    4038
    41     protected override void RegisterContentEvents() {
    42       base.RegisterContentEvents();
    43       Content.DistancesParameter.ValueChanged += new EventHandler(DistanceMatrixParameter_ValueChanged);
    44       Content.WeightsParameter.ValueChanged += new EventHandler(WeightsParameter_ValueChanged);
    45       Content.BestKnownSolutionParameter.ValueChanged += new EventHandler(BestKnownSolutionParameter_ValueChanged);
    46     }
     39//    public QuadraticAssignmentProblemView() {
     40//      InitializeComponent();
     41//    }
    4742
    48     protected override void DeregisterContentEvents() {
    49       Content.DistancesParameter.ValueChanged -= new EventHandler(DistanceMatrixParameter_ValueChanged);
    50       Content.WeightsParameter.ValueChanged -= new EventHandler(WeightsParameter_ValueChanged);
    51       Content.BestKnownSolutionParameter.ValueChanged -= new EventHandler(BestKnownSolutionParameter_ValueChanged);
    52       base.DeregisterContentEvents();
    53     }
     43//    protected override void RegisterContentEvents() {
     44//      base.RegisterContentEvents();
     45//      Content.DistancesParameter.ValueChanged += new EventHandler(DistanceMatrixParameter_ValueChanged);
     46//      Content.WeightsParameter.ValueChanged += new EventHandler(WeightsParameter_ValueChanged);
     47//      Content.BestKnownSolutionParameter.ValueChanged += new EventHandler(BestKnownSolutionParameter_ValueChanged);
     48//    }
    5449
    55     private void DistanceMatrixParameter_ValueChanged(object sender, EventArgs e) {
    56       qapView.Distances = Content.Distances;
    57     }
     50//    protected override void DeregisterContentEvents() {
     51//      Content.DistancesParameter.ValueChanged -= new EventHandler(DistanceMatrixParameter_ValueChanged);
     52//      Content.WeightsParameter.ValueChanged -= new EventHandler(WeightsParameter_ValueChanged);
     53//      Content.BestKnownSolutionParameter.ValueChanged -= new EventHandler(BestKnownSolutionParameter_ValueChanged);
     54//      base.DeregisterContentEvents();
     55//    }
    5856
    59     private void WeightsParameter_ValueChanged(object sender, EventArgs e) {
    60       qapView.Weights = Content.Weights;
    61     }
     57//    private void DistanceMatrixParameter_ValueChanged(object sender, EventArgs e) {
     58//      qapView.Distances = Content.Distances;
     59//    }
    6260
    63     private void BestKnownSolutionParameter_ValueChanged(object sender, EventArgs e) {
    64       qapView.Assignment = Content.BestKnownSolution;
    65     }
     61//    private void WeightsParameter_ValueChanged(object sender, EventArgs e) {
     62//      qapView.Weights = Content.Weights;
     63//    }
    6664
    67     protected override void OnContentChanged() {
    68       base.OnContentChanged();
    69       if (Content != null) {
    70         qapView.Distances = Content.Distances;
    71         qapView.Weights = Content.Weights;
    72         qapView.Assignment = Content.BestKnownSolution;
    73       } else {
    74         qapView.Distances = null;
    75         qapView.Weights = null;
    76         qapView.Assignment = null;
    77       }
    78     }
    79   }
    80 }
     65//    private void BestKnownSolutionParameter_ValueChanged(object sender, EventArgs e) {
     66//      qapView.Assignment = Content.BestKnownSolution;
     67//    }
     68
     69//    protected override void OnContentChanged() {
     70//      base.OnContentChanged();
     71//      if (Content != null) {
     72//        qapView.Distances = Content.Distances;
     73//        qapView.Weights = Content.Weights;
     74//        qapView.Assignment = Content.BestKnownSolution;
     75//      } else {
     76//        qapView.Distances = null;
     77//        qapView.Weights = null;
     78//        qapView.Assignment = null;
     79//      }
     80//    }
     81//  }
     82//}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Scheduling.Views/3.3/HeuristicLab.Problems.Scheduling.Views-3.3.csproj

    r17680 r17953  
    116116  </ItemGroup>
    117117  <ItemGroup>
    118     <Compile Include="JobShopSchedulingProblemView.cs">
    119       <SubType>UserControl</SubType>
    120     </Compile>
     118    <Compile Include="JobShopSchedulingProblemView.cs" />
    121119    <Compile Include="JobShopSchedulingProblemView.Designer.cs">
    122120      <DependentUpon>JobShopSchedulingProblemView.cs</DependentUpon>
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Scheduling.Views/3.3/JobShopSchedulingProblemView.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 using HeuristicLab.Encodings.ScheduleEncoding.Views;
    23 namespace HeuristicLab.Problems.Scheduling.Views {
    24   partial class JobShopSchedulingProblemView {
    25     /// <summary>
    26     /// Required designer variable.
    27     /// </summary>
    28     private System.ComponentModel.IContainer components = null;
     22//using HeuristicLab.Encodings.ScheduleEncoding.Views;
     23//namespace HeuristicLab.Problems.Scheduling.Views {
     24//  partial class JobShopSchedulingProblemView {
     25//    /// <summary>
     26//    /// Required designer variable.
     27//    /// </summary>
     28//    private System.ComponentModel.IContainer components = null;
    2929
    30     /// <summary>
    31     /// Clean up any resources being used.
    32     /// </summary>
    33     /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    34     protected override void Dispose(bool disposing) {
    35       if (disposing && (components != null)) {
    36         components.Dispose();
    37       }
    38       base.Dispose(disposing);
    39     }
     30//    /// <summary>
     31//    /// Clean up any resources being used.
     32//    /// </summary>
     33//    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
     34//    protected override void Dispose(bool disposing) {
     35//      if (disposing && (components != null)) {
     36//        components.Dispose();
     37//      }
     38//      base.Dispose(disposing);
     39//    }
    4040
    41     #region Component Designer generated code
     41//    #region Component Designer generated code
    4242
    43     /// <summary>
    44     /// Required method for Designer support - do not modify
    45     /// the contents of this method with the code editor.
    46     /// </summary>
    47     private void InitializeComponent() {
    48       this.problemTabControl = new System.Windows.Forms.TabControl();
    49       this.problemTabPage = new System.Windows.Forms.TabPage();
    50       this.visualizationTabPage = new System.Windows.Forms.TabPage();
    51       this.ganttChart = new HeuristicLab.Encodings.ScheduleEncoding.Views.GanttChart();
    52       ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
    53       this.problemInstanceSplitContainer.Panel1.SuspendLayout();
    54       this.problemInstanceSplitContainer.Panel2.SuspendLayout();
    55       this.problemInstanceSplitContainer.SuspendLayout();
    56       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    57       this.problemTabControl.SuspendLayout();
    58       this.problemTabPage.SuspendLayout();
    59       this.visualizationTabPage.SuspendLayout();
    60       this.SuspendLayout();
    61       //
    62       // problemInstanceSplitContainer.Panel2
    63       //
    64       this.problemInstanceSplitContainer.Panel2.Controls.Add(this.problemTabControl);
    65       //
    66       // parameterCollectionView
    67       //
    68       this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
    69       this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
    70       this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
    71       this.parameterCollectionView.Size = new System.Drawing.Size(491, 271);
    72       //
    73       // nameTextBox
    74       //
    75       this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    76       this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    77       this.nameTextBox.Size = new System.Drawing.Size(439, 20);
    78       //
    79       // infoLabel
    80       //
    81       this.infoLabel.Location = new System.Drawing.Point(492, 3);
    82       //
    83       // problemTabControl
    84       //
    85       this.problemTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    86             | System.Windows.Forms.AnchorStyles.Left)
    87             | System.Windows.Forms.AnchorStyles.Right)));
    88       this.problemTabControl.Controls.Add(this.problemTabPage);
    89       this.problemTabControl.Controls.Add(this.visualizationTabPage);
    90       this.problemTabControl.Location = new System.Drawing.Point(3, 27);
    91       this.problemTabControl.Name = "problemTabControl";
    92       this.problemTabControl.SelectedIndex = 0;
    93       this.problemTabControl.Size = new System.Drawing.Size(505, 303);
    94       this.problemTabControl.TabIndex = 5;
    95       //
    96       // problemTabPage
    97       //
    98       this.problemTabPage.BackColor = System.Drawing.SystemColors.Window;
    99       this.problemTabPage.Controls.Add(this.parameterCollectionView);
    100       this.problemTabPage.Location = new System.Drawing.Point(4, 22);
    101       this.problemTabPage.Name = "problemTabPage";
    102       this.problemTabPage.Padding = new System.Windows.Forms.Padding(3);
    103       this.problemTabPage.Size = new System.Drawing.Size(497, 277);
    104       this.problemTabPage.TabIndex = 0;
    105       this.problemTabPage.Text = "Problem";
    106       //
    107       // visualizationTabPage
    108       //
    109       this.visualizationTabPage.BackColor = System.Drawing.SystemColors.Window;
    110       this.visualizationTabPage.Controls.Add(this.ganttChart);
    111       this.visualizationTabPage.Location = new System.Drawing.Point(4, 22);
    112       this.visualizationTabPage.Name = "visualizationTabPage";
    113       this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
    114       this.visualizationTabPage.Size = new System.Drawing.Size(497, 277);
    115       this.visualizationTabPage.TabIndex = 1;
    116       this.visualizationTabPage.Text = "Visualization";
    117       //
    118       // ganttChart
    119       //
    120       this.ganttChart.Dock = System.Windows.Forms.DockStyle.Fill;
    121       this.ganttChart.Location = new System.Drawing.Point(3, 3);
    122       this.ganttChart.Name = "ganttChart";
    123       this.ganttChart.Size = new System.Drawing.Size(491, 271);
    124       this.ganttChart.TabIndex = 0;
    125       //
    126       // JobShopSchedulingProblemView
    127       //
    128       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    129       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    130       this.Name = "JobShopSchedulingProblemView";
    131       this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
    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.problemTabControl.ResumeLayout(false);
    138       this.problemTabPage.ResumeLayout(false);
    139       this.visualizationTabPage.ResumeLayout(false);
    140       this.ResumeLayout(false);
     43//    /// <summary>
     44//    /// Required method for Designer support - do not modify
     45//    /// the contents of this method with the code editor.
     46//    /// </summary>
     47//    private void InitializeComponent() {
     48//      this.problemTabControl = new System.Windows.Forms.TabControl();
     49//      this.problemTabPage = new System.Windows.Forms.TabPage();
     50//      this.visualizationTabPage = new System.Windows.Forms.TabPage();
     51//      this.ganttChart = new HeuristicLab.Encodings.ScheduleEncoding.Views.GanttChart();
     52//      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
     53//      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
     54//      this.problemInstanceSplitContainer.Panel2.SuspendLayout();
     55//      this.problemInstanceSplitContainer.SuspendLayout();
     56//      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     57//      this.problemTabControl.SuspendLayout();
     58//      this.problemTabPage.SuspendLayout();
     59//      this.visualizationTabPage.SuspendLayout();
     60//      this.SuspendLayout();
     61//      //
     62//      // problemInstanceSplitContainer.Panel2
     63//      //
     64//      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.problemTabControl);
     65//      //
     66//      // parameterCollectionView
     67//      //
     68//      this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
     69//      this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
     70//      this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
     71//      this.parameterCollectionView.Size = new System.Drawing.Size(491, 271);
     72//      //
     73//      // nameTextBox
     74//      //
     75//      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     76//      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
     77//      this.nameTextBox.Size = new System.Drawing.Size(439, 20);
     78//      //
     79//      // infoLabel
     80//      //
     81//      this.infoLabel.Location = new System.Drawing.Point(492, 3);
     82//      //
     83//      // problemTabControl
     84//      //
     85//      this.problemTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     86//            | System.Windows.Forms.AnchorStyles.Left)
     87//            | System.Windows.Forms.AnchorStyles.Right)));
     88//      this.problemTabControl.Controls.Add(this.problemTabPage);
     89//      this.problemTabControl.Controls.Add(this.visualizationTabPage);
     90//      this.problemTabControl.Location = new System.Drawing.Point(3, 27);
     91//      this.problemTabControl.Name = "problemTabControl";
     92//      this.problemTabControl.SelectedIndex = 0;
     93//      this.problemTabControl.Size = new System.Drawing.Size(505, 303);
     94//      this.problemTabControl.TabIndex = 5;
     95//      //
     96//      // problemTabPage
     97//      //
     98//      this.problemTabPage.BackColor = System.Drawing.SystemColors.Window;
     99//      this.problemTabPage.Controls.Add(this.parameterCollectionView);
     100//      this.problemTabPage.Location = new System.Drawing.Point(4, 22);
     101//      this.problemTabPage.Name = "problemTabPage";
     102//      this.problemTabPage.Padding = new System.Windows.Forms.Padding(3);
     103//      this.problemTabPage.Size = new System.Drawing.Size(497, 277);
     104//      this.problemTabPage.TabIndex = 0;
     105//      this.problemTabPage.Text = "Problem";
     106//      //
     107//      // visualizationTabPage
     108//      //
     109//      this.visualizationTabPage.BackColor = System.Drawing.SystemColors.Window;
     110//      this.visualizationTabPage.Controls.Add(this.ganttChart);
     111//      this.visualizationTabPage.Location = new System.Drawing.Point(4, 22);
     112//      this.visualizationTabPage.Name = "visualizationTabPage";
     113//      this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
     114//      this.visualizationTabPage.Size = new System.Drawing.Size(497, 277);
     115//      this.visualizationTabPage.TabIndex = 1;
     116//      this.visualizationTabPage.Text = "Visualization";
     117//      //
     118//      // ganttChart
     119//      //
     120//      this.ganttChart.Dock = System.Windows.Forms.DockStyle.Fill;
     121//      this.ganttChart.Location = new System.Drawing.Point(3, 3);
     122//      this.ganttChart.Name = "ganttChart";
     123//      this.ganttChart.Size = new System.Drawing.Size(491, 271);
     124//      this.ganttChart.TabIndex = 0;
     125//      //
     126//      // JobShopSchedulingProblemView
     127//      //
     128//      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     129//      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     130//      this.Name = "JobShopSchedulingProblemView";
     131//      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
     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.problemTabControl.ResumeLayout(false);
     138//      this.problemTabPage.ResumeLayout(false);
     139//      this.visualizationTabPage.ResumeLayout(false);
     140//      this.ResumeLayout(false);
    141141
    142     }
     142//    }
    143143
    144     #endregion
     144//    #endregion
    145145
    146     private System.Windows.Forms.TabControl problemTabControl;
    147     private System.Windows.Forms.TabPage problemTabPage;
    148     private System.Windows.Forms.TabPage visualizationTabPage;
    149     private GanttChart ganttChart;
    150   }
    151 }
     146//    private System.Windows.Forms.TabControl problemTabControl;
     147//    private System.Windows.Forms.TabPage problemTabPage;
     148//    private System.Windows.Forms.TabPage visualizationTabPage;
     149//    private GanttChart ganttChart;
     150//  }
     151//}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Scheduling.Views/3.3/JobShopSchedulingProblemView.cs

    r17461 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 System.Windows.Forms;
    24 using HeuristicLab.Collections;
    25 using HeuristicLab.Encodings.ScheduleEncoding;
    26 using HeuristicLab.MainForm;
    27 using HeuristicLab.Optimization.Views;
     22//TODO: ProblemView - Refactor to new problem view and add visualization
    2823
    29 namespace HeuristicLab.Problems.Scheduling.Views {
    30   [View("JobShop Scheduling Problem View")]
    31   [Content(typeof(JobShopSchedulingProblem), true)]
    32   public partial class JobShopSchedulingProblemView : ProblemView {
     24//using System;
     25//using System.Windows.Forms;
     26//using HeuristicLab.Collections;
     27//using HeuristicLab.Encodings.ScheduleEncoding;
     28//using HeuristicLab.MainForm;
     29//using HeuristicLab.Optimization.Views;
    3330
    34     public new JobShopSchedulingProblem Content {
    35       get { return (JobShopSchedulingProblem)base.Content; }
    36       set { base.Content = value; }
    37     }
     31//namespace HeuristicLab.Problems.Scheduling.Views {
     32//  [View("JobShop Scheduling Problem View")]
     33//  [Content(typeof(JobShopSchedulingProblem), true)]
     34//  public partial class JobShopSchedulingProblemView : ProblemView {
    3835
    39     public JobShopSchedulingProblemView() {
    40       InitializeComponent();
    41       Controls.Remove(parameterCollectionView);
    42       parameterCollectionView.Dock = DockStyle.Fill;
    43       problemTabPage.Controls.Add(parameterCollectionView);
    44     }
     36//    public new JobShopSchedulingProblem Content {
     37//      get { return (JobShopSchedulingProblem)base.Content; }
     38//      set { base.Content = value; }
     39//    }
    4540
    46     protected override void OnContentChanged() {
    47       base.OnContentChanged();
    48       FillGanttChart();
    49     }
     41//    public JobShopSchedulingProblemView() {
     42//      InitializeComponent();
     43//      Controls.Remove(parameterCollectionView);
     44//      parameterCollectionView.Dock = DockStyle.Fill;
     45//      problemTabPage.Controls.Add(parameterCollectionView);
     46//    }
    5047
    51     protected override void DeregisterContentEvents() {
    52       Content.JobDataParameter.ValueChanged -= JobDataParameterOnValueChanged;
    53       Content.JobData.ItemsAdded -= JobsOnChanged;
    54       Content.JobData.ItemsRemoved -= JobsOnRemoved;
    55       Content.JobData.ItemsReplaced -= JobsOnChanged;
    56       Content.JobData.CollectionReset -= JobsOnChanged;
    57       foreach (var job in Content.JobData) {
    58         job.TasksChanged -= JobOnTasksChanged;
    59       }
    60       base.DeregisterContentEvents();
    61     }
    62     protected override void RegisterContentEvents() {
    63       base.RegisterContentEvents();
    64       Content.JobDataParameter.ValueChanged += JobDataParameterOnValueChanged;
    65       Content.JobData.ItemsAdded += JobsOnChanged;
    66       Content.JobData.ItemsRemoved += JobsOnRemoved;
    67       Content.JobData.ItemsReplaced += JobsOnChanged;
    68       Content.JobData.CollectionReset += JobsOnChanged;
    69       foreach (var job in Content.JobData) {
    70         job.TasksChanged += JobOnTasksChanged;
    71       }
    72     }
     48//    protected override void OnContentChanged() {
     49//      base.OnContentChanged();
     50//      FillGanttChart();
     51//    }
    7352
    74     private void JobsOnChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<Job>> e) {
    75       foreach (var job in e.OldItems)
    76         job.Value.TasksChanged -= JobOnTasksChanged;
    77       foreach (var job in e.Items)
    78         job.Value.TasksChanged += JobOnTasksChanged;
    79       FillGanttChart();
    80     }
     53//    protected override void DeregisterContentEvents() {
     54//      Content.JobDataParameter.ValueChanged -= JobDataParameterOnValueChanged;
     55//      Content.JobData.ItemsAdded -= JobsOnChanged;
     56//      Content.JobData.ItemsRemoved -= JobsOnRemoved;
     57//      Content.JobData.ItemsReplaced -= JobsOnChanged;
     58//      Content.JobData.CollectionReset -= JobsOnChanged;
     59//      foreach (var job in Content.JobData) {
     60//        job.TasksChanged -= JobOnTasksChanged;
     61//      }
     62//      base.DeregisterContentEvents();
     63//    }
     64//    protected override void RegisterContentEvents() {
     65//      base.RegisterContentEvents();
     66//      Content.JobDataParameter.ValueChanged += JobDataParameterOnValueChanged;
     67//      Content.JobData.ItemsAdded += JobsOnChanged;
     68//      Content.JobData.ItemsRemoved += JobsOnRemoved;
     69//      Content.JobData.ItemsReplaced += JobsOnChanged;
     70//      Content.JobData.CollectionReset += JobsOnChanged;
     71//      foreach (var job in Content.JobData) {
     72//        job.TasksChanged += JobOnTasksChanged;
     73//      }
     74//    }
    8175
    82     private void JobsOnRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<Job>> e) {
    83       foreach (var job in e.Items)
    84         job.Value.TasksChanged -= JobOnTasksChanged;
    85       FillGanttChart();
    86     }
     76//    private void JobsOnChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<Job>> e) {
     77//      foreach (var job in e.OldItems)
     78//        job.Value.TasksChanged -= JobOnTasksChanged;
     79//      foreach (var job in e.Items)
     80//        job.Value.TasksChanged += JobOnTasksChanged;
     81//      FillGanttChart();
     82//    }
    8783
    88     private void JobDataParameterOnValueChanged(object sender, EventArgs e) {
    89       Content.JobData.ItemsAdded += JobsOnChanged;
    90       Content.JobData.ItemsRemoved += JobsOnRemoved;
    91       Content.JobData.ItemsReplaced += JobsOnChanged;
    92       Content.JobData.CollectionReset += JobsOnChanged;
    93       foreach (var job in Content.JobData) {
    94         job.TasksChanged += JobOnTasksChanged;
    95       }
    96       FillGanttChart();
    97     }
     84//    private void JobsOnRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<Job>> e) {
     85//      foreach (var job in e.Items)
     86//        job.Value.TasksChanged -= JobOnTasksChanged;
     87//      FillGanttChart();
     88//    }
    9889
    99     private void JobOnTasksChanged(object sender, EventArgs e) {
    100       FillGanttChart();
    101     }
     90//    private void JobDataParameterOnValueChanged(object sender, EventArgs e) {
     91//      Content.JobData.ItemsAdded += JobsOnChanged;
     92//      Content.JobData.ItemsRemoved += JobsOnRemoved;
     93//      Content.JobData.ItemsReplaced += JobsOnChanged;
     94//      Content.JobData.CollectionReset += JobsOnChanged;
     95//      foreach (var job in Content.JobData) {
     96//        job.TasksChanged += JobOnTasksChanged;
     97//      }
     98//      FillGanttChart();
     99//    }
    102100
    103     private void FillGanttChart() {
    104       ganttChart.Reset();
    105       if (Content == null) return;
    106       int jobCount = 0;
    107       foreach (var j in Content.JobData) {
    108         double lastEndTime = 0;
    109         foreach (var t in Content.JobData[jobCount].Tasks) {
    110           int categoryNr = t.JobNr;
    111           string categoryName = "Job" + categoryNr;
    112           ganttChart.AddData(categoryName,
    113             categoryNr,
    114             t.TaskNr,
    115             lastEndTime + 1,
    116             lastEndTime + t.Duration,
    117             "Job" + t.JobNr + " - " + "Task#" + t.TaskNr);
    118           lastEndTime += t.Duration;
    119         }
    120         jobCount++;
    121       }
    122     }
    123   }
    124 }
     101//    private void JobOnTasksChanged(object sender, EventArgs e) {
     102//      FillGanttChart();
     103//    }
     104
     105//    private void FillGanttChart() {
     106//      ganttChart.Reset();
     107//      if (Content == null) return;
     108//      int jobCount = 0;
     109//      foreach (var j in Content.JobData) {
     110//        double lastEndTime = 0;
     111//        foreach (var t in Content.JobData[jobCount].Tasks) {
     112//          int categoryNr = t.JobNr;
     113//          string categoryName = "Job" + categoryNr;
     114//          ganttChart.AddData(categoryName,
     115//            categoryNr,
     116//            t.TaskNr,
     117//            lastEndTime + 1,
     118//            lastEndTime + t.Duration,
     119//            "Job" + t.JobNr + " - " + "Task#" + t.TaskNr);
     120//          lastEndTime += t.Duration;
     121//        }
     122//        jobCount++;
     123//      }
     124//    }
     125//  }
     126//}
Note: See TracChangeset for help on using the changeset viewer.