Changeset 1164
- Timestamp:
- 01/21/09 17:14:26 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Server.Console
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.Console/AddJobForm.cs
r1148 r1164 35 35 36 36 namespace HeuristicLab.Hive.Server.ServerConsole { 37 38 public delegate void addDelegate(); 39 37 40 public partial class AddJobForm : Form { 41 42 public event addDelegate addJobEvent; 38 43 39 44 ResponseList<Job> jobGroups = null; … … 76 81 } 77 82 } 83 if (addJobEvent != null) { 84 addJobEvent(); 85 } 78 86 this.Close(); 79 87 } else { -
trunk/sources/HeuristicLab.Hive.Server.Console/AddUserForm.cs
r1089 r1164 35 35 public partial class AddUserForm : Form { 36 36 37 public event addDelegate addUserEvent; 37 38 ResponseList<UserGroup> userGroups = null; 38 39 IUserRoleManager userRoleManager; … … 98 99 } 99 100 } 101 if (addUserEvent != null) { 102 addUserEvent(); 103 } 100 104 this.Close(); 101 105 } -
trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsole.Designer.cs
r1089 r1164 127 127 this.tbPort.Size = new System.Drawing.Size(189, 20); 128 128 this.tbPort.TabIndex = 6; 129 this.tbPort.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.HiveServerConsole_KeyPress); 129 130 // 130 131 // tbIp … … 134 135 this.tbIp.Size = new System.Drawing.Size(191, 20); 135 136 this.tbIp.TabIndex = 5; 137 this.tbIp.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.HiveServerConsole_KeyPress); 136 138 // 137 139 // btnLogin … … 144 146 this.btnLogin.UseVisualStyleBackColor = true; 145 147 this.btnLogin.Click += new System.EventHandler(this.BtnLogin_Click); 148 this.btnLogin.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.HiveServerConsole_KeyPress); 146 149 // 147 150 // groupBox1 … … 164 167 this.tbUserName.Size = new System.Drawing.Size(189, 20); 165 168 this.tbUserName.TabIndex = 2; 169 this.tbUserName.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.HiveServerConsole_KeyPress); 166 170 // 167 171 // lblPwd … … 190 194 this.tbPwd.TabIndex = 3; 191 195 this.tbPwd.UseSystemPasswordChar = true; 196 this.tbPwd.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.HiveServerConsole_KeyPress); 192 197 // 193 198 // lblError … … 213 218 this.Name = "HiveServerConsole"; 214 219 this.Text = "Server Console"; 220 this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.HiveServerConsole_KeyPress); 215 221 this.msServerConsole.ResumeLayout(false); 216 222 this.msServerConsole.PerformLayout(); -
trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsole.cs
r1148 r1164 118 118 } 119 119 } 120 121 private void HiveServerConsole_KeyPress(object sender, KeyPressEventArgs e) { 122 if (e.KeyChar == (char)Keys.Return) { 123 BtnLogin_Click(sender, e); 124 } 125 } 120 126 } 121 127 } -
trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.Designer.cs
r1148 r1164 50 50 this.lvUserControl = new System.Windows.Forms.ListView(); 51 51 this.ilUserControl = new System.Windows.Forms.ImageList(this.components); 52 this.plClientDetails = new System.Windows.Forms.Panel(); 53 this.lblState = new System.Windows.Forms.Label(); 54 this.lblStateClient = new System.Windows.Forms.Label(); 55 this.lblLogin = new System.Windows.Forms.Label(); 56 this.lblLoginOn = new System.Windows.Forms.Label(); 57 this.lblClientName = new System.Windows.Forms.Label(); 58 this.btnClientDetailClose = new System.Windows.Forms.Button(); 59 this.pbClientControl = new System.Windows.Forms.PictureBox(); 60 this.pbUserControl = new System.Windows.Forms.PictureBox(); 52 61 this.plJobDetails = new System.Windows.Forms.Panel(); 53 62 this.lvSnapshots = new System.Windows.Forms.ListView(); … … 68 77 this.btnJobDetailClose = new System.Windows.Forms.Button(); 69 78 this.pbJobControl = new System.Windows.Forms.PictureBox(); 70 this.plClientDetails = new System.Windows.Forms.Panel();71 this.lblLogin = new System.Windows.Forms.Label();72 this.lblLoginOn = new System.Windows.Forms.Label();73 this.lblClientName = new System.Windows.Forms.Label();74 this.btnClientDetailClose = new System.Windows.Forms.Button();75 this.pbClientControl = new System.Windows.Forms.PictureBox();76 79 this.plUserDetails = new System.Windows.Forms.Panel(); 77 80 this.lblUserName = new System.Windows.Forms.Label(); 78 81 this.btnUserControlClose = new System.Windows.Forms.Button(); 79 this.pbUserControl = new System.Windows.Forms.PictureBox();80 82 this.treeView2 = new System.Windows.Forms.TreeView(); 81 83 this.listView2 = new System.Windows.Forms.ListView(); … … 96 98 this.scUserControl.Panel2.SuspendLayout(); 97 99 this.scUserControl.SuspendLayout(); 100 this.plClientDetails.SuspendLayout(); 101 ((System.ComponentModel.ISupportInitialize)(this.pbClientControl)).BeginInit(); 102 ((System.ComponentModel.ISupportInitialize)(this.pbUserControl)).BeginInit(); 98 103 this.plJobDetails.SuspendLayout(); 99 104 ((System.ComponentModel.ISupportInitialize)(this.pbJobControl)).BeginInit(); 100 this.plClientDetails.SuspendLayout();101 ((System.ComponentModel.ISupportInitialize)(this.pbClientControl)).BeginInit();102 105 this.plUserDetails.SuspendLayout(); 103 ((System.ComponentModel.ISupportInitialize)(this.pbUserControl)).BeginInit();104 106 ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).BeginInit(); 105 107 this.SuspendLayout(); … … 218 220 this.tvClientControl.Size = new System.Drawing.Size(139, 346); 219 221 this.tvClientControl.TabIndex = 0; 222 this.tvClientControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVClientClicked); 220 223 // 221 224 // lvClientControl … … 276 279 this.tvJobControl.Size = new System.Drawing.Size(139, 346); 277 280 this.tvJobControl.TabIndex = 2; 278 this.tvJobControl. Click += new System.EventHandler(this.OnTVJobControlClicked);281 this.tvJobControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVJobControlClicked); 279 282 // 280 283 // lvJobControl … … 333 336 this.tvUserControl.Size = new System.Drawing.Size(139, 346); 334 337 this.tvUserControl.TabIndex = 1; 338 this.tvUserControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVUserControlClicked); 335 339 // 336 340 // lvUserControl … … 351 355 this.ilUserControl.TransparentColor = System.Drawing.Color.Transparent; 352 356 this.ilUserControl.Images.SetKeyName(0, "Users.png"); 357 // 358 // plClientDetails 359 // 360 this.plClientDetails.BackColor = System.Drawing.SystemColors.Window; 361 this.plClientDetails.Controls.Add(this.lblState); 362 this.plClientDetails.Controls.Add(this.lblStateClient); 363 this.plClientDetails.Controls.Add(this.lblLogin); 364 this.plClientDetails.Controls.Add(this.lblLoginOn); 365 this.plClientDetails.Controls.Add(this.lblClientName); 366 this.plClientDetails.Controls.Add(this.btnClientDetailClose); 367 this.plClientDetails.Controls.Add(this.pbClientControl); 368 this.plClientDetails.Dock = System.Windows.Forms.DockStyle.Fill; 369 this.plClientDetails.Location = new System.Drawing.Point(0, 0); 370 this.plClientDetails.Name = "plClientDetails"; 371 this.plClientDetails.Size = new System.Drawing.Size(494, 346); 372 this.plClientDetails.TabIndex = 1; 373 // 374 // lblState 375 // 376 this.lblState.AutoSize = true; 377 this.lblState.Location = new System.Drawing.Point(103, 76); 378 this.lblState.Name = "lblState"; 379 this.lblState.Size = new System.Drawing.Size(35, 13); 380 this.lblState.TabIndex = 6; 381 this.lblState.Text = "label2"; 382 // 383 // lblStateClient 384 // 385 this.lblStateClient.AutoSize = true; 386 this.lblStateClient.Location = new System.Drawing.Point(29, 76); 387 this.lblStateClient.Name = "lblStateClient"; 388 this.lblStateClient.Size = new System.Drawing.Size(32, 13); 389 this.lblStateClient.TabIndex = 5; 390 this.lblStateClient.Text = "State"; 391 // 392 // lblLogin 393 // 394 this.lblLogin.AutoSize = true; 395 this.lblLogin.Location = new System.Drawing.Point(100, 55); 396 this.lblLogin.Name = "lblLogin"; 397 this.lblLogin.Size = new System.Drawing.Size(43, 13); 398 this.lblLogin.TabIndex = 4; 399 this.lblLogin.Text = "lblLogin"; 400 // 401 // lblLoginOn 402 // 403 this.lblLoginOn.AutoSize = true; 404 this.lblLoginOn.Location = new System.Drawing.Point(29, 55); 405 this.lblLoginOn.Name = "lblLoginOn"; 406 this.lblLoginOn.Size = new System.Drawing.Size(65, 13); 407 this.lblLoginOn.TabIndex = 3; 408 this.lblLoginOn.Text = "logged in on"; 409 // 410 // lblClientName 411 // 412 this.lblClientName.AutoSize = true; 413 this.lblClientName.Location = new System.Drawing.Point(41, 14); 414 this.lblClientName.Name = "lblClientName"; 415 this.lblClientName.Size = new System.Drawing.Size(71, 13); 416 this.lblClientName.TabIndex = 2; 417 this.lblClientName.Text = "lblClientName"; 418 // 419 // btnClientDetailClose 420 // 421 this.btnClientDetailClose.Location = new System.Drawing.Point(414, 4); 422 this.btnClientDetailClose.Name = "btnClientDetailClose"; 423 this.btnClientDetailClose.Size = new System.Drawing.Size(75, 23); 424 this.btnClientDetailClose.TabIndex = 1; 425 this.btnClientDetailClose.Text = "Close"; 426 this.btnClientDetailClose.UseVisualStyleBackColor = true; 427 this.btnClientDetailClose.Click += new System.EventHandler(this.btnClientClose_Click); 428 // 429 // pbClientControl 430 // 431 this.pbClientControl.Location = new System.Drawing.Point(3, 4); 432 this.pbClientControl.Name = "pbClientControl"; 433 this.pbClientControl.Size = new System.Drawing.Size(32, 32); 434 this.pbClientControl.TabIndex = 0; 435 this.pbClientControl.TabStop = false; 436 // 437 // pbUserControl 438 // 439 this.pbUserControl.Location = new System.Drawing.Point(3, 3); 440 this.pbUserControl.Name = "pbUserControl"; 441 this.pbUserControl.Size = new System.Drawing.Size(32, 32); 442 this.pbUserControl.TabIndex = 3; 443 this.pbUserControl.TabStop = false; 353 444 // 354 445 // plJobDetails … … 515 606 this.pbJobControl.TabStop = false; 516 607 // 517 // plClientDetails518 //519 this.plClientDetails.BackColor = System.Drawing.SystemColors.Window;520 this.plClientDetails.Controls.Add(this.lblLogin);521 this.plClientDetails.Controls.Add(this.lblLoginOn);522 this.plClientDetails.Controls.Add(this.lblClientName);523 this.plClientDetails.Controls.Add(this.btnClientDetailClose);524 this.plClientDetails.Controls.Add(this.pbClientControl);525 this.plClientDetails.Dock = System.Windows.Forms.DockStyle.Fill;526 this.plClientDetails.Location = new System.Drawing.Point(0, 0);527 this.plClientDetails.Name = "plClientDetails";528 this.plClientDetails.Size = new System.Drawing.Size(494, 346);529 this.plClientDetails.TabIndex = 1;530 //531 // lblLogin532 //533 this.lblLogin.AutoSize = true;534 this.lblLogin.Location = new System.Drawing.Point(100, 55);535 this.lblLogin.Name = "lblLogin";536 this.lblLogin.Size = new System.Drawing.Size(43, 13);537 this.lblLogin.TabIndex = 4;538 this.lblLogin.Text = "lblLogin";539 //540 // lblLoginOn541 //542 this.lblLoginOn.AutoSize = true;543 this.lblLoginOn.Location = new System.Drawing.Point(29, 55);544 this.lblLoginOn.Name = "lblLoginOn";545 this.lblLoginOn.Size = new System.Drawing.Size(65, 13);546 this.lblLoginOn.TabIndex = 3;547 this.lblLoginOn.Text = "logged in on";548 //549 // lblClientName550 //551 this.lblClientName.AutoSize = true;552 this.lblClientName.Location = new System.Drawing.Point(41, 14);553 this.lblClientName.Name = "lblClientName";554 this.lblClientName.Size = new System.Drawing.Size(71, 13);555 this.lblClientName.TabIndex = 2;556 this.lblClientName.Text = "lblClientName";557 //558 // btnClientDetailClose559 //560 this.btnClientDetailClose.Location = new System.Drawing.Point(414, 4);561 this.btnClientDetailClose.Name = "btnClientDetailClose";562 this.btnClientDetailClose.Size = new System.Drawing.Size(75, 23);563 this.btnClientDetailClose.TabIndex = 1;564 this.btnClientDetailClose.Text = "Close";565 this.btnClientDetailClose.UseVisualStyleBackColor = true;566 this.btnClientDetailClose.Click += new System.EventHandler(this.btnClientClose_Click);567 //568 // pbClientControl569 //570 this.pbClientControl.Location = new System.Drawing.Point(3, 4);571 this.pbClientControl.Name = "pbClientControl";572 this.pbClientControl.Size = new System.Drawing.Size(32, 32);573 this.pbClientControl.TabIndex = 0;574 this.pbClientControl.TabStop = false;575 //576 608 // plUserDetails 577 609 // … … 604 636 this.btnUserControlClose.UseVisualStyleBackColor = true; 605 637 this.btnUserControlClose.Click += new System.EventHandler(this.btnUserControlClose_Click); 606 //607 // pbUserControl608 //609 this.pbUserControl.Location = new System.Drawing.Point(3, 3);610 this.pbUserControl.Name = "pbUserControl";611 this.pbUserControl.Size = new System.Drawing.Size(32, 32);612 this.pbUserControl.TabIndex = 3;613 this.pbUserControl.TabStop = false;614 638 // 615 639 // treeView2 … … 667 691 this.scUserControl.Panel2.ResumeLayout(false); 668 692 this.scUserControl.ResumeLayout(false); 693 this.plClientDetails.ResumeLayout(false); 694 this.plClientDetails.PerformLayout(); 695 ((System.ComponentModel.ISupportInitialize)(this.pbClientControl)).EndInit(); 696 ((System.ComponentModel.ISupportInitialize)(this.pbUserControl)).EndInit(); 669 697 this.plJobDetails.ResumeLayout(false); 670 698 this.plJobDetails.PerformLayout(); 671 699 ((System.ComponentModel.ISupportInitialize)(this.pbJobControl)).EndInit(); 672 this.plClientDetails.ResumeLayout(false);673 this.plClientDetails.PerformLayout();674 ((System.ComponentModel.ISupportInitialize)(this.pbClientControl)).EndInit();675 700 this.plUserDetails.ResumeLayout(false); 676 701 this.plUserDetails.PerformLayout(); 677 ((System.ComponentModel.ISupportInitialize)(this.pbUserControl)).EndInit();678 702 ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).EndInit(); 679 703 this.ResumeLayout(false); … … 740 764 private System.Windows.Forms.ColumnHeader chTimeCalculated; 741 765 private System.Windows.Forms.ColumnHeader chProgress; 766 private System.Windows.Forms.Label lblStateClient; 767 private System.Windows.Forms.Label lblState; 742 768 } 743 769 } -
trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs
r1148 r1164 217 217 private void ClientClicked() { 218 218 int i = 0; 219 while ( usersList.List[i].Name != nameCurrentUser) {219 while (clientInfo.List[i].Name != nameCurrentClient) { 220 220 i++; 221 221 } … … 226 226 lblClientName.Text = currentClient.Name; 227 227 lblLogin.Text = currentClient.Login.ToString(); 228 lblState.Text = currentClient.State.ToString(); 228 229 } 229 230 … … 333 334 AddJobForm newForm = new AddJobForm(); 334 335 newForm.Show(); 336 newForm.addJobEvent += new addDelegate(Refresh); 337 } 338 339 private void Refresh() { 340 AddClients(); 341 AddJobs(); 342 AddUsers(); 335 343 } 336 344 … … 338 346 AddUserForm newForm = new AddUserForm("User", false); 339 347 newForm.Show(); 348 newForm.addUserEvent += new addDelegate(Refresh); 340 349 } 341 350 … … 343 352 AddUserForm newForm = new AddUserForm("User", true); 344 353 newForm.Show(); 354 newForm.addUserEvent += new addDelegate(Refresh); 345 355 } 346 356 … … 351 361 } 352 362 363 private void OnTVClientClicked(object sender, TreeViewEventArgs e) { 364 bool clientgroup = false; 365 foreach (ClientGroup cg in clients.List) { 366 if (tvClientControl.SelectedNode.Text == cg.Name) { 367 clientgroup = true; 368 } 369 } 370 if (clientgroup == false) { 371 nameCurrentClient = tvClientControl.SelectedNode.Text; 372 flagClient = true; 373 ClientClicked(); 374 } 375 376 } 377 353 378 private void OnLVJobControlClicked(object sender, EventArgs e) { 354 379 nameCurrentJob = lvJobControl.SelectedItems[0].Text; … … 357 382 } 358 383 359 private void OnTVJobControlClicked(object sender, EventArgs e) {384 private void OnTVJobControlClicked(object sender, TreeViewEventArgs e) { 360 385 try { 361 386 nameCurrentJob = Convert.ToInt32(tvJobControl.SelectedNode.Text).ToString(); … … 368 393 369 394 private void OnLVUserControlClicked(object sender, EventArgs e) { 370 nameCurrentUser = lvUserControl.SelectedItems[0]. Name;395 nameCurrentUser = lvUserControl.SelectedItems[0].Text; 371 396 flagUser = true; 372 397 UserClicked(); 373 398 } 399 400 private void OnTVUserControlClicked(object sender, TreeViewEventArgs e) { 401 bool usergroup = false; 402 foreach (UserGroup ug in userGroups.List) { 403 if (tvUserControl.SelectedNode.Text == ug.Name) { 404 usergroup = true; 405 } 406 } 407 if (usergroup == false) { 408 nameCurrentUser = tvUserControl.SelectedNode.Text; 409 flagUser = true; 410 UserClicked(); 411 } 412 413 } 414 374 415 375 416 private void btnClientClose_Click(object sender, EventArgs e) { … … 398 439 } 399 440 #endregion 441 400 442 } 401 443 }
Note: See TracChangeset
for help on using the changeset viewer.