Changeset 114
- Timestamp:
- 04/08/08 14:44:02 (17 years ago)
- Location:
- trunk/sources/HeuristicLab.Grid
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Grid/ClientForm.cs
r35 r114 58 58 59 59 private void startButton_Click(object sender, EventArgs e) { 60 clientUrl = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8002/Grid/Client"; 60 //clientUrl = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8002/Grid/Client"; 61 string hostname = Dns.GetHostName(); 62 IPAddress[] addresses = Dns.GetHostAddresses(hostname); 63 64 // Thanks to Microsoft 65 if (System.Environment.OSVersion.Version.Major >= 6) { 66 clientUrl = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[2] + ":" + clientPort.Text +"/Grid/Client"; 67 } else { 68 clientUrl = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":" + clientPort.Text +"/Grid/Client"; 69 } 70 61 71 clientHost = new ServiceHost(this, new Uri(clientUrl)); 62 72 try { -
trunk/sources/HeuristicLab.Grid/ClientForm.designer.cs
r2 r114 51 51 this.statusLabel = new System.Windows.Forms.Label(); 52 52 this.statusTextBox = new System.Windows.Forms.TextBox(); 53 this.label2 = new System.Windows.Forms.Label(); 54 this.clientPort = new System.Windows.Forms.TextBox(); 53 55 this.SuspendLayout(); 54 56 // … … 66 68 this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 67 69 this.stopButton.Enabled = false; 68 this.stopButton.Location = new System.Drawing.Point(99, 74);70 this.stopButton.Location = new System.Drawing.Point(99, 87); 69 71 this.stopButton.Name = "stopButton"; 70 72 this.stopButton.Size = new System.Drawing.Size(75, 23); … … 77 79 // 78 80 this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 79 this.startButton.Location = new System.Drawing.Point(15, 74);81 this.startButton.Location = new System.Drawing.Point(15, 87); 80 82 this.startButton.Name = "startButton"; 81 83 this.startButton.Size = new System.Drawing.Size(75, 23); … … 95 97 // 96 98 this.statusLabel.AutoSize = true; 97 this.statusLabel.Location = new System.Drawing.Point(9, 36);99 this.statusLabel.Location = new System.Drawing.Point(9, 56); 98 100 this.statusLabel.Name = "statusLabel"; 99 101 this.statusLabel.Size = new System.Drawing.Size(67, 13); … … 103 105 // statusTextBox 104 106 // 105 this.statusTextBox.Location = new System.Drawing.Point(96, 33);107 this.statusTextBox.Location = new System.Drawing.Point(96, 53); 106 108 this.statusTextBox.Name = "statusTextBox"; 107 109 this.statusTextBox.ReadOnly = true; … … 109 111 this.statusTextBox.TabIndex = 9; 110 112 // 113 // label2 114 // 115 this.label2.AutoSize = true; 116 this.label2.Location = new System.Drawing.Point(9, 32); 117 this.label2.Name = "label2"; 118 this.label2.Size = new System.Drawing.Size(57, 13); 119 this.label2.TabIndex = 10; 120 this.label2.Text = "Client port:"; 121 // 122 // clientPort 123 // 124 this.clientPort.Location = new System.Drawing.Point(96, 29); 125 this.clientPort.Name = "clientPort"; 126 this.clientPort.Size = new System.Drawing.Size(222, 20); 127 this.clientPort.TabIndex = 11; 128 this.clientPort.Text = "8002"; 129 // 111 130 // ClientForm 112 131 // 113 132 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 114 133 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 115 this.ClientSize = new System.Drawing.Size(330, 109); 134 this.ClientSize = new System.Drawing.Size(330, 122); 135 this.Controls.Add(this.clientPort); 136 this.Controls.Add(this.label2); 116 137 this.Controls.Add(this.statusTextBox); 117 138 this.Controls.Add(this.statusLabel); … … 135 156 private System.Windows.Forms.Label statusLabel; 136 157 private System.Windows.Forms.TextBox statusTextBox; 158 private System.Windows.Forms.Label label2; 159 private System.Windows.Forms.TextBox clientPort; 137 160 } 138 161 } -
trunk/sources/HeuristicLab.Grid/ServerForm.cs
r24 r114 43 43 public ServerForm() { 44 44 InitializeComponent(); 45 externalAddressTextBox.Text = "net.tcp://"+Dns.GetHostAddresses(Dns.GetHostName())[0]+":8000/Grid/Service"; 46 internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8001/Grid/JobStore"; 45 46 // Thanks to Microsoft 47 if (System.Environment.OSVersion.Version.Major >= 6) { 48 externalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[2] + ":8000/Grid/Service"; 49 } else { 50 externalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8000/Grid/Service"; 51 } 52 if (System.Environment.OSVersion.Version.Major >= 6) { 53 internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[2] + ":8001/Grid/JobStore"; 54 } else { 55 internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8001/Grid/JobStore"; 56 } 57 47 58 jobStore = new EngineStore(); 48 59 server = new GridServer(jobStore);
Note: See TracChangeset
for help on using the changeset viewer.