Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/24/09 17:27:17 (15 years ago)
Author:
gkronber
Message:

Added views for the executer and the dispatcher and the server (which contains the executer and dispatcher views). #676 (Cockpit for the CEDMA Server to control algorithm settings)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerForm.cs

    r2075 r2088  
    4141
    4242namespace HeuristicLab.CEDMA.Server {
    43   public partial class ServerForm : Form {
     43  public partial class ServerForm : ViewBase {
    4444    private Server server;
    4545
    46 
    47     public ServerForm() {
     46    public ServerForm(Server server) {
     47      this.server = server;
    4848      InitializeComponent();
    49       server = new Server();
    50       server.Start();
    5149      addressTextBox.Text = server.CedmaServiceUrl;
    52     }
    53 
    54     private void refreshTimer_Tick(object sender, EventArgs e) {
    55       listBox.DataSource = server.GetActiveJobDescriptions();
    5650    }
    5751
    5852    private void connectButton_Click(object sender, EventArgs e) {
    5953      server.Connect(address.Text);
    60       maxActiveJobsUpDown.Enabled = true;
    61       activeJobsLabel.Enabled = true;
    62       maxActiveJobsUpDown.Value = server.MaxActiveJobs;
    63       connectButton.Enabled = false;
    64       refreshTimer.Start();
    65     }
    66 
    67     private void maxActiveJobsUpDown_ValueChanged(object sender, EventArgs e) {
    68       server.MaxActiveJobs = Convert.ToInt32(maxActiveJobsUpDown.Value);
     54      UserControl executerControl = (UserControl)server.Executer.CreateView();
     55      executerControl.Dock = DockStyle.Fill;
     56      executerTabPage.Controls.Add(executerControl);
     57      UserControl dispatcherControl = (UserControl)server.Dispatcher.CreateView();
     58      dispatcherControl.Dock = DockStyle.Fill;
     59      dispatcherTabPage.Controls.Add(dispatcherControl);
     60      connectButton.Enabled = false;     
    6961    }
    7062  }
Note: See TracChangeset for help on using the changeset viewer.