Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5282 for branches


Ignore:
Timestamp:
01/11/11 18:03:02 (14 years ago)
Author:
cneumuel
Message:

#1247

  • added support for priorities in HiveEngine
Location:
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.HiveEngine/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.HiveEngine/3.3/HiveEngine.cs

    r5268 r5282  
    3333    public string ResourceIds { get; set; }
    3434
     35    [Storable]
     36    private int priority;
     37    public int Priority {
     38      get { return priority; }
     39      set { priority = value; }
     40    }
     41   
    3542    #region constructors and cloning
    3643    public HiveEngine() {
     
    4350      this.ResourceIds = original.ResourceIds;
    4451      this.currentOperator = cloner.Clone(original.currentOperator);
     52      this.priority = original.priority;
    4553    }
    4654    public override IDeepCloneable Clone(Cloner cloner) {
     
    292300      serializedJob.JobInfo.CoresNeeded = 1;
    293301      serializedJob.JobInfo.PluginsNeeded = pluginsNeeded;
     302      serializedJob.JobInfo.Priority = priority;
    294303      ResponseObject<JobDto> response = null;
    295304      maxConcurrentConnections.WaitOne();
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.HiveEngine/3.3/Views/HiveEngineView.Designer.cs

    r5153 r5282  
    2626      this.resourceIdsLabel = new System.Windows.Forms.Label();
    2727      this.resourceIdsTextBox = new System.Windows.Forms.TextBox();
     28      this.priorityLabel = new System.Windows.Forms.Label();
     29      this.priorityTextBox = new System.Windows.Forms.TextBox();
    2830      this.SuspendLayout();
    2931      //
    3032      // logView
    3133      //
    32       this.logView.Location = new System.Drawing.Point(0, 49);
    33       this.logView.Size = new System.Drawing.Size(430, 302);
     34      this.logView.Location = new System.Drawing.Point(0, 81);
     35      this.logView.Size = new System.Drawing.Size(430, 270);
    3436      //
    3537      // resourceIdsLabel
     
    5153      this.resourceIdsTextBox.TextChanged += new System.EventHandler(this.resourceIdsTextBox_TextChanged);
    5254      //
     55      // priorityLabel
     56      //
     57      this.priorityLabel.AutoSize = true;
     58      this.priorityLabel.Location = new System.Drawing.Point(3, 49);
     59      this.priorityLabel.Name = "priorityLabel";
     60      this.priorityLabel.Size = new System.Drawing.Size(41, 13);
     61      this.priorityLabel.TabIndex = 5;
     62      this.priorityLabel.Text = "Priority:";
     63      //
     64      // priorityTextBox
     65      //
     66      this.priorityTextBox.Location = new System.Drawing.Point(73, 46);
     67      this.priorityTextBox.Name = "priorityTextBox";
     68      this.priorityTextBox.Size = new System.Drawing.Size(357, 20);
     69      this.priorityTextBox.TabIndex = 6;
     70      this.priorityTextBox.TextChanged += new System.EventHandler(this.priorityTextBox_TextChanged);
     71      //
    5372      // HiveEngineView
    5473      //
     
    5675      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    5776      this.Controls.Add(this.resourceIdsTextBox);
     77      this.Controls.Add(this.priorityTextBox);
    5878      this.Controls.Add(this.resourceIdsLabel);
     79      this.Controls.Add(this.priorityLabel);
    5980      this.Name = "HiveEngineView";
     81      this.Controls.SetChildIndex(this.priorityLabel, 0);
    6082      this.Controls.SetChildIndex(this.resourceIdsLabel, 0);
     83      this.Controls.SetChildIndex(this.priorityTextBox, 0);
    6184      this.Controls.SetChildIndex(this.resourceIdsTextBox, 0);
    6285      this.Controls.SetChildIndex(this.logView, 0);
     
    7295    private System.Windows.Forms.Label resourceIdsLabel;
    7396    private System.Windows.Forms.TextBox resourceIdsTextBox;
     97    private System.Windows.Forms.Label priorityLabel;
     98    private System.Windows.Forms.TextBox priorityTextBox;
    7499  }
    75100}
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.HiveEngine/3.3/Views/HiveEngineView.cs

    r5153 r5282  
    2424
    2525    protected override void DeregisterContentEvents() {
    26       // TODO: Deregister your event handlers here
    2726      base.DeregisterContentEvents();
    2827    }
     
    3029    protected override void RegisterContentEvents() {
    3130      base.RegisterContentEvents();
    32       // TODO: Register your event handlers here
    3331    }
    3432
    3533    #region Event Handlers (Content)
    36     // TODO: Put event handlers of the content here
     34    // Put event handlers of the content here
    3735    #endregion
    3836
     
    4038      base.OnContentChanged();
    4139      if (Content == null) {
    42         // TODO: Add code when content has been changed and is null
     40        resourceIdsTextBox.Text = string.Empty;
     41        priorityTextBox.Text = string.Empty;
    4342      } else {
    44         // TODO: Add code when content has been changed and is not null
     43        resourceIdsTextBox.Text = Content.ResourceIds;
     44        priorityTextBox.Text = Content.Priority.ToString();
    4545      }
    4646    }
     
    5252      if (Content != null) {
    5353        resourceIdsTextBox.ReadOnly = this.ReadOnly;
     54        priorityTextBox.ReadOnly = this.ReadOnly;
    5455      } else {
    5556        resourceIdsTextBox.ReadOnly = false;
     57        priorityTextBox.ReadOnly = false;
    5658      }
    5759    }
     
    6264    }
    6365    #endregion
     66
     67    private void priorityTextBox_TextChanged(object sender, EventArgs e) {
     68      Content.Priority = int.Parse(priorityTextBox.Text);
     69    }
    6470  }
    6571}
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.HiveEngine/3.3/Views/HiveEngineView.resx

    r5153 r5282  
    113113  </resheader>
    114114  <resheader name="reader">
    115     <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     115    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    116116  </resheader>
    117117  <resheader name="writer">
    118     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     118    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    119119  </resheader>
    120120</root>
Note: See TracChangeset for help on using the changeset viewer.