Ignore:
Timestamp:
01/03/18 07:16:03 (2 years ago)
Author:
jkarder
Message:

#2822: merged r15408:15409, r15452 and r15560 into stable

Location:
stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Optimization.Views

  • stable/HeuristicLab.Optimization.Views/3.3/ExperimentView.Designer.cs

    r14186 r15573  
    4747      this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
    4848      this.optimizersTabPage = new System.Windows.Forms.TabPage();
     49      this.experimentTreeView = new HeuristicLab.Optimization.Views.ExperimentTreeView();
    4950      this.runsTabPage = new System.Windows.Forms.TabPage();
    5051      this.runsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    51       this.experimentTreeView = new HeuristicLab.Optimization.Views.ExperimentTreeView();
     52      this.workersNumericUpDown = new System.Windows.Forms.NumericUpDown();
     53      this.workersLabel = new System.Windows.Forms.Label();
    5254      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5355      this.tabControl.SuspendLayout();
    5456      this.optimizersTabPage.SuspendLayout();
    5557      this.runsTabPage.SuspendLayout();
     58      ((System.ComponentModel.ISupportInitialize)(this.workersNumericUpDown)).BeginInit();
    5659      this.SuspendLayout();
    5760      //
     
    119122      this.optimizersTabPage.Text = "Optimizers";
    120123      this.optimizersTabPage.UseVisualStyleBackColor = true;
     124      //
     125      // experimentTreeView
     126      //
     127      this.experimentTreeView.Caption = "Experiment View";
     128      this.experimentTreeView.Content = null;
     129      this.experimentTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
     130      this.experimentTreeView.Location = new System.Drawing.Point(3, 3);
     131      this.experimentTreeView.Name = "experimentTreeView";
     132      this.experimentTreeView.ReadOnly = false;
     133      this.experimentTreeView.Size = new System.Drawing.Size(665, 395);
     134      this.experimentTreeView.TabIndex = 0;
    121135      //
    122136      // runsTabPage
     
    147161      this.runsViewHost.ViewType = null;
    148162      //
    149       // experimentTreeView
    150       //
    151       this.experimentTreeView.Caption = "Experiment View";
    152       this.experimentTreeView.Content = null;
    153       this.experimentTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
    154       this.experimentTreeView.Location = new System.Drawing.Point(3, 3);
    155       this.experimentTreeView.Name = "experimentTreeView";
    156       this.experimentTreeView.ReadOnly = false;
    157       this.experimentTreeView.Size = new System.Drawing.Size(665, 395);
    158       this.experimentTreeView.TabIndex = 0;
     163      // workersNumericUpDown
     164      //
     165      this.workersNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     166      this.workersNumericUpDown.Location = new System.Drawing.Point(193, 461);
     167      this.workersNumericUpDown.Minimum = new decimal(new int[] {
     168            1,
     169            0,
     170            0,
     171            0});
     172      this.workersNumericUpDown.Name = "workersNumericUpDown";
     173      this.workersNumericUpDown.Size = new System.Drawing.Size(59, 20);
     174      this.workersNumericUpDown.TabIndex = 16;
     175      this.workersNumericUpDown.Value = new decimal(new int[] {
     176            1,
     177            0,
     178            0,
     179            0});
     180      this.workersNumericUpDown.ValueChanged += new System.EventHandler(this.workersNumericUpDown_ValueChanged);
     181      //
     182      // workersLabel
     183      //
     184      this.workersLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     185      this.workersLabel.AutoSize = true;
     186      this.workersLabel.Location = new System.Drawing.Point(140, 464);
     187      this.workersLabel.Name = "workersLabel";
     188      this.workersLabel.Size = new System.Drawing.Size(53, 13);
     189      this.workersLabel.TabIndex = 17;
     190      this.workersLabel.Text = "Workers: ";
    159191      //
    160192      // ExperimentView
    161193      //
    162       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    163194      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
     195      this.Controls.Add(this.workersLabel);
     196      this.Controls.Add(this.workersNumericUpDown);
    164197      this.Controls.Add(this.tabControl);
    165198      this.Name = "ExperimentView";
     
    175208      this.Controls.SetChildIndex(this.nameLabel, 0);
    176209      this.Controls.SetChildIndex(this.nameTextBox, 0);
     210      this.Controls.SetChildIndex(this.workersNumericUpDown, 0);
     211      this.Controls.SetChildIndex(this.workersLabel, 0);
    177212      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    178213      this.tabControl.ResumeLayout(false);
    179214      this.optimizersTabPage.ResumeLayout(false);
    180215      this.runsTabPage.ResumeLayout(false);
     216      ((System.ComponentModel.ISupportInitialize)(this.workersNumericUpDown)).EndInit();
    181217      this.ResumeLayout(false);
    182218      this.PerformLayout();
     
    190226    private HeuristicLab.MainForm.WindowsForms.ViewHost runsViewHost;
    191227    private ExperimentTreeView experimentTreeView;
    192 
     228    private System.Windows.Forms.NumericUpDown workersNumericUpDown;
     229    private System.Windows.Forms.Label workersLabel;
    193230  }
    194231}
  • stable/HeuristicLab.Optimization.Views/3.3/ExperimentView.cs

    r14186 r15573  
    2020#endregion
    2121
     22using System;
    2223using System.Linq;
    2324using System.Windows.Forms;
     
    4344        experimentTreeView.Content = null;
    4445        runsViewHost.Content = null;
     46        workersNumericUpDown.Value = 1;
    4547      } else {
    4648        experimentTreeView.Content = Content;
    4749        runsViewHost.Content = Content.Runs;
     50        workersNumericUpDown.Value = Content.NumberOfWorkers;
    4851      }
    4952    }
     
    5356      experimentTreeView.Enabled = Content != null;
    5457      runsViewHost.Enabled = Content != null;
     58      workersNumericUpDown.Enabled = Content != null && Content.ExecutionState != ExecutionState.Started;
    5559    }
    5660
     
    6670      base.OnClosed(e);
    6771    }
     72
     73    protected override void Content_ExecutionStateChanged(object sender, EventArgs e) {
     74      base.Content_ExecutionStateChanged(sender, e);
     75      workersNumericUpDown.Enabled = Content.ExecutionState != ExecutionState.Started;
     76    }
     77
     78    #region Events
     79    private void workersNumericUpDown_ValueChanged(object sender, System.EventArgs e) {
     80      if (Content != null)
     81        Content.NumberOfWorkers = (int)workersNumericUpDown.Value;
     82    }
     83    #endregion
    6884  }
    6985}
Note: See TracChangeset for help on using the changeset viewer.