- Timestamp:
- 12/04/08 17:33:44 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Server.Console
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsole.Designer.cs
r778 r912 52 52 this.lblIp = new System.Windows.Forms.Label(); 53 53 this.tbPort = new System.Windows.Forms.TextBox(); 54 this.btnLogin = new System.Windows.Forms.Button(); 55 this.groupBox1 = new System.Windows.Forms.GroupBox(); 56 this.lblPwd = new System.Windows.Forms.Label(); 57 this.lblUsername = new System.Windows.Forms.Label(); 58 this.tbPwd = new System.Windows.Forms.TextBox(); 59 this.tbUserName = new System.Windows.Forms.TextBox(); 60 this.lblError = new System.Windows.Forms.Label(); 54 61 this.tbIp = new HeuristicLab.Hive.Server.Console.IPAddressTextBox(); 55 this.btnLogin = new System.Windows.Forms.Button();56 62 this.msServerConsole.SuspendLayout(); 57 63 this.gbManager.SuspendLayout(); 64 this.groupBox1.SuspendLayout(); 58 65 this.SuspendLayout(); 59 66 // … … 79 86 // 80 87 this.tsmiExit.Name = "tsmiExit"; 81 this.tsmiExit.Size = new System.Drawing.Size(1 52, 22);88 this.tsmiExit.Size = new System.Drawing.Size(103, 22); 82 89 this.tsmiExit.Text = "Exit"; 83 90 this.tsmiExit.Click += new System.EventHandler(this.tsmiExit_Click); … … 89 96 this.gbManager.Controls.Add(this.tbPort); 90 97 this.gbManager.Controls.Add(this.tbIp); 91 this.gbManager.Location = new System.Drawing.Point(1 2, 37);98 this.gbManager.Location = new System.Drawing.Point(16, 124); 92 99 this.gbManager.Name = "gbManager"; 93 100 this.gbManager.Size = new System.Drawing.Size(283, 82); … … 116 123 // tbPort 117 124 // 118 this.tbPort.Location = new System.Drawing.Point( 57, 47);125 this.tbPort.Location = new System.Drawing.Point(77, 47); 119 126 this.tbPort.Name = "tbPort"; 120 this.tbPort.Size = new System.Drawing.Size( 209, 20);127 this.tbPort.Size = new System.Drawing.Size(189, 20); 121 128 this.tbPort.TabIndex = 1; 122 129 // 123 // tbIp124 //125 this.tbIp.Location = new System.Drawing.Point(57, 19);126 this.tbIp.Name = "tbIp";127 this.tbIp.Size = new System.Drawing.Size(211, 20);128 this.tbIp.TabIndex = 0;129 //130 130 // btnLogin 131 131 // 132 this.btnLogin.Location = new System.Drawing.Point(1 79, 127);132 this.btnLogin.Location = new System.Drawing.Point(183, 212); 133 133 this.btnLogin.Name = "btnLogin"; 134 134 this.btnLogin.Size = new System.Drawing.Size(116, 23); … … 138 138 this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click); 139 139 // 140 // groupBox1 141 // 142 this.groupBox1.Controls.Add(this.tbUserName); 143 this.groupBox1.Controls.Add(this.lblPwd); 144 this.groupBox1.Controls.Add(this.lblUsername); 145 this.groupBox1.Controls.Add(this.tbPwd); 146 this.groupBox1.Location = new System.Drawing.Point(16, 36); 147 this.groupBox1.Name = "groupBox1"; 148 this.groupBox1.Size = new System.Drawing.Size(283, 82); 149 this.groupBox1.TabIndex = 4; 150 this.groupBox1.TabStop = false; 151 this.groupBox1.Text = "Manager"; 152 // 153 // lblPwd 154 // 155 this.lblPwd.AutoSize = true; 156 this.lblPwd.Location = new System.Drawing.Point(16, 54); 157 this.lblPwd.Name = "lblPwd"; 158 this.lblPwd.Size = new System.Drawing.Size(53, 13); 159 this.lblPwd.TabIndex = 3; 160 this.lblPwd.Text = "Password"; 161 // 162 // lblUsername 163 // 164 this.lblUsername.AutoSize = true; 165 this.lblUsername.Location = new System.Drawing.Point(16, 26); 166 this.lblUsername.Name = "lblUsername"; 167 this.lblUsername.Size = new System.Drawing.Size(55, 13); 168 this.lblUsername.TabIndex = 2; 169 this.lblUsername.Text = "Username"; 170 // 171 // tbPwd 172 // 173 this.tbPwd.Location = new System.Drawing.Point(77, 47); 174 this.tbPwd.Name = "tbPwd"; 175 this.tbPwd.Size = new System.Drawing.Size(189, 20); 176 this.tbPwd.TabIndex = 1; 177 // 178 // tbUserName 179 // 180 this.tbUserName.Location = new System.Drawing.Point(77, 19); 181 this.tbUserName.Name = "tbUserName"; 182 this.tbUserName.Size = new System.Drawing.Size(189, 20); 183 this.tbUserName.TabIndex = 4; 184 // 185 // lblError 186 // 187 this.lblError.AutoSize = true; 188 this.lblError.ForeColor = System.Drawing.Color.Red; 189 this.lblError.Location = new System.Drawing.Point(16, 238); 190 this.lblError.Name = "lblError"; 191 this.lblError.Size = new System.Drawing.Size(0, 13); 192 this.lblError.TabIndex = 5; 193 // 194 // tbIp 195 // 196 this.tbIp.Location = new System.Drawing.Point(77, 19); 197 this.tbIp.Name = "tbIp"; 198 this.tbIp.Size = new System.Drawing.Size(191, 20); 199 this.tbIp.TabIndex = 0; 200 // 140 201 // HiveServerConsole 141 202 // 142 203 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 143 204 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 144 this.ClientSize = new System.Drawing.Size(311, 162); 205 this.ClientSize = new System.Drawing.Size(311, 263); 206 this.Controls.Add(this.lblError); 207 this.Controls.Add(this.groupBox1); 145 208 this.Controls.Add(this.btnLogin); 146 209 this.Controls.Add(this.gbManager); … … 153 216 this.gbManager.ResumeLayout(false); 154 217 this.gbManager.PerformLayout(); 218 this.groupBox1.ResumeLayout(false); 219 this.groupBox1.PerformLayout(); 155 220 this.ResumeLayout(false); 156 221 this.PerformLayout(); … … 169 234 private IPAddressTextBox tbIp; 170 235 private System.Windows.Forms.Button btnLogin; 236 private System.Windows.Forms.GroupBox groupBox1; 237 private System.Windows.Forms.TextBox tbUserName; 238 private System.Windows.Forms.Label lblPwd; 239 private System.Windows.Forms.Label lblUsername; 240 private System.Windows.Forms.TextBox tbPwd; 241 private System.Windows.Forms.Label lblError; 171 242 } 172 243 } -
trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsole.cs
r831 r912 30 30 using HeuristicLab.Hive.Contracts.Interfaces; 31 31 using HeuristicLab.Hive.Contracts.BusinessObjects; 32 using HeuristicLab.Hive.Contracts; 32 33 33 34 namespace HeuristicLab.Hive.Server.Console { … … 40 41 InitializeComponent(); 41 42 tbIp.Text = "10.20.53.1"; 43 tbPort.Text = "9000"; 42 44 } 43 45 … … 53 55 /// <param name="e"></param> 54 56 private void btnLogin_Click(object sender, EventArgs e) { 55 if (i pIsValid()) {57 if (isValid()) { 56 58 string newIp = tbIp.Text; 57 59 newIp = newIp.Replace(" ", ""); … … 68 70 69 71 70 private static bool ipIsValid() { 71 72 private bool isValid() { 73 if ((tbUserName.Text != "") && 74 (tbPwd.Text != "") && 75 (tbIp.Text != "") && 76 (tbPort.Text != "")) { 77 try { 78 IJobManager jobManager = 79 ServiceLocator.GetJobManager(); 80 ResponseList<Job> jobs = jobManager.GetAllJobs(); 81 jobs = jobManager.GetAllJobs(); 82 } 83 catch (Exception ex) { 84 lblError.Text = "Server not online"; 85 return false; 86 } 87 return true; 88 } 72 89 // TODO IP-Adress validation 73 return true;90 return false; 74 91 } 75 92
Note: See TracChangeset
for help on using the changeset viewer.