Changeset 5315
- Timestamp:
- 01/17/11 20:58:36 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/MainWindow.Designer.cs
r5314 r5315 28 28 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); 29 29 this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components); 30 this.slaveView = new HeuristicLab.Clients.Hive.Slave.Views.SlaveView();31 30 this.contextMenuNotifyIcon = new System.Windows.Forms.ContextMenuStrip(this.components); 32 31 this.showToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 33 32 this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 33 this.slaveView = new HeuristicLab.Clients.Hive.Slave.Views.SlaveView(); 34 34 this.contextMenuNotifyIcon.SuspendLayout(); 35 35 this.SuspendLayout(); … … 44 44 this.notifyIcon.Visible = true; 45 45 this.notifyIcon.DoubleClick += new System.EventHandler(this.notifyIcon_DoubleClick); 46 //47 // slaveView48 //49 this.slaveView.Caption = "HeuristicLab Slave View";50 this.slaveView.Content = null;51 this.slaveView.Location = new System.Drawing.Point(12, 12);52 this.slaveView.Name = "slaveView";53 this.slaveView.ReadOnly = false;54 this.slaveView.Size = new System.Drawing.Size(509, 343);55 this.slaveView.TabIndex = 0;56 46 // 57 47 // contextMenuNotifyIcon … … 77 67 this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click); 78 68 // 69 // slaveView 70 // 71 this.slaveView.Caption = "HeuristicLab Slave View"; 72 this.slaveView.Content = null; 73 this.slaveView.Location = new System.Drawing.Point(12, 12); 74 this.slaveView.Name = "slaveView"; 75 this.slaveView.ReadOnly = false; 76 this.slaveView.Size = new System.Drawing.Size(658, 343); 77 this.slaveView.TabIndex = 0; 78 // 79 79 // MainWindow 80 80 // 81 81 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 82 82 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 83 this.ClientSize = new System.Drawing.Size(6 43, 433);83 this.ClientSize = new System.Drawing.Size(676, 433); 84 84 this.ContextMenuStrip = this.contextMenuNotifyIcon; 85 85 this.Controls.Add(this.slaveView); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveItem.cs
r5314 r5315 92 92 } 93 93 94 public void SoftPauseCore() { 95 try { 96 if (pipeFactory.State != CommunicationState.Faulted && pipeFactory.State != CommunicationState.Closed) 97 pipeProxy.SoftPause(); 98 } 99 catch (Exception e) { 100 OnMessageLogged("Error soft pausening core: " + e.ToString()); 101 } 102 } 103 104 public void HardPauseCore() { 105 try { 106 if (pipeFactory.State != CommunicationState.Faulted && pipeFactory.State != CommunicationState.Closed) 107 pipeProxy.HardPause(); 108 } 109 catch (Exception e) { 110 OnMessageLogged("Error hard pausening core: " + e.ToString()); 111 } 112 } 113 114 public void RestartCore() { 115 try { 116 if (pipeFactory.State != CommunicationState.Faulted && pipeFactory.State != CommunicationState.Closed) 117 pipeProxy.Restart(); 118 } 119 catch (Exception e) { 120 OnMessageLogged("Error restarting core: " + e.ToString()); 121 } 122 } 123 94 124 public void Close() { 95 125 if (pipeFactory.State != CommunicationState.Closed) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.Designer.cs
r5314 r5315 47 47 this.label1 = new System.Windows.Forms.Label(); 48 48 this.txtLog = new System.Windows.Forms.TextBox(); 49 this.btnSoftPause = new System.Windows.Forms.Button(); 50 this.btnHardPause = new System.Windows.Forms.Button(); 51 this.btnRestart = new System.Windows.Forms.Button(); 49 52 this.SuspendLayout(); 50 53 // … … 68 71 this.txtLog.TabIndex = 1; 69 72 // 73 // btnSoftPause 74 // 75 this.btnSoftPause.Location = new System.Drawing.Point(390, 46); 76 this.btnSoftPause.Name = "btnSoftPause"; 77 this.btnSoftPause.Size = new System.Drawing.Size(111, 23); 78 this.btnSoftPause.TabIndex = 2; 79 this.btnSoftPause.Text = "Soft Pause Core"; 80 this.btnSoftPause.UseVisualStyleBackColor = true; 81 this.btnSoftPause.Click += new System.EventHandler(this.btnSoftPause_Click); 82 // 83 // btnHardPause 84 // 85 this.btnHardPause.Location = new System.Drawing.Point(390, 87); 86 this.btnHardPause.Name = "btnHardPause"; 87 this.btnHardPause.Size = new System.Drawing.Size(111, 23); 88 this.btnHardPause.TabIndex = 3; 89 this.btnHardPause.Text = "Hard Pause Core"; 90 this.btnHardPause.UseVisualStyleBackColor = true; 91 this.btnHardPause.Click += new System.EventHandler(this.btnHardPause_Click); 92 // 93 // btnRestart 94 // 95 this.btnRestart.Location = new System.Drawing.Point(390, 127); 96 this.btnRestart.Name = "btnRestart"; 97 this.btnRestart.Size = new System.Drawing.Size(111, 23); 98 this.btnRestart.TabIndex = 4; 99 this.btnRestart.Text = "Restart Core"; 100 this.btnRestart.UseVisualStyleBackColor = true; 101 this.btnRestart.Click += new System.EventHandler(this.btnRestart_Click); 102 // 70 103 // SlaveView 71 104 // 72 105 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 73 106 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 107 this.Controls.Add(this.btnRestart); 108 this.Controls.Add(this.btnHardPause); 109 this.Controls.Add(this.btnSoftPause); 74 110 this.Controls.Add(this.txtLog); 75 111 this.Controls.Add(this.label1); … … 85 121 private System.Windows.Forms.Label label1; 86 122 private System.Windows.Forms.TextBox txtLog; 123 private System.Windows.Forms.Button btnSoftPause; 124 private System.Windows.Forms.Button btnHardPause; 125 private System.Windows.Forms.Button btnRestart; 87 126 } 88 127 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.cs
r5314 r5315 90 90 } 91 91 #endregion 92 93 private void btnSoftPause_Click(object sender, System.EventArgs e) { 94 if (Content != null) 95 Content.SoftPauseCore(); 96 } 97 98 private void btnHardPause_Click(object sender, System.EventArgs e) { 99 if (Content != null) 100 Content.HardPauseCore(); 101 } 102 103 private void btnRestart_Click(object sender, System.EventArgs e) { 104 if (Content != null) 105 Content.RestartCore(); 106 } 92 107 } 93 108 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
r5314 r5315 38 38 /// </summary> 39 39 public class Core : MarshalByRefObject { 40 41 //TODO: this class should be a singleton; there is only one instance, the reference is meanwhile save in TheCore 42 public static Core TheCore; 43 40 44 public static bool abortRequested { get; set; } 41 45 private Semaphore waitShutdownSem = new Semaphore(0, 1); … … 62 66 63 67 public Core() { 68 TheCore = this; 64 69 } 65 70 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/SlaveCommunicationService.cs
r5314 r5315 28 28 public class SlaveCommunicationService : ISlaveCommunication { 29 29 private static List<ISlaveCommunicationCallbacks> subscribers = new List<ISlaveCommunicationCallbacks>(); 30 public Core SlaveCore { get; set; }31 32 30 33 31 public bool Subscribe() { … … 86 84 87 85 public void Restart() { 88 SlaveCore.Restart();86 Core.TheCore.Restart(); 89 87 } 90 88 public void HardPause() { 91 SlaveCore.HardPause();89 Core.TheCore.HardPause(); 92 90 } 93 91 94 92 public void SoftPause() { 95 SlaveCore.SoftPause();93 Core.TheCore.SoftPause(); 96 94 } 97 95 98 96 public void ShutdownSlave() { 99 SlaveCore.Shutdown();97 Core.TheCore.Shutdown(); 100 98 } 101 99 }
Note: See TracChangeset
for help on using the changeset viewer.