Free cookie consent management tool by TermsFeed Policy Generator

Changeset 240 for trunk


Ignore:
Timestamp:
05/13/08 18:36:58 (17 years ago)
Author:
gkronber
Message:

removed start/stop buttons, server is started automatically right away (necessary for automatic restarts)

Location:
trunk/sources/HeuristicLab.Grid
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Grid/ServerForm.cs

    r115 r240  
    5252        internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8001/Grid/JobStore";
    5353      }
    54 
    5554      jobStore = new EngineStore();
    5655      server = new GridServer(jobStore);
    57      
     56      Start();
    5857    }
    5958
    60     private void startButton_Click(object sender, EventArgs e) {
     59    private void Start() {
    6160      externalHost = new ServiceHost(server, new Uri(externalAddressTextBox.Text));
    6261      internalHost = new ServiceHost(jobStore, new Uri(internalAddressTextBox.Text));
     
    7372        internalHost.AddServiceEndpoint(typeof(IEngineStore), binding, internalAddressTextBox.Text);
    7473        internalHost.Open();
    75 
    76         startButton.Enabled = false;
    77         stopButton.Enabled = true;
    7874      } catch (CommunicationException ex) {
    7975        MessageBox.Show("An exception occurred: " + ex.Message);
     
    8278      }
    8379    }
    84 
    85     private void stopButton_Click(object sender, EventArgs e) {
    86       externalHost.Close();
    87       internalHost.Close();
    88       stopButton.Enabled = false;
    89       startButton.Enabled = true;
    90     }
    91 
    9280    private void statusUpdateTimer_Tick(object sender, EventArgs e) {
    9381      waitingJobsTextBox.Text = jobStore.WaitingJobs+"";
  • trunk/sources/HeuristicLab.Grid/ServerForm.designer.cs

    r2 r240  
    4747      this.components = new System.ComponentModel.Container();
    4848      this.externalAddressTextBox = new System.Windows.Forms.TextBox();
    49       this.startButton = new System.Windows.Forms.Button();
    50       this.stopButton = new System.Windows.Forms.Button();
    5149      this.externalAddressLabel = new System.Windows.Forms.Label();
    5250      this.internalAddressLabel = new System.Windows.Forms.Label();
     
    6866      this.externalAddressTextBox.Size = new System.Drawing.Size(229, 20);
    6967      this.externalAddressTextBox.TabIndex = 0;
    70       //
    71       // startButton
    72       //
    73       this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    74       this.startButton.Location = new System.Drawing.Point(12, 160);
    75       this.startButton.Name = "startButton";
    76       this.startButton.Size = new System.Drawing.Size(75, 23);
    77       this.startButton.TabIndex = 1;
    78       this.startButton.Text = "St&art";
    79       this.startButton.UseVisualStyleBackColor = true;
    80       this.startButton.Click += new System.EventHandler(this.startButton_Click);
    81       //
    82       // stopButton
    83       //
    84       this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    85       this.stopButton.Enabled = false;
    86       this.stopButton.Location = new System.Drawing.Point(99, 160);
    87       this.stopButton.Name = "stopButton";
    88       this.stopButton.Size = new System.Drawing.Size(75, 23);
    89       this.stopButton.TabIndex = 2;
    90       this.stopButton.Text = "St&op";
    91       this.stopButton.UseVisualStyleBackColor = true;
    92       this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
    9368      //
    9469      // externalAddressLabel
     
    185160      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    186161      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    187       this.ClientSize = new System.Drawing.Size(347, 195);
     162      this.ClientSize = new System.Drawing.Size(347, 150);
    188163      this.Controls.Add(this.waitingResultsLabel);
    189164      this.Controls.Add(this.waitingResultsTextBox);
     
    195170      this.Controls.Add(this.internalAddressTextBox);
    196171      this.Controls.Add(this.externalAddressLabel);
    197       this.Controls.Add(this.stopButton);
    198       this.Controls.Add(this.startButton);
    199172      this.Controls.Add(this.externalAddressTextBox);
    200173      this.Name = "ServerForm";
     
    208181
    209182    private System.Windows.Forms.TextBox externalAddressTextBox;
    210     private System.Windows.Forms.Button startButton;
    211     private System.Windows.Forms.Button stopButton;
    212183    private System.Windows.Forms.Label externalAddressLabel;
    213184    private System.Windows.Forms.Label internalAddressLabel;
Note: See TracChangeset for help on using the changeset viewer.