Changeset 240
- Timestamp:
- 05/13/08 18:36:58 (17 years ago)
- Location:
- trunk/sources/HeuristicLab.Grid
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Grid/ServerForm.cs
r115 r240 52 52 internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8001/Grid/JobStore"; 53 53 } 54 55 54 jobStore = new EngineStore(); 56 55 server = new GridServer(jobStore); 57 56 Start(); 58 57 } 59 58 60 private void startButton_Click(object sender, EventArgs e) {59 private void Start() { 61 60 externalHost = new ServiceHost(server, new Uri(externalAddressTextBox.Text)); 62 61 internalHost = new ServiceHost(jobStore, new Uri(internalAddressTextBox.Text)); … … 73 72 internalHost.AddServiceEndpoint(typeof(IEngineStore), binding, internalAddressTextBox.Text); 74 73 internalHost.Open(); 75 76 startButton.Enabled = false;77 stopButton.Enabled = true;78 74 } catch (CommunicationException ex) { 79 75 MessageBox.Show("An exception occurred: " + ex.Message); … … 82 78 } 83 79 } 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 92 80 private void statusUpdateTimer_Tick(object sender, EventArgs e) { 93 81 waitingJobsTextBox.Text = jobStore.WaitingJobs+""; -
trunk/sources/HeuristicLab.Grid/ServerForm.designer.cs
r2 r240 47 47 this.components = new System.ComponentModel.Container(); 48 48 this.externalAddressTextBox = new System.Windows.Forms.TextBox(); 49 this.startButton = new System.Windows.Forms.Button();50 this.stopButton = new System.Windows.Forms.Button();51 49 this.externalAddressLabel = new System.Windows.Forms.Label(); 52 50 this.internalAddressLabel = new System.Windows.Forms.Label(); … … 68 66 this.externalAddressTextBox.Size = new System.Drawing.Size(229, 20); 69 67 this.externalAddressTextBox.TabIndex = 0; 70 //71 // startButton72 //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 // stopButton83 //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);93 68 // 94 69 // externalAddressLabel … … 185 160 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 186 161 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 187 this.ClientSize = new System.Drawing.Size(347, 1 95);162 this.ClientSize = new System.Drawing.Size(347, 150); 188 163 this.Controls.Add(this.waitingResultsLabel); 189 164 this.Controls.Add(this.waitingResultsTextBox); … … 195 170 this.Controls.Add(this.internalAddressTextBox); 196 171 this.Controls.Add(this.externalAddressLabel); 197 this.Controls.Add(this.stopButton);198 this.Controls.Add(this.startButton);199 172 this.Controls.Add(this.externalAddressTextBox); 200 173 this.Name = "ServerForm"; … … 208 181 209 182 private System.Windows.Forms.TextBox externalAddressTextBox; 210 private System.Windows.Forms.Button startButton;211 private System.Windows.Forms.Button stopButton;212 183 private System.Windows.Forms.Label externalAddressLabel; 213 184 private System.Windows.Forms.Label internalAddressLabel;
Note: See TracChangeset
for help on using the changeset viewer.