Changeset 1381
- Timestamp:
- 03/20/09 14:00:35 (16 years ago)
- Location:
- branches/Hive_Management_Console_Refactoring_Ticket508/HeuristicLab.Hive.Server.Console
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Hive_Management_Console_Refactoring_Ticket508/HeuristicLab.Hive.Server.Console/Changes.cs
r1273 r1381 14 14 15 15 public Change ChangeType { get; set; } 16 17 public int Position { get; set; } 16 18 } 17 19 } -
branches/Hive_Management_Console_Refactoring_Ticket508/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.Designer.cs
r1261 r1381 31 31 this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 32 32 this.jobToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 33 this.userToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();34 this.userToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();35 this.groupToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();36 this.tcManagementConsole = new System.Windows.Forms.TabControl();37 this.tpClientControl = new System.Windows.Forms.TabPage();38 this.scClientControl = new System.Windows.Forms.SplitContainer();39 this.tvClientControl = new System.Windows.Forms.TreeView();40 this.lvClientControl = new System.Windows.Forms.ListView();41 33 this.ilClientControl = new System.Windows.Forms.ImageList(this.components); 42 this.tpJobControl = new System.Windows.Forms.TabPage();43 this.scJobControl = new System.Windows.Forms.SplitContainer();44 this.tvJobControl = new System.Windows.Forms.TreeView();45 this.lvJobControl = new System.Windows.Forms.ListView();46 34 this.ilJobControl = new System.Windows.Forms.ImageList(this.components); 47 this.tpUserControl = new System.Windows.Forms.TabPage();48 this.scUserControl = new System.Windows.Forms.SplitContainer();49 this.tvUserControl = new System.Windows.Forms.TreeView();50 this.lvUserControl = new System.Windows.Forms.ListView();51 35 this.ilUserControl = new System.Windows.Forms.ImageList(this.components); 52 36 this.plClientDetails = new System.Windows.Forms.Panel(); … … 85 69 this.fileSystemWatcher1 = new System.IO.FileSystemWatcher(); 86 70 this.updaterWoker = new System.ComponentModel.BackgroundWorker(); 71 this.tpJobControl = new System.Windows.Forms.TabPage(); 72 this.scJobControl = new System.Windows.Forms.SplitContainer(); 73 this.lvJobControl = new System.Windows.Forms.ListView(); 74 this.tvJobControl = new System.Windows.Forms.TreeView(); 75 this.tpClientControl = new System.Windows.Forms.TabPage(); 76 this.scClientControl = new System.Windows.Forms.SplitContainer(); 77 this.lvClientControl = new System.Windows.Forms.ListView(); 78 this.tvClientControl = new System.Windows.Forms.TreeView(); 79 this.tcManagementConsole = new System.Windows.Forms.TabControl(); 87 80 this.menuStrip1.SuspendLayout(); 88 this.tcManagementConsole.SuspendLayout();89 this.tpClientControl.SuspendLayout();90 this.scClientControl.Panel1.SuspendLayout();91 this.scClientControl.Panel2.SuspendLayout();92 this.scClientControl.SuspendLayout();93 this.tpJobControl.SuspendLayout();94 this.scJobControl.Panel1.SuspendLayout();95 this.scJobControl.Panel2.SuspendLayout();96 this.scJobControl.SuspendLayout();97 this.tpUserControl.SuspendLayout();98 this.scUserControl.Panel1.SuspendLayout();99 this.scUserControl.Panel2.SuspendLayout();100 this.scUserControl.SuspendLayout();101 81 this.plClientDetails.SuspendLayout(); 102 82 ((System.ComponentModel.ISupportInitialize)(this.pbClientControl)).BeginInit(); … … 106 86 ((System.ComponentModel.ISupportInitialize)(this.pbJobControl)).BeginInit(); 107 87 ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).BeginInit(); 88 this.tpJobControl.SuspendLayout(); 89 this.scJobControl.Panel1.SuspendLayout(); 90 this.scJobControl.Panel2.SuspendLayout(); 91 this.scJobControl.SuspendLayout(); 92 this.tpClientControl.SuspendLayout(); 93 this.scClientControl.Panel1.SuspendLayout(); 94 this.scClientControl.Panel2.SuspendLayout(); 95 this.scClientControl.SuspendLayout(); 96 this.tcManagementConsole.SuspendLayout(); 108 97 this.SuspendLayout(); 109 98 // … … 137 126 // 138 127 this.addToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 139 this.jobToolStripMenuItem, 140 this.userToolStripMenuItem}); 128 this.jobToolStripMenuItem}); 141 129 this.addToolStripMenuItem.Name = "addToolStripMenuItem"; 142 130 this.addToolStripMenuItem.Size = new System.Drawing.Size(38, 20); … … 149 137 this.jobToolStripMenuItem.Text = "Job"; 150 138 this.jobToolStripMenuItem.Click += new System.EventHandler(this.AddJob_Click); 151 //152 // userToolStripMenuItem153 //154 this.userToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {155 this.userToolStripMenuItem1,156 this.groupToolStripMenuItem2});157 this.userToolStripMenuItem.Name = "userToolStripMenuItem";158 this.userToolStripMenuItem.Size = new System.Drawing.Size(107, 22);159 this.userToolStripMenuItem.Text = "User";160 //161 // userToolStripMenuItem1162 //163 this.userToolStripMenuItem1.Name = "userToolStripMenuItem1";164 this.userToolStripMenuItem1.Size = new System.Drawing.Size(114, 22);165 this.userToolStripMenuItem1.Text = "User";166 this.userToolStripMenuItem1.Click += new System.EventHandler(this.AddUser_Click);167 //168 // groupToolStripMenuItem2169 //170 this.groupToolStripMenuItem2.Name = "groupToolStripMenuItem2";171 this.groupToolStripMenuItem2.Size = new System.Drawing.Size(114, 22);172 this.groupToolStripMenuItem2.Text = "Group";173 this.groupToolStripMenuItem2.Click += new System.EventHandler(this.AddUserGroup_Click);174 //175 // tcManagementConsole176 //177 this.tcManagementConsole.Controls.Add(this.tpClientControl);178 this.tcManagementConsole.Controls.Add(this.tpJobControl);179 this.tcManagementConsole.Controls.Add(this.tpUserControl);180 this.tcManagementConsole.Dock = System.Windows.Forms.DockStyle.Fill;181 this.tcManagementConsole.Location = new System.Drawing.Point(0, 24);182 this.tcManagementConsole.Name = "tcManagementConsole";183 this.tcManagementConsole.SelectedIndex = 0;184 this.tcManagementConsole.Size = new System.Drawing.Size(651, 378);185 this.tcManagementConsole.TabIndex = 1;186 //187 // tpClientControl188 //189 this.tpClientControl.AllowDrop = true;190 this.tpClientControl.Controls.Add(this.scClientControl);191 this.tpClientControl.Location = new System.Drawing.Point(4, 22);192 this.tpClientControl.Name = "tpClientControl";193 this.tpClientControl.Padding = new System.Windows.Forms.Padding(3);194 this.tpClientControl.Size = new System.Drawing.Size(643, 352);195 this.tpClientControl.TabIndex = 0;196 this.tpClientControl.Text = "Client Control";197 this.tpClientControl.UseVisualStyleBackColor = true;198 //199 // scClientControl200 //201 this.scClientControl.Dock = System.Windows.Forms.DockStyle.Fill;202 this.scClientControl.Location = new System.Drawing.Point(3, 3);203 this.scClientControl.Name = "scClientControl";204 //205 // scClientControl.Panel1206 //207 this.scClientControl.Panel1.Controls.Add(this.tvClientControl);208 //209 // scClientControl.Panel2210 //211 this.scClientControl.Panel2.Controls.Add(this.lvClientControl);212 this.scClientControl.Size = new System.Drawing.Size(637, 346);213 this.scClientControl.SplitterDistance = 139;214 this.scClientControl.TabIndex = 0;215 //216 // tvClientControl217 //218 this.tvClientControl.Dock = System.Windows.Forms.DockStyle.Fill;219 this.tvClientControl.Location = new System.Drawing.Point(0, 0);220 this.tvClientControl.Name = "tvClientControl";221 this.tvClientControl.Size = new System.Drawing.Size(139, 346);222 this.tvClientControl.TabIndex = 0;223 this.tvClientControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVClientClicked);224 //225 // lvClientControl226 //227 this.lvClientControl.AllowDrop = true;228 this.lvClientControl.Dock = System.Windows.Forms.DockStyle.Fill;229 this.lvClientControl.ImeMode = System.Windows.Forms.ImeMode.Off;230 this.lvClientControl.LargeImageList = this.ilClientControl;231 this.lvClientControl.Location = new System.Drawing.Point(0, 0);232 this.lvClientControl.MultiSelect = false;233 this.lvClientControl.Name = "lvClientControl";234 this.lvClientControl.Size = new System.Drawing.Size(494, 346);235 this.lvClientControl.TabIndex = 0;236 this.lvClientControl.UseCompatibleStateImageBehavior = false;237 this.lvClientControl.Click += new System.EventHandler(this.OnLVClientClicked);238 139 // 239 140 // ilClientControl … … 245 146 this.ilClientControl.Images.SetKeyName(2, "monitor-red.png"); 246 147 // 247 // tpJobControl248 //249 this.tpJobControl.Controls.Add(this.scJobControl);250 this.tpJobControl.Location = new System.Drawing.Point(4, 22);251 this.tpJobControl.Name = "tpJobControl";252 this.tpJobControl.Padding = new System.Windows.Forms.Padding(3);253 this.tpJobControl.Size = new System.Drawing.Size(643, 352);254 this.tpJobControl.TabIndex = 1;255 this.tpJobControl.Text = "Job Control";256 this.tpJobControl.UseVisualStyleBackColor = true;257 //258 // scJobControl259 //260 this.scJobControl.Dock = System.Windows.Forms.DockStyle.Fill;261 this.scJobControl.Location = new System.Drawing.Point(3, 3);262 this.scJobControl.Name = "scJobControl";263 //264 // scJobControl.Panel1265 //266 this.scJobControl.Panel1.Controls.Add(this.tvJobControl);267 //268 // scJobControl.Panel2269 //270 this.scJobControl.Panel2.Controls.Add(this.lvJobControl);271 this.scJobControl.Size = new System.Drawing.Size(637, 346);272 this.scJobControl.SplitterDistance = 139;273 this.scJobControl.TabIndex = 1;274 //275 // tvJobControl276 //277 this.tvJobControl.Dock = System.Windows.Forms.DockStyle.Fill;278 this.tvJobControl.Location = new System.Drawing.Point(0, 0);279 this.tvJobControl.Name = "tvJobControl";280 this.tvJobControl.Size = new System.Drawing.Size(139, 346);281 this.tvJobControl.TabIndex = 2;282 this.tvJobControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVJobControlClicked);283 //284 // lvJobControl285 //286 this.lvJobControl.AllowDrop = true;287 this.lvJobControl.Dock = System.Windows.Forms.DockStyle.Fill;288 this.lvJobControl.LargeImageList = this.ilJobControl;289 this.lvJobControl.Location = new System.Drawing.Point(0, 0);290 this.lvJobControl.MultiSelect = false;291 this.lvJobControl.Name = "lvJobControl";292 this.lvJobControl.Size = new System.Drawing.Size(494, 346);293 this.lvJobControl.TabIndex = 0;294 this.lvJobControl.UseCompatibleStateImageBehavior = false;295 this.lvJobControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseMove);296 this.lvJobControl.Click += new System.EventHandler(this.OnLVJobControlClicked);297 //298 148 // ilJobControl 299 149 // … … 301 151 this.ilJobControl.TransparentColor = System.Drawing.Color.Transparent; 302 152 this.ilJobControl.Images.SetKeyName(0, "PlayHS.png"); 303 //304 // tpUserControl305 //306 this.tpUserControl.Controls.Add(this.scUserControl);307 this.tpUserControl.Location = new System.Drawing.Point(4, 22);308 this.tpUserControl.Name = "tpUserControl";309 this.tpUserControl.Padding = new System.Windows.Forms.Padding(3);310 this.tpUserControl.Size = new System.Drawing.Size(643, 352);311 this.tpUserControl.TabIndex = 2;312 this.tpUserControl.Text = "User Control";313 this.tpUserControl.UseVisualStyleBackColor = true;314 //315 // scUserControl316 //317 this.scUserControl.Dock = System.Windows.Forms.DockStyle.Fill;318 this.scUserControl.Location = new System.Drawing.Point(3, 3);319 this.scUserControl.Name = "scUserControl";320 //321 // scUserControl.Panel1322 //323 this.scUserControl.Panel1.Controls.Add(this.tvUserControl);324 //325 // scUserControl.Panel2326 //327 this.scUserControl.Panel2.Controls.Add(this.lvUserControl);328 this.scUserControl.Size = new System.Drawing.Size(637, 346);329 this.scUserControl.SplitterDistance = 139;330 this.scUserControl.TabIndex = 1;331 //332 // tvUserControl333 //334 this.tvUserControl.Dock = System.Windows.Forms.DockStyle.Fill;335 this.tvUserControl.Location = new System.Drawing.Point(0, 0);336 this.tvUserControl.Name = "tvUserControl";337 this.tvUserControl.Size = new System.Drawing.Size(139, 346);338 this.tvUserControl.TabIndex = 1;339 this.tvUserControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVUserControlClicked);340 //341 // lvUserControl342 //343 this.lvUserControl.AllowDrop = true;344 this.lvUserControl.Dock = System.Windows.Forms.DockStyle.Fill;345 this.lvUserControl.LargeImageList = this.ilUserControl;346 this.lvUserControl.Location = new System.Drawing.Point(0, 0);347 this.lvUserControl.Name = "lvUserControl";348 this.lvUserControl.Size = new System.Drawing.Size(494, 346);349 this.lvUserControl.TabIndex = 1;350 this.lvUserControl.UseCompatibleStateImageBehavior = false;351 this.lvUserControl.Click += new System.EventHandler(this.OnLVUserControlClicked);352 153 // 353 154 // ilUserControl … … 465 266 this.btnUserControlClose.Text = "Close"; 466 267 this.btnUserControlClose.UseVisualStyleBackColor = true; 467 this.btnUserControlClose.Click += new System.EventHandler(this.btnUserControlClose_Click);468 268 // 469 269 // pbUserControl … … 669 469 // 670 470 this.updaterWoker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.updaterWoker_DoWork); 471 this.updaterWoker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.updaterWoker_RunWorkerCompleted); 472 // 473 // tpJobControl 474 // 475 this.tpJobControl.Controls.Add(this.scJobControl); 476 this.tpJobControl.Location = new System.Drawing.Point(4, 22); 477 this.tpJobControl.Name = "tpJobControl"; 478 this.tpJobControl.Padding = new System.Windows.Forms.Padding(3); 479 this.tpJobControl.Size = new System.Drawing.Size(643, 352); 480 this.tpJobControl.TabIndex = 1; 481 this.tpJobControl.Text = "Job Control"; 482 this.tpJobControl.UseVisualStyleBackColor = true; 483 // 484 // scJobControl 485 // 486 this.scJobControl.Dock = System.Windows.Forms.DockStyle.Fill; 487 this.scJobControl.Location = new System.Drawing.Point(3, 3); 488 this.scJobControl.Name = "scJobControl"; 489 // 490 // scJobControl.Panel1 491 // 492 this.scJobControl.Panel1.Controls.Add(this.tvJobControl); 493 // 494 // scJobControl.Panel2 495 // 496 this.scJobControl.Panel2.Controls.Add(this.lvJobControl); 497 this.scJobControl.Size = new System.Drawing.Size(637, 346); 498 this.scJobControl.SplitterDistance = 139; 499 this.scJobControl.TabIndex = 1; 500 // 501 // lvJobControl 502 // 503 this.lvJobControl.AllowDrop = true; 504 this.lvJobControl.Dock = System.Windows.Forms.DockStyle.Fill; 505 this.lvJobControl.LargeImageList = this.ilJobControl; 506 this.lvJobControl.Location = new System.Drawing.Point(0, 0); 507 this.lvJobControl.MultiSelect = false; 508 this.lvJobControl.Name = "lvJobControl"; 509 this.lvJobControl.Size = new System.Drawing.Size(494, 346); 510 this.lvJobControl.TabIndex = 0; 511 this.lvJobControl.UseCompatibleStateImageBehavior = false; 512 this.lvJobControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseMove); 513 this.lvJobControl.Click += new System.EventHandler(this.OnLVJobControlClicked); 514 // 515 // tvJobControl 516 // 517 this.tvJobControl.Dock = System.Windows.Forms.DockStyle.Fill; 518 this.tvJobControl.Location = new System.Drawing.Point(0, 0); 519 this.tvJobControl.Name = "tvJobControl"; 520 this.tvJobControl.Size = new System.Drawing.Size(139, 346); 521 this.tvJobControl.TabIndex = 2; 522 this.tvJobControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVJobControlClicked); 523 // 524 // tpClientControl 525 // 526 this.tpClientControl.AllowDrop = true; 527 this.tpClientControl.Controls.Add(this.scClientControl); 528 this.tpClientControl.Location = new System.Drawing.Point(4, 22); 529 this.tpClientControl.Name = "tpClientControl"; 530 this.tpClientControl.Padding = new System.Windows.Forms.Padding(3); 531 this.tpClientControl.Size = new System.Drawing.Size(643, 352); 532 this.tpClientControl.TabIndex = 0; 533 this.tpClientControl.Text = "Client Control"; 534 this.tpClientControl.UseVisualStyleBackColor = true; 535 // 536 // scClientControl 537 // 538 this.scClientControl.Dock = System.Windows.Forms.DockStyle.Fill; 539 this.scClientControl.Location = new System.Drawing.Point(3, 3); 540 this.scClientControl.Name = "scClientControl"; 541 // 542 // scClientControl.Panel1 543 // 544 this.scClientControl.Panel1.Controls.Add(this.tvClientControl); 545 // 546 // scClientControl.Panel2 547 // 548 this.scClientControl.Panel2.Controls.Add(this.lvClientControl); 549 this.scClientControl.Size = new System.Drawing.Size(637, 346); 550 this.scClientControl.SplitterDistance = 139; 551 this.scClientControl.TabIndex = 0; 552 // 553 // lvClientControl 554 // 555 this.lvClientControl.AllowDrop = true; 556 this.lvClientControl.Dock = System.Windows.Forms.DockStyle.Fill; 557 this.lvClientControl.ImeMode = System.Windows.Forms.ImeMode.Off; 558 this.lvClientControl.LargeImageList = this.ilClientControl; 559 this.lvClientControl.Location = new System.Drawing.Point(0, 0); 560 this.lvClientControl.MultiSelect = false; 561 this.lvClientControl.Name = "lvClientControl"; 562 this.lvClientControl.Size = new System.Drawing.Size(494, 346); 563 this.lvClientControl.TabIndex = 0; 564 this.lvClientControl.UseCompatibleStateImageBehavior = false; 565 this.lvClientControl.Click += new System.EventHandler(this.OnLVClientClicked); 566 // 567 // tvClientControl 568 // 569 this.tvClientControl.Dock = System.Windows.Forms.DockStyle.Fill; 570 this.tvClientControl.Location = new System.Drawing.Point(0, 0); 571 this.tvClientControl.Name = "tvClientControl"; 572 this.tvClientControl.Size = new System.Drawing.Size(139, 346); 573 this.tvClientControl.TabIndex = 0; 574 this.tvClientControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVClientClicked); 575 // 576 // tcManagementConsole 577 // 578 this.tcManagementConsole.Controls.Add(this.tpClientControl); 579 this.tcManagementConsole.Controls.Add(this.tpJobControl); 580 this.tcManagementConsole.Dock = System.Windows.Forms.DockStyle.Fill; 581 this.tcManagementConsole.Location = new System.Drawing.Point(0, 24); 582 this.tcManagementConsole.Name = "tcManagementConsole"; 583 this.tcManagementConsole.SelectedIndex = 0; 584 this.tcManagementConsole.Size = new System.Drawing.Size(651, 378); 585 this.tcManagementConsole.TabIndex = 1; 671 586 // 672 587 // HiveServerManagementConsole … … 683 598 this.menuStrip1.ResumeLayout(false); 684 599 this.menuStrip1.PerformLayout(); 685 this.tcManagementConsole.ResumeLayout(false);686 this.tpClientControl.ResumeLayout(false);687 this.scClientControl.Panel1.ResumeLayout(false);688 this.scClientControl.Panel2.ResumeLayout(false);689 this.scClientControl.ResumeLayout(false);690 this.tpJobControl.ResumeLayout(false);691 this.scJobControl.Panel1.ResumeLayout(false);692 this.scJobControl.Panel2.ResumeLayout(false);693 this.scJobControl.ResumeLayout(false);694 this.tpUserControl.ResumeLayout(false);695 this.scUserControl.Panel1.ResumeLayout(false);696 this.scUserControl.Panel2.ResumeLayout(false);697 this.scUserControl.ResumeLayout(false);698 600 this.plClientDetails.ResumeLayout(false); 699 601 this.plClientDetails.PerformLayout(); … … 706 608 ((System.ComponentModel.ISupportInitialize)(this.pbJobControl)).EndInit(); 707 609 ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).EndInit(); 610 this.tpJobControl.ResumeLayout(false); 611 this.scJobControl.Panel1.ResumeLayout(false); 612 this.scJobControl.Panel2.ResumeLayout(false); 613 this.scJobControl.ResumeLayout(false); 614 this.tpClientControl.ResumeLayout(false); 615 this.scClientControl.Panel1.ResumeLayout(false); 616 this.scClientControl.Panel2.ResumeLayout(false); 617 this.scClientControl.ResumeLayout(false); 618 this.tcManagementConsole.ResumeLayout(false); 708 619 this.ResumeLayout(false); 709 620 this.PerformLayout(); … … 716 627 private System.Windows.Forms.ToolStripMenuItem informationToolStripMenuItem; 717 628 private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem; 718 private System.Windows.Forms.TabControl tcManagementConsole;719 private System.Windows.Forms.TabPage tpClientControl;720 private System.Windows.Forms.TabPage tpJobControl;721 private System.Windows.Forms.SplitContainer scClientControl;722 private System.Windows.Forms.TabPage tpUserControl;723 private System.Windows.Forms.TreeView tvClientControl;724 private System.Windows.Forms.ListView lvClientControl;725 private System.Windows.Forms.SplitContainer scJobControl;726 private System.Windows.Forms.ListView lvJobControl;727 private System.Windows.Forms.SplitContainer scUserControl;728 629 private System.Windows.Forms.TreeView treeView2; 729 630 private System.Windows.Forms.ListView listView2; 730 private System.Windows.Forms.TreeView tvJobControl;731 private System.Windows.Forms.TreeView tvUserControl;732 private System.Windows.Forms.ListView lvUserControl;733 631 private System.Windows.Forms.ImageList ilClientControl; 734 632 private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem; 735 633 private System.Windows.Forms.ToolStripMenuItem jobToolStripMenuItem; 736 private System.Windows.Forms.ToolStripMenuItem userToolStripMenuItem;737 private System.Windows.Forms.ToolStripMenuItem userToolStripMenuItem1;738 private System.Windows.Forms.ToolStripMenuItem groupToolStripMenuItem2;739 634 private System.Windows.Forms.ImageList ilUserControl; 740 635 private System.Windows.Forms.Timer timerSyncronize; … … 772 667 private System.Windows.Forms.Label lblState; 773 668 private System.ComponentModel.BackgroundWorker updaterWoker; 669 private System.Windows.Forms.TabControl tcManagementConsole; 670 private System.Windows.Forms.TabPage tpClientControl; 671 private System.Windows.Forms.SplitContainer scClientControl; 672 private System.Windows.Forms.TreeView tvClientControl; 673 private System.Windows.Forms.ListView lvClientControl; 674 private System.Windows.Forms.TabPage tpJobControl; 675 private System.Windows.Forms.SplitContainer scJobControl; 676 private System.Windows.Forms.TreeView tvJobControl; 677 private System.Windows.Forms.ListView lvJobControl; 774 678 } 775 679 } -
branches/Hive_Management_Console_Refactoring_Ticket508/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs
r1372 r1381 44 44 private ResponseList<ClientInfo> clientInfo = null; 45 45 private ResponseList<Job> jobs = null; 46 private ResponseList<UserGroup> userGroups = null;47 private ResponseList<User> usersList = null;48 46 49 47 private Dictionary<long, ListViewGroup> clientObjects; 50 48 private Dictionary<long, ListViewItem> clientInfoObjects; 51 49 private Dictionary<long, ListViewItem> jobObjects; 52 private Dictionary<long, ListViewGroup> userGroupsObjects;53 private Dictionary<long, ListViewItem> userListObjects;54 50 55 51 private Job currentJob = null; 56 52 private ClientInfo currentClient = null; 57 private User currentUser = null;58 53 private string nameCurrentJob = ""; 59 54 private string nameCurrentClient = ""; … … 72 67 AddClients(); 73 68 AddJobs(); 74 AddUsers();75 69 timerSyncronize.Start(); 76 70 } … … 82 76 /// <param name="e"></param> 83 77 private void TickSync(object obj, EventArgs e) { 84 //Refresh();85 78 if (!updaterWoker.IsBusy) { 86 79 updaterWoker.RunWorkerAsync(); … … 138 131 } 139 132 133 134 List<ListViewGroup> jobGroup; 140 135 /// <summary> 141 136 /// Adds jobs to ListView and TreeView … … 154 149 ListViewGroup lvJobFinished = new ListViewGroup("finished", HorizontalAlignment.Left); 155 150 ListViewGroup lvJobPending = new ListViewGroup("pending", HorizontalAlignment.Left); 151 152 jobGroup = new List<ListViewGroup>(); 153 jobGroup.Add(lvJobCalculating); 154 jobGroup.Add(lvJobFinished); 155 jobGroup.Add(lvJobPending); 156 156 157 tvJobControl.Nodes.Add("calculating"); 157 158 tvJobControl.Nodes.Add("finished"); … … 188 189 if (flagJob) { 189 190 JobClicked(); 190 }191 }192 catch (Exception ex) {193 closeFormEvent(true, true);194 this.Close();195 }196 }197 198 /// <summary>199 /// Adds users to ListView and TreeView200 /// </summary>201 private void AddUsers() {202 try {203 userGroupsObjects = new Dictionary<long, ListViewGroup>();204 userListObjects = new Dictionary<long, ListViewItem>();205 IUserRoleManager userRoleManager =206 ServiceLocator.GetUserRoleManager();207 208 userGroups = userRoleManager.GetAllUserGroups();209 210 lvUserControl.Items.Clear();211 tvUserControl.Nodes.Clear();212 213 foreach (UserGroup ug in userGroups.List) {214 tvUserControl.Nodes.Add(ug.Name);215 ListViewGroup lvg = new ListViewGroup(ug.Name, HorizontalAlignment.Left);216 217 foreach (PermissionOwner permOwner in ug.Members) {218 if (permOwner is User) {219 User users = permOwner as User;220 tvUserControl.Nodes[tvUserControl.Nodes.Count - 1].Nodes.Add(users.Name);221 ListViewItem item = new ListViewItem(users.Name, 0, lvg);222 lvUserControl.Items.Add(item);223 userListObjects.Add(users.Id, item);224 }225 }226 lvUserControl.Groups.Add(lvg);227 userGroupsObjects.Add(ug.Id, lvg);228 229 } // Users230 usersList = userRoleManager.GetAllUsers();231 ListViewGroup lvunsorted = new ListViewGroup("unsorted", HorizontalAlignment.Left);232 foreach (User u in usersList.List) {233 tvUserControl.Nodes.Add(u.Name);234 lvUserControl.Items.Add(new ListViewItem(u.Name, 0, lvunsorted));235 }236 lvUserControl.BeginUpdate();237 lvUserControl.Groups.Add(lvunsorted);238 lvUserControl.EndUpdate();239 if (flagUser) {240 UserClicked();241 191 } 242 192 } … … 337 287 } 338 288 339 /// <summary>340 /// if one user is clicked, a panel is opened with the details341 /// </summary>342 private void UserClicked() {343 int i = 0;344 while (usersList.List[i].Name != nameCurrentUser) {345 i++;346 }347 currentUser = usersList.List[i];348 scUserControl.Panel2.Controls.Clear();349 scUserControl.Panel2.Controls.Add(plUserDetails);350 pbUserControl.Image = ilUserControl.Images[0];351 lblUserName.Text = currentUser.Id.ToString();352 }353 354 289 #region Eventhandlers 355 290 /// <summary> … … 376 311 } 377 312 313 private void Refresh() { 314 foreach (Changes change in changes) { 315 if (change.Types == Type.Job) { 316 if (change.ChangeType == Change.Update) { 317 //if (jobObjects[change.ID].ListView.Groups.ToString() == ) {} 318 //ListViewItem lvi = new ListViewItem( 319 // jobs.List[change.Position].Id.ToString(), 0); 320 } else if (change.ChangeType == Change.Create) { 321 ListViewItem lvi = new ListViewItem( 322 jobs.List[change.Position].Id.ToString(), 0, jobGroup[2]); 323 jobObjects.Add(change.ID, lvi); 324 lvJobControl.Items.Add(lvi); 325 326 } else if (change.ChangeType == Change.Delete) { 327 jobObjects.Remove(change.Position); 328 } 329 330 } 331 } 332 333 } 334 378 335 private void AddJob_Click(object sender, EventArgs e) { 379 336 AddJobForm newForm = new AddJobForm(); 380 337 newForm.Show(); 381 338 //newForm.addJobEvent += new addDelegate(updaterWoker.RunWorkerAsync); 382 }383 384 private void Refresh() {385 AddClients();386 AddJobs();387 AddUsers();388 }389 390 private void AddUser_Click(object sender, EventArgs e) {391 AddUserForm newForm = new AddUserForm("User", false);392 newForm.Show();393 newForm.addUserEvent += new addDelegate(Refresh);394 }395 396 private void AddUserGroup_Click(object sender, EventArgs e) {397 AddUserForm newForm = new AddUserForm("User", true);398 newForm.Show();399 newForm.addUserEvent += new addDelegate(Refresh);400 339 } 401 340 … … 437 376 } 438 377 439 private void OnLVUserControlClicked(object sender, EventArgs e) {440 nameCurrentUser = lvUserControl.SelectedItems[0].Text;441 flagUser = true;442 UserClicked();443 }444 445 private void OnTVUserControlClicked(object sender, TreeViewEventArgs e) {446 bool usergroup = false;447 foreach (UserGroup ug in userGroups.List) {448 if (tvUserControl.SelectedNode.Text == ug.Name) {449 usergroup = true;450 }451 }452 if (usergroup == false) {453 nameCurrentUser = tvUserControl.SelectedNode.Text;454 flagUser = true;455 UserClicked();456 }457 458 }459 460 461 378 private void btnClientClose_Click(object sender, EventArgs e) { 462 379 scClientControl.Panel2.Controls.Clear(); … … 469 386 scJobControl.Panel2.Controls.Add(lvJobControl); 470 387 flagJob = false; 471 }472 473 private void btnUserControlClose_Click(object sender, EventArgs e) {474 scUserControl.Panel2.Controls.Clear();475 scUserControl.Panel2.Controls.Add(lvUserControl);476 flagUser = false;477 388 } 478 389 … … 493 404 clientInfo = clientManager.GetAllClients(); 494 405 495 ResponseList<ClientInfo> clientInfoOldHelp;406 IDictionary<int, ClientInfo> clientInfoOldHelp; 496 407 497 408 CloneList(clientInfoOld, out clientInfoOldHelp); 498 409 499 GetDelta(clientInfoOld.List, clientInfoOldHelp .List);410 GetDelta(clientInfoOld.List, clientInfoOldHelp); 500 411 #endregion 501 412 … … 505 416 clients = clientManager.GetAllClientGroups(); 506 417 507 ResponseList<ClientGroup> clientsOldHelp;418 IDictionary<int, ClientGroup> clientsOldHelp; 508 419 509 420 CloneList(clientsOld, out clientsOldHelp); 510 421 511 GetDelta(clientsOld.List, clientsOldHelp .List);422 GetDelta(clientsOld.List, clientsOldHelp); 512 423 #endregion 513 424 … … 519 430 jobs = jobManager.GetAllJobs(); 520 431 521 ResponseList<Job> jobsOldHelp = new ResponseList<Job>();432 IDictionary<int, Job> jobsOldHelp; 522 433 CloneList(jobsOld, out jobsOldHelp); 523 434 524 435 //System.Diagnostics.Debug.WriteLine(jobsOldHelp.List[0].Id.ToString()); 525 436 526 GetDelta(jobsOld.List, jobsOldHelp .List);437 GetDelta(jobsOld.List, jobsOldHelp); 527 438 528 439 #endregion 529 440 441 foreach (Changes change in changes) { 442 System.Diagnostics.Debug.WriteLine(change.ID + " " + change.ChangeType); 443 } 444 530 445 } 531 446 #endregion … … 533 448 #region Helper methods 534 449 535 private void CloneList(ResponseList<Job> oldList, out ResponseList<Job> newList) { 536 newList = new ResponseList<Job>(); 537 newList.List = new List<Job>(); 538 foreach (Job item in oldList.List) { 539 newList.List.Add(item); 540 } 541 } 542 543 private void CloneList(ResponseList<ClientInfo> oldList, out ResponseList<ClientInfo> newList) { 544 newList = new ResponseList<ClientInfo>(); 545 newList.List = new List<ClientInfo>(); 546 foreach (ClientInfo item in oldList.List) { 547 newList.List.Add(item); 548 } 549 } 550 551 private void CloneList(ResponseList<ClientGroup> oldList, out ResponseList<ClientGroup> newList) { 552 newList = new ResponseList<ClientGroup>(); 553 newList.List = new List<ClientGroup>(); 554 foreach (ClientGroup item in oldList.List) { 555 newList.List.Add(item); 450 private void CloneList(ResponseList<Job> oldList, out IDictionary<int, Job> newList) { 451 newList = new Dictionary<int, Job>(); 452 for (int i = 0; i < oldList.List.Count; i++) { 453 newList.Add(i, oldList.List[i]); 454 } 455 } 456 457 private void CloneList(ResponseList<ClientInfo> oldList, out IDictionary<int, ClientInfo> newList) { 458 newList = new Dictionary<int, ClientInfo>(); 459 for (int i = 0; i < oldList.List.Count; i ++) { 460 newList.Add(i, oldList.List[i]); 461 } 462 } 463 464 private void CloneList(ResponseList<ClientGroup> oldList, out IDictionary<int, ClientGroup> newList) { 465 newList = new Dictionary<int, ClientGroup>(); 466 for (int i = 0; i < oldList.List.Count; i++) { 467 newList.Add(i, oldList.List[i]); 556 468 } 557 469 } … … 563 475 } 564 476 565 private void GetDelta(IList<ClientInfo> oldClient, I List<ClientInfo> helpClients) {477 private void GetDelta(IList<ClientInfo> oldClient, IDictionary<int, ClientInfo> helpClients) { 566 478 bool found = false; 567 479 568 foreach (ClientInfo ci in clientInfo.List) { 569 for (int i = 0; i < oldClient.Count; i++) { 570 ClientInfo cio = oldClient[i]; 480 for (int i = 0; i < clientInfo.List.Count; i ++) { 481 ClientInfo ci = clientInfo.List[i]; 482 for (int j = 0; j < oldClient.Count; j++) { 483 ClientInfo cio = oldClient[j]; 571 484 if (ci.Id.Equals(cio.Id)) { 572 485 found = true; 573 486 if (ci.State != cio.State) { 574 changes.Add(new Changes { Types = Type.Client, ID = ci.Id, ChangeType = Change.Update }); 575 } 576 for (int j = 0; j < helpClients.Count; j++) { 577 if (cio.Id.Equals(helpClients[j])) { 578 helpClients.RemoveAt(j); 487 changes.Add(new Changes { Types = Type.Client, ID = ci.Id, ChangeType = Change.Update, Position = i }); 488 } 489 int removeAt = -1; 490 foreach (KeyValuePair<int, ClientInfo> kvp in helpClients) { 491 if (cio.Id.Equals(kvp.Value.Id)) { 492 removeAt = kvp.Key; 579 493 break; 580 494 } 581 495 } 496 if (removeAt >= 0) { 497 helpClients.Remove(removeAt); 498 } 582 499 break; 583 500 } … … 588 505 found = false; 589 506 } 590 foreach ( ClientInfo ciin helpClients) {591 changes.Add(new Changes { Types = Type.Client, ID = ci.Id, ChangeType = Change.Delete});592 } 593 594 } 595 596 private void GetDelta(IList<ClientGroup> oldClient, I List<ClientGroup> helpClients) {507 foreach (KeyValuePair<int, ClientInfo> kvp in helpClients) { 508 changes.Add(new Changes { Types = Type.Client, ID = kvp.Value.Id, ChangeType = Change.Delete, Position = kvp.Key }); 509 } 510 511 } 512 513 private void GetDelta(IList<ClientGroup> oldClient, IDictionary<int, ClientGroup> helpClients) { 597 514 598 515 bool found = false; 599 foreach (ClientGroup cg in clients.List) { 600 for (int i = 0; i < oldClient.Count; i++) { 601 ClientGroup cgo = oldClient[i]; 516 for (int i = 0; i < clients.List.Count; i++) { 517 ClientGroup cg = clients.List[i]; 518 for (int j = 0; j < oldClient.Count; i++) { 519 ClientGroup cgo = oldClient[j]; 602 520 if (cg.Id.Equals(cgo.Id)) { 603 521 found = true; … … 606 524 if (resource.Id.Equals(resourceold.Id)) { 607 525 if (resourceold.Name != resource.Name) { 608 changes.Add(new Changes { Types = Type.Client, ID = cg.Id, ChangeType = Change.Update });526 changes.Add(new Changes { Types = Type.Client, ID = cg.Id, ChangeType = Change.Update, Position = i }); 609 527 } 610 528 } 611 529 } 612 530 } 613 for (int j = 0; j < helpClients.Count; j++) {614 if (cgo.Id.Equals(helpClients[ j])) {615 helpClients.Remove At(j);531 for (int k = 0; k < helpClients.Count; k++) { 532 if (cgo.Id.Equals(helpClients[k].Id)) { 533 helpClients.Remove(k); 616 534 break; 617 535 } … … 625 543 found = false; 626 544 } 627 foreach ( ClientGroup cgin helpClients) {628 changes.Add(new Changes { Types = Type.ClientGroup, ID = cg.Id, ChangeType = Change.Delete});629 } 630 } 631 632 private void GetDelta(IList<Job> oldJobs, I List<Job> helpJobs) {545 foreach (KeyValuePair<int, ClientGroup> kvp in helpClients) { 546 changes.Add(new Changes { Types = Type.ClientGroup, ID = kvp.Value.Id, ChangeType = Change.Delete, Position = kvp.Key }); 547 } 548 } 549 550 private void GetDelta(IList<Job> oldJobs, IDictionary<int, Job> helpJobs) { 633 551 bool found = false; 634 for each (Job job in jobs.List) {635 636 for (int i = 0; i < oldJobs.Count; i++) {637 638 Job jobold = oldJobs[ i];552 for (int i = 0; i < jobs.List.Count; i ++ ) { 553 Job job = jobs.List[i]; 554 for (int j = 0; j < oldJobs.Count; j++) { 555 556 Job jobold = oldJobs[j]; 639 557 640 558 if (job.Id.Equals(jobold.Id)) { 641 559 642 560 found = true; 643 if (IsEqual(job.Client, jobold.Client)) { 644 changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Update }); 561 if (job.State != State.offline) { 562 if (!IsEqual(job.Client, jobold.Client)) { 563 changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Update }); 564 } 645 565 } else if (job.DateCalculated != jobold.DateCalculated) { 646 566 changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Update }); 647 567 } 648 568 649 for (int j = 0; j < helpJobs.Count; j++) { 650 if (job.Id.Equals(helpJobs[j].Id)) { 651 helpJobs.RemoveAt(j); 569 int removeAt = -1; 570 foreach (KeyValuePair<int, Job> kvp in helpJobs) { 571 if (job.Id.Equals(kvp.Value.Id)) { 572 removeAt = kvp.Key; 652 573 break; 653 574 } 575 } 576 if (removeAt >= 0) { 577 helpJobs.Remove(removeAt); 654 578 } 655 579 break; … … 663 587 found = false; 664 588 } 665 foreach ( Job jobin helpJobs) {666 changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Delete});667 System.Diagnostics.Debug.WriteLine("delete Job: " + job.Id);589 foreach (KeyValuePair<int, Job> kvp in helpJobs) { 590 changes.Add(new Changes { Types = Type.Job, ID = kvp.Value.Id, ChangeType = Change.Delete, Position = kvp.Key }); 591 System.Diagnostics.Debug.WriteLine("delete Job: " + kvp.Value.Id); 668 592 } 669 593 } … … 671 595 672 596 #endregion 597 598 private void updaterWoker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { 599 Refresh(); 600 } 673 601 674 602
Note: See TracChangeset
for help on using the changeset viewer.