Changeset 1598
- Timestamp:
- 04/17/09 14:17:05 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Server.Console/3.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.Designer.cs
r1581 r1598 73 73 this.scClientControl = new System.Windows.Forms.SplitContainer(); 74 74 this.lvClientControl = new System.Windows.Forms.ListView(); 75 this.contextMenuJob = new System.Windows.Forms.ContextMenuStrip(this.components); 76 this.menuItemAbortJob = new System.Windows.Forms.ToolStripMenuItem(); 77 this.menuItemGetSnapshot = new System.Windows.Forms.ToolStripMenuItem(); 75 78 this.tcManagementConsole = new System.Windows.Forms.TabControl(); 76 79 this.checkBox1 = new System.Windows.Forms.CheckBox(); … … 91 94 this.scClientControl.Panel2.SuspendLayout(); 92 95 this.scClientControl.SuspendLayout(); 96 this.contextMenuJob.SuspendLayout(); 93 97 this.tcManagementConsole.SuspendLayout(); 94 98 this.SuspendLayout(); … … 490 494 // 491 495 this.lvJobControl.AllowDrop = true; 496 this.lvJobControl.ContextMenuStrip = this.contextMenuJob; 492 497 this.lvJobControl.Dock = System.Windows.Forms.DockStyle.Fill; 493 498 this.lvJobControl.LargeImageList = this.ilJobControl; … … 498 503 this.lvJobControl.TabIndex = 0; 499 504 this.lvJobControl.UseCompatibleStateImageBehavior = false; 505 this.lvJobControl.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseUp); 500 506 this.lvJobControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseMove); 501 507 this.lvJobControl.Click += new System.EventHandler(this.OnLVJobControlClicked); … … 543 549 this.lvClientControl.UseCompatibleStateImageBehavior = false; 544 550 this.lvClientControl.Click += new System.EventHandler(this.OnLVClientClicked); 551 // 552 // contextMenuJob 553 // 554 this.contextMenuJob.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 555 this.menuItemAbortJob, 556 this.menuItemGetSnapshot}); 557 this.contextMenuJob.Name = "contextMenuJob"; 558 this.contextMenuJob.Size = new System.Drawing.Size(151, 48); 559 // 560 // menuItemAbortJob 561 // 562 this.menuItemAbortJob.Name = "menuItemAbortJob"; 563 this.menuItemAbortJob.Size = new System.Drawing.Size(150, 22); 564 this.menuItemAbortJob.Text = "Abort"; 565 // 566 // menuItemGetSnapshot 567 // 568 this.menuItemGetSnapshot.Name = "menuItemGetSnapshot"; 569 this.menuItemGetSnapshot.Size = new System.Drawing.Size(150, 22); 570 this.menuItemGetSnapshot.Text = "Get Snapshot"; 545 571 // 546 572 // tcManagementConsole … … 596 622 this.scClientControl.Panel2.ResumeLayout(false); 597 623 this.scClientControl.ResumeLayout(false); 624 this.contextMenuJob.ResumeLayout(false); 598 625 this.tcManagementConsole.ResumeLayout(false); 599 626 this.ResumeLayout(false); … … 653 680 private System.Windows.Forms.CheckBox checkBox1; 654 681 private System.Windows.Forms.ColumnHeader chSnapshotTime; 682 private System.Windows.Forms.ContextMenuStrip contextMenuJob; 683 private System.Windows.Forms.ToolStripMenuItem menuItemAbortJob; 684 private System.Windows.Forms.ToolStripMenuItem menuItemGetSnapshot; 655 685 } 656 686 } -
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs
r1595 r1598 63 63 public HiveServerManagementConsole() { 64 64 InitializeComponent(); 65 Init(); 65 66 AddClients(); 66 67 AddJobs(); … … 86 87 87 88 #endregion 89 90 private void Init() { 91 92 //adding context menu items for jobs 93 menuItemAbortJob.Click += (s, e) => { 94 IJobManager jobManager = ServiceLocator.GetJobManager(); 95 if (lvJobControl.SelectedItems.Count == 1) { 96 Guid jobID = Guid.Empty; 97 jobID = (Guid)TypeDescriptor.GetConverter(jobID).ConvertFrom(lvJobControl.SelectedItems[0].Text); 98 jobManager.AbortJob(jobID); 99 } 100 }; 101 102 menuItemGetSnapshot.Click += (s, e) => { 103 IJobManager jobManager = ServiceLocator.GetJobManager(); 104 if (lvJobControl.SelectedItems.Count == 1) { 105 Guid jobID = Guid.Empty; 106 jobID = (Guid)TypeDescriptor.GetConverter(jobID).ConvertFrom(lvJobControl.SelectedItems[0].Text); 107 jobManager.RequestSnapshot(jobID); 108 } 109 }; 110 111 } 112 113 private void lvJobControl_MouseUp(object sender, MouseEventArgs e) { 114 // If the right mouse button was clicked and released, 115 // display the shortcut menu assigned to the TreeView. 116 if (e.Button == MouseButtons.Right && lvJobControl.SelectedItems.Count == 1) { 117 lvJobControl.ContextMenuStrip.Show(new Point(e.X, e.Y)); 118 } 119 } 88 120 89 121 /// <summary> … … 690 722 #endregion 691 723 724 725 726 692 727 } 693 728 } -
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.resx
r1530 r1598 349 349 <value>580, 13</value> 350 350 </metadata> 351 <metadata name="contextMenuJob.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 352 <value>730, 13</value> 353 </metadata> 351 354 <metadata name="updaterWoker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 352 <value> 17, 50</value>355 <value>862, 13</value> 353 356 </metadata> 354 357 </root>
Note: See TracChangeset
for help on using the changeset viewer.