Changeset 6263
- Timestamp:
- 05/24/11 14:30:55 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/MainWindow.Designer.cs
r6257 r6263 36 36 this.tabSlaveView = new System.Windows.Forms.TabPage(); 37 37 this.slaveView = new HeuristicLab.Clients.Hive.SlaveCore.Views.SlaveView(); 38 this.tabJobs = new System.Windows.Forms.TabPage(); 39 this.jobsView = new HeuristicLab.Clients.Hive.SlaveCore.Views.JobsView(); 38 40 this.tabLog = new System.Windows.Forms.TabPage(); 39 41 this.logView = new HeuristicLab.Clients.Hive.SlaveCore.Views.LogView(); … … 43 45 this.mainTabControl.SuspendLayout(); 44 46 this.tabSlaveView.SuspendLayout(); 47 this.tabJobs.SuspendLayout(); 45 48 this.tabLog.SuspendLayout(); 46 49 this.tabAbout.SuspendLayout(); … … 98 101 // mainTabControl 99 102 // 100 this.mainTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)101 | System.Windows.Forms.AnchorStyles.Left)102 | System.Windows.Forms.AnchorStyles.Right)));103 103 this.mainTabControl.Controls.Add(this.tabSlaveView); 104 this.mainTabControl.Controls.Add(this.tabJobs); 104 105 this.mainTabControl.Controls.Add(this.tabLog); 105 106 this.mainTabControl.Controls.Add(this.tabAbout); 106 this.mainTabControl.Location = new System.Drawing.Point(12, 12); 107 this.mainTabControl.Dock = System.Windows.Forms.DockStyle.Fill; 108 this.mainTabControl.Location = new System.Drawing.Point(0, 0); 109 this.mainTabControl.Margin = new System.Windows.Forms.Padding(1); 107 110 this.mainTabControl.Name = "mainTabControl"; 108 111 this.mainTabControl.SelectedIndex = 0; 109 this.mainTabControl.Size = new System.Drawing.Size( 581, 369);112 this.mainTabControl.Size = new System.Drawing.Size(605, 393); 110 113 this.mainTabControl.TabIndex = 1; 111 114 // … … 116 119 this.tabSlaveView.Name = "tabSlaveView"; 117 120 this.tabSlaveView.Padding = new System.Windows.Forms.Padding(3); 118 this.tabSlaveView.Size = new System.Drawing.Size(5 73, 343);121 this.tabSlaveView.Size = new System.Drawing.Size(597, 367); 119 122 this.tabSlaveView.TabIndex = 0; 120 123 this.tabSlaveView.Text = "Overview"; … … 131 134 this.slaveView.Name = "slaveView"; 132 135 this.slaveView.ReadOnly = false; 133 this.slaveView.Size = new System.Drawing.Size(5 61, 331);136 this.slaveView.Size = new System.Drawing.Size(585, 355); 134 137 this.slaveView.TabIndex = 0; 138 // 139 // tabJobs 140 // 141 this.tabJobs.Controls.Add(this.jobsView); 142 this.tabJobs.Location = new System.Drawing.Point(4, 22); 143 this.tabJobs.Name = "tabJobs"; 144 this.tabJobs.Size = new System.Drawing.Size(597, 367); 145 this.tabJobs.TabIndex = 3; 146 this.tabJobs.Text = "Jobs"; 147 this.tabJobs.UseVisualStyleBackColor = true; 148 // 149 // jobsView 150 // 151 this.jobsView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 152 | System.Windows.Forms.AnchorStyles.Left) 153 | System.Windows.Forms.AnchorStyles.Right))); 154 this.jobsView.Caption = "JobsView"; 155 this.jobsView.Content = null; 156 this.jobsView.Location = new System.Drawing.Point(4, 4); 157 this.jobsView.Name = "jobsView"; 158 this.jobsView.ReadOnly = false; 159 this.jobsView.Size = new System.Drawing.Size(590, 360); 160 this.jobsView.TabIndex = 0; 135 161 // 136 162 // tabLog … … 140 166 this.tabLog.Name = "tabLog"; 141 167 this.tabLog.Padding = new System.Windows.Forms.Padding(3); 142 this.tabLog.Size = new System.Drawing.Size(5 73, 277);168 this.tabLog.Size = new System.Drawing.Size(597, 367); 143 169 this.tabLog.TabIndex = 1; 144 170 this.tabLog.Text = "Log"; … … 155 181 this.logView.Name = "logView"; 156 182 this.logView.ReadOnly = false; 157 this.logView.Size = new System.Drawing.Size(5 60, 264);183 this.logView.Size = new System.Drawing.Size(584, 352); 158 184 this.logView.TabIndex = 0; 159 185 // … … 163 189 this.tabAbout.Location = new System.Drawing.Point(4, 22); 164 190 this.tabAbout.Name = "tabAbout"; 165 this.tabAbout.Size = new System.Drawing.Size(57 3, 277);191 this.tabAbout.Size = new System.Drawing.Size(577, 347); 166 192 this.tabAbout.TabIndex = 2; 167 193 this.tabAbout.Text = "About HeuristicLab Hive"; … … 178 204 this.aboutView.Name = "aboutView"; 179 205 this.aboutView.ReadOnly = false; 180 this.aboutView.Size = new System.Drawing.Size(5 67, 271);206 this.aboutView.Size = new System.Drawing.Size(571, 275); 181 207 this.aboutView.TabIndex = 0; 182 208 // … … 187 213 this.ClientSize = new System.Drawing.Size(605, 393); 188 214 this.Controls.Add(this.mainTabControl); 189 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;190 215 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 191 216 this.Name = "MainWindow"; … … 195 220 this.mainTabControl.ResumeLayout(false); 196 221 this.tabSlaveView.ResumeLayout(false); 222 this.tabJobs.ResumeLayout(false); 197 223 this.tabLog.ResumeLayout(false); 198 224 this.tabAbout.ResumeLayout(false); … … 216 242 private System.Windows.Forms.ToolStripSeparator toolStripSeparator; 217 243 private System.Windows.Forms.ToolStripMenuItem homepageToolStripMenuItem; 244 private System.Windows.Forms.TabPage tabJobs; 245 private Views.JobsView jobsView; 218 246 } 219 247 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/MainWindow.cs
r6257 r6263 12 12 slaveView.Content = value; 13 13 logView.Content = value; 14 jobsView.Content = value; 14 15 Content.UserVisibleMessageFired += new EventHandler<Common.EventArgs<string>>(Content_UserVisibleMessageFired); 15 16 } … … 58 59 e.Cancel = true; 59 60 MinimizeToTray(); 60 } else {61 if (Content != null) {62 Content.StopAll();63 }64 61 } 65 62 } … … 72 69 System.Diagnostics.Process.Start("http://dev.heuristiclab.com"); 73 70 } 74 75 76 71 } 77 72 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/HeuristicLab.Clients.Hive.Slave.Views-3.4.csproj
r6225 r6263 129 129 <DependentUpon>AboutView.cs</DependentUpon> 130 130 </Compile> 131 <Compile Include="JobsView.cs"> 132 <SubType>UserControl</SubType> 133 </Compile> 134 <Compile Include="JobsView.Designer.cs"> 135 <DependentUpon>JobsView.cs</DependentUpon> 136 </Compile> 131 137 <Compile Include="LogView.cs"> 132 138 <SubType>UserControl</SubType> … … 174 180 <EmbeddedResource Include="AboutView.resx"> 175 181 <DependentUpon>AboutView.cs</DependentUpon> 182 </EmbeddedResource> 183 <EmbeddedResource Include="JobsView.resx"> 184 <DependentUpon>JobsView.cs</DependentUpon> 176 185 </EmbeddedResource> 177 186 <EmbeddedResource Include="LogView.resx"> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/LogView.Designer.cs
r6225 r6263 60 60 this.txtLog.ReadOnly = true; 61 61 this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 62 this.txtLog.Size = new System.Drawing.Size(480, 2 09);62 this.txtLog.Size = new System.Drawing.Size(480, 238); 63 63 this.txtLog.TabIndex = 2; 64 64 // … … 67 67 this.chkShowBalloonTips.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 68 68 this.chkShowBalloonTips.AutoSize = true; 69 this.chkShowBalloonTips.Location = new System.Drawing.Point( 4, 219);69 this.chkShowBalloonTips.Location = new System.Drawing.Point(3, 247); 70 70 this.chkShowBalloonTips.Name = "chkShowBalloonTips"; 71 71 this.chkShowBalloonTips.Size = new System.Drawing.Size(291, 17); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/Properties/Resources.Designer.cs
r5602 r6263 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319. 14 // Runtime Version:4.0.30319.225 5 5 // 6 6 // Changes to this file may cause incorrect behavior and will be lost if -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveItem.cs
r6257 r6263 92 92 try { 93 93 pipeProxy = pipeFactory.CreateChannel(); 94 pipeProxy.Subscribe(); 95 return true; 94 StatusCommons st = pipeProxy.Subscribe(); 95 if (st != null) { 96 OnStatusChanged(st); 97 return true; 98 } else { 99 return false; 100 } 96 101 } 97 102 catch (Exception) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.Designer.cs
r6257 r6263 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 48 System.Windows.Forms.DataVisualization.Charting.CustomLabel customLabel5 = new System.Windows.Forms.DataVisualization.Charting.CustomLabel(); 49 System.Windows.Forms.DataVisualization.Charting.CustomLabel customLabel6 = new System.Windows.Forms.DataVisualization.Charting.CustomLabel(); 50 System.Windows.Forms.DataVisualization.Charting.CustomLabel customLabel7 = new System.Windows.Forms.DataVisualization.Charting.CustomLabel(); 51 System.Windows.Forms.DataVisualization.Charting.CustomLabel customLabel8 = new System.Windows.Forms.DataVisualization.Charting.CustomLabel(); 52 System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 47 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 48 System.Windows.Forms.DataVisualization.Charting.CustomLabel customLabel1 = new System.Windows.Forms.DataVisualization.Charting.CustomLabel(); 49 System.Windows.Forms.DataVisualization.Charting.CustomLabel customLabel2 = new System.Windows.Forms.DataVisualization.Charting.CustomLabel(); 50 System.Windows.Forms.DataVisualization.Charting.CustomLabel customLabel3 = new System.Windows.Forms.DataVisualization.Charting.CustomLabel(); 51 System.Windows.Forms.DataVisualization.Charting.CustomLabel customLabel4 = new System.Windows.Forms.DataVisualization.Charting.CustomLabel(); 52 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 53 System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); 54 System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); 55 System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); 56 System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series(); 57 System.Windows.Forms.DataVisualization.Charting.Series series5 = new System.Windows.Forms.DataVisualization.Charting.Series(); 58 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 59 System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 53 60 System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series(); 54 System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series(); 55 System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series(); 56 System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series(); 57 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea4 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 58 System.Windows.Forms.DataVisualization.Charting.Legend legend4 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 59 System.Windows.Forms.DataVisualization.Charting.Series series10 = new System.Windows.Forms.DataVisualization.Charting.Series(); 61 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SlaveView)); 60 62 this.jobChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); 61 63 this.coresChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); … … 71 73 // jobChart 72 74 // 75 this.jobChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 76 | System.Windows.Forms.AnchorStyles.Left) 77 | System.Windows.Forms.AnchorStyles.Right))); 73 78 this.jobChart.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; 74 customLabel 5.Text = "Jobs";75 customLabel 6.Text = "Aborted Jobs";76 customLabel 7.Text = "Finished Jobs";77 customLabel 8.Text = "Fetched Jobs";78 chartArea 3.AxisX.CustomLabels.Add(customLabel5);79 chartArea 3.AxisX.CustomLabels.Add(customLabel6);80 chartArea 3.AxisX.CustomLabels.Add(customLabel7);81 chartArea 3.AxisX.CustomLabels.Add(customLabel8);82 chartArea 3.AxisX.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.True;83 chartArea 3.AxisX.MajorGrid.Enabled = false;84 chartArea 3.AxisX.MajorTickMark.Enabled = false;85 chartArea 3.Name = "ChartArea1";86 this.jobChart.ChartAreas.Add(chartArea 3);87 legend 3.Name = "Legend1";88 this.jobChart.Legends.Add(legend 3);89 this.jobChart.Location = new System.Drawing.Point( 0, 3);79 customLabel1.Text = "Jobs"; 80 customLabel2.Text = "Aborted Jobs"; 81 customLabel3.Text = "Finished Jobs"; 82 customLabel4.Text = "Fetched Jobs"; 83 chartArea1.AxisX.CustomLabels.Add(customLabel1); 84 chartArea1.AxisX.CustomLabels.Add(customLabel2); 85 chartArea1.AxisX.CustomLabels.Add(customLabel3); 86 chartArea1.AxisX.CustomLabels.Add(customLabel4); 87 chartArea1.AxisX.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.True; 88 chartArea1.AxisX.MajorGrid.Enabled = false; 89 chartArea1.AxisX.MajorTickMark.Enabled = false; 90 chartArea1.Name = "ChartArea1"; 91 this.jobChart.ChartAreas.Add(chartArea1); 92 legend1.Name = "Legend1"; 93 this.jobChart.Legends.Add(legend1); 94 this.jobChart.Location = new System.Drawing.Point(3, 121); 90 95 this.jobChart.Name = "jobChart"; 96 series1.ChartArea = "ChartArea1"; 97 series1.Legend = "Legend1"; 98 series1.Name = "Series1"; 99 series2.ChartArea = "ChartArea1"; 100 series2.Legend = "Legend1"; 101 series2.Name = "Series2"; 102 series3.ChartArea = "ChartArea1"; 103 series3.Legend = "Legend1"; 104 series3.Name = "Series3"; 105 series4.ChartArea = "ChartArea1"; 106 series4.Legend = "Legend1"; 107 series4.Name = "Series4"; 108 series5.ChartArea = "ChartArea1"; 109 series5.Legend = "Legend1"; 110 series5.Name = "Series5"; 111 this.jobChart.Series.Add(series1); 112 this.jobChart.Series.Add(series2); 113 this.jobChart.Series.Add(series3); 114 this.jobChart.Series.Add(series4); 115 this.jobChart.Series.Add(series5); 116 this.jobChart.Size = new System.Drawing.Size(412, 189); 117 this.jobChart.TabIndex = 7; 118 // 119 // coresChart 120 // 121 this.coresChart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 122 chartArea2.Name = "ChartArea1"; 123 this.coresChart.ChartAreas.Add(chartArea2); 124 legend2.Name = "Legend1"; 125 this.coresChart.Legends.Add(legend2); 126 this.coresChart.Location = new System.Drawing.Point(186, 3); 127 this.coresChart.Name = "coresChart"; 91 128 series6.ChartArea = "ChartArea1"; 129 series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Pie; 92 130 series6.Legend = "Legend1"; 93 131 series6.Name = "Series1"; 94 series7.ChartArea = "ChartArea1"; 95 series7.Legend = "Legend1"; 96 series7.Name = "Series2"; 97 series8.ChartArea = "ChartArea1"; 98 series8.Legend = "Legend1"; 99 series8.Name = "Series3"; 100 series9.ChartArea = "ChartArea1"; 101 series9.Legend = "Legend1"; 102 series9.Name = "Series4"; 103 this.jobChart.Series.Add(series6); 104 this.jobChart.Series.Add(series7); 105 this.jobChart.Series.Add(series8); 106 this.jobChart.Series.Add(series9); 107 this.jobChart.Size = new System.Drawing.Size(280, 156); 108 this.jobChart.TabIndex = 7; 109 // 110 // coresChart 111 // 112 chartArea4.Name = "ChartArea1"; 113 this.coresChart.ChartAreas.Add(chartArea4); 114 legend4.Name = "Legend1"; 115 this.coresChart.Legends.Add(legend4); 116 this.coresChart.Location = new System.Drawing.Point(3, 165); 117 this.coresChart.Name = "coresChart"; 118 series10.ChartArea = "ChartArea1"; 119 series10.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Pie; 120 series10.Legend = "Legend1"; 121 series10.Name = "Series1"; 122 this.coresChart.Series.Add(series10); 123 this.coresChart.Size = new System.Drawing.Size(277, 135); 132 this.coresChart.Series.Add(series6); 133 this.coresChart.Size = new System.Drawing.Size(229, 80); 124 134 this.coresChart.TabIndex = 9; 125 135 // 126 136 // btnStart 127 137 // 128 this.btnStart.Location = new System.Drawing.Point(467, 111); 138 this.btnStart.Image = ((System.Drawing.Image)(resources.GetObject("btnStart.Image"))); 139 this.btnStart.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 140 this.btnStart.Location = new System.Drawing.Point(10, 89); 129 141 this.btnStart.Name = "btnStart"; 130 142 this.btnStart.Size = new System.Drawing.Size(75, 23); … … 136 148 // btnStop 137 149 // 138 this.btnStop.Location = new System.Drawing.Point(467, 82); 150 this.btnStop.Image = ((System.Drawing.Image)(resources.GetObject("btnStop.Image"))); 151 this.btnStop.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 152 this.btnStop.Location = new System.Drawing.Point(10, 60); 139 153 this.btnStop.Name = "btnStop"; 140 154 this.btnStop.Size = new System.Drawing.Size(75, 23); … … 146 160 // btnKill 147 161 // 148 this.btnKill.Location = new System.Drawing.Point( 467, 53);162 this.btnKill.Location = new System.Drawing.Point(10, 31); 149 163 this.btnKill.Name = "btnKill"; 150 164 this.btnKill.Size = new System.Drawing.Size(75, 23); … … 156 170 // lblSlaveState 157 171 // 158 this.lblSlaveState.Location = new System.Drawing.Point( 370, 3);172 this.lblSlaveState.Location = new System.Drawing.Point(75, 5); 159 173 this.lblSlaveState.Name = "lblSlaveState"; 160 this.lblSlaveState.Size = new System.Drawing.Size( 100, 23);174 this.lblSlaveState.Size = new System.Drawing.Size(78, 13); 161 175 this.lblSlaveState.TabIndex = 13; 162 176 // … … 164 178 // 165 179 this.label1.AutoSize = true; 166 this.label1.Location = new System.Drawing.Point( 286, 3);180 this.label1.Location = new System.Drawing.Point(7, 5); 167 181 this.label1.Name = "label1"; 168 182 this.label1.Size = new System.Drawing.Size(62, 13); … … 182 196 this.Controls.Add(this.jobChart); 183 197 this.Name = "SlaveView"; 184 this.Size = new System.Drawing.Size( 590, 313);198 this.Size = new System.Drawing.Size(418, 313); 185 199 ((System.ComponentModel.ISupportInitialize)(this.jobChart)).EndInit(); 186 200 ((System.ComponentModel.ISupportInitialize)(this.coresChart)).EndInit(); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.cs
r6257 r6263 40 40 public partial class SlaveView : ItemView { 41 41 42 private const UInt32 BCM_SETSHIELD = 0x160C; 43 [DllImport("user32", CharSet = CharSet.Auto, SetLastError = true)] 44 static extern int SendMessage(IntPtr hWnd, UInt32 Msg, int wParam, IntPtr lParam); 45 42 46 public new SlaveItem Content { 43 47 get { return (SlaveItem)base.Content; } … … 51 55 private SlaveDisplayStat lastSlaveDisplayStat; 52 56 53 [DllImport("user32", CharSet = CharSet.Auto, SetLastError = true)]54 static extern int SendMessage(IntPtr hWnd, UInt32 Msg, int wParam, IntPtr lParam);55 56 const UInt32 BCM_SETSHIELD = 0x160C;57 58 57 public SlaveView() { 59 58 InitializeComponent(); 60 59 61 this.btnKill.FlatStyle = FlatStyle.System; 62 SendMessage(btnKill.Handle, BCM_SETSHIELD, 0, (IntPtr)1); 60 if (CheckRunAsAdmin()) { 61 btnKill.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 62 btnKill.Image = HeuristicLab.Common.Resources.VSImageLibrary.BreakpointActive; 63 } else { 64 this.btnKill.FlatStyle = FlatStyle.System; 65 SendMessage(btnKill.Handle, BCM_SETSHIELD, 0, (IntPtr)1); 66 } 63 67 64 68 lblSlaveState.Text = SlaveDisplayStat.NoService.ToString(); 65 btnKill.Enabled = false; 66 btnStart.Enabled = false; 67 btnStop.Enabled = false; 69 lastSlaveDisplayStat = SlaveDisplayStat.NoService; 70 Content_SlaveDisplayStateChanged(this, new EventArgs<SlaveDisplayStat>(lastSlaveDisplayStat)); 68 71 } 69 72 … … 106 109 107 110 private void Connector() { 111 Content_SlaveDisplayStateChanged(this, new EventArgs<SlaveDisplayStat>(SlaveDisplayStat.NoService)); 108 112 bool connected = false; 109 113 while (!connected) { … … 163 167 jobChart.Series[2].Points.Clear(); 164 168 jobChart.Series[3].Points.Clear(); 169 jobChart.Series[4].Points.Clear(); 170 165 171 166 172 DataPoint pJobs = new DataPoint(1, status.Jobs.Count); … … 168 174 DataPoint pJobsDone = new DataPoint(3, status.JobsFinished); 169 175 DataPoint pJobsFetched = new DataPoint(4, status.JobsFetched); 176 DataPoint pJobsFailed = new DataPoint(5, status.JobsFailed); 170 177 171 178 pJobs.LegendText = "Current jobs: " + status.Jobs.Count; 172 pJobs.Color = System.Drawing.Color. Orange;179 pJobs.Color = System.Drawing.Color.Yellow; 173 180 pJobs.ToolTip = pJobs.LegendText; 181 jobChart.Series[0].Color = System.Drawing.Color.Yellow; 174 182 jobChart.Series[0].LegendText = pJobs.LegendText; 175 183 jobChart.Series[0].Points.Add(pJobs); 176 184 177 185 pJobsAborted.LegendText = "Aborted jobs: " + status.JobsAborted; 178 pJobsAborted.Color = System.Drawing.Color. Red;186 pJobsAborted.Color = System.Drawing.Color.Orange; 179 187 pJobsAborted.ToolTip = pJobsAborted.LegendText; 188 jobChart.Series[1].Color = System.Drawing.Color.Orange; 180 189 jobChart.Series[1].LegendText = pJobsAborted.LegendText; 181 190 jobChart.Series[1].Points.Add(pJobsAborted); … … 184 193 pJobsDone.Color = System.Drawing.Color.Green; 185 194 pJobsDone.ToolTip = pJobsDone.LegendText; 195 jobChart.Series[2].Color = System.Drawing.Color.Green; 186 196 jobChart.Series[2].LegendText = pJobsDone.LegendText; 187 197 jobChart.Series[2].Points.Add(pJobsDone); … … 190 200 pJobsFetched.ToolTip = pJobsFetched.LegendText; 191 201 pJobsFetched.Color = System.Drawing.Color.Blue; 202 jobChart.Series[3].Color = System.Drawing.Color.Blue; 192 203 jobChart.Series[3].LegendText = pJobsFetched.LegendText; 193 204 jobChart.Series[3].Points.Add(pJobsFetched); 205 206 pJobsFailed.LegendText = "Failed jobs: " + status.JobsFailed; 207 pJobsFailed.ToolTip = pJobsFailed.LegendText; 208 pJobsFailed.Color = System.Drawing.Color.Red; 209 jobChart.Series[4].Color = System.Drawing.Color.Red; 210 jobChart.Series[4].LegendText = pJobsFailed.LegendText; 211 jobChart.Series[4].Points.Add(pJobsFailed); 194 212 } 195 213 … … 222 240 } 223 241 242 /// <summary> 243 /// shows the windows UAC dialog and restarts tray icon app 244 /// </summary> 224 245 private void ElevateApplication() { 225 246 // Launch itself as administrator … … 234 255 } 235 256 catch { 236 // The user refused to allow privileges elevation. 237 // Do nothing and return directly ... 257 // user refused to allow privileges elevation 238 258 return; 239 259 } 240 Application.Exit(); // Quit itself260 Application.Exit(); 241 261 } 242 262 … … 265 285 private void StopService() { 266 286 string serviceName = "HeuristicLab.Clients.Hive.SlaveCore.SlaveWindowsService"; 267 TimeSpan timeout = TimeSpan.FromMilliseconds( 5000);287 TimeSpan timeout = TimeSpan.FromMilliseconds(7000); 268 288 269 289 ServiceController service = new ServiceController(serviceName); … … 288 308 ElevateApplication(); 289 309 } 290 291 310 } 292 311 … … 310 329 } 311 330 } 331 332 312 333 } 313 334 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.resx
r5314 r6263 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 121 <data name="btnStart.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 122 <value> 123 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6 124 JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsPAAALDwGS+QOlAAABEElE 125 QVQ4T2P4//8/AzpO6HnCjE0cmxiGZpAioAEyQMxEjCFYDSic9fx//OS3SsQYgtWA3JnP/id03/sfN+G1 126 BiHvYDUgY8rT//P2//4f1HDzNdAAW3yG4AqD/7P3/frfufXvf7fSy/+BBtjjMgSrAZFdj/5P2fbrf8nS 127 v/8Tpv/9b5N7FqchWA0IbH74v3Xte7Bm45Iv/6Wjr/03jlz236HobDy6S7Aa4FF1/3/J3HdwzYouPf+l 128 fVYHEp0O7Evv/g9seQa2GaJ5pReuNIHVBRZ5d/7bFFyBabbBl6CwGmCYdRusWcpruSuh1IjVAJ20G0Bn 129 r/ElpBkkj9UAKe+1ftLeK4jKUFgNIMZmmBqKDQAA4djU9Io7KYIAAAAASUVORK5CYII= 130 </value> 131 </data> 132 <data name="btnStop.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 133 <value> 134 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6 135 JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsPAAALDwGS+QOlAAABa0lE 136 QVQ4T82TP0gCYRjGXQoaoq0xWloiISiKlgiCcHIJIaFJCII0GoIyKrCyvxyUKEViZhJKKR5YRtkfarAS 137 EqHCEBeNDAoRvDTPK57uc7uGC3Ko4Rt/v+d7n5dXAkBSyisJJsH/TEB5P7FIFzDrzkHnZDBhT2N04wXD 138 5mcMrT5i0JTIfO9LMAKB7+MfuEtwCDwUcHjDwhtk4QqwsPizkCp2eF5YukBAkqNPHIJRrgg6L/JY8+Ww 139 4mUwZ4+hTr4lLiDfvo1zOAqx2D7Lw8iDemcGY9ZXqKkwarrWxQVk5qsIB/cln3zwjvldAqegMSahGDlF 140 dbtBXEAK84dZ2E7yWKbfoLWm0W9IQjkTg2xgD1UtS+IC0rbnmoVxP4tJewpqEw/ro5BrQ+jsc6GiUS8u 141 IKvaPGYwbYtAQ4WgHD/nkz3oUDnQ2mNGWYNOXED23KbyoamXRn23A7UyS3HuyuYFlEunfhb85qj+/ha+ 142 AFwj9H5OYBpkAAAAAElFTkSuQmCC 143 </value> 144 </data> 120 145 </root> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
r6258 r6263 84 84 if (ServiceEventLog != null) { 85 85 try { 86 ServiceEventLog.WriteEntry(string.Format("Hive Slave threw exception: {0} with stack trace: {1}", ex.ToString(), ex.StackTrace) );86 ServiceEventLog.WriteEntry(string.Format("Hive Slave threw exception: {0} with stack trace: {1}", ex.ToString(), ex.StackTrace), EventLogEntryType.Error); 87 87 } 88 88 catch (Exception) { } … … 295 295 private void DoAbortAll() { 296 296 lock (slaveJobs) { 297 foreach (SlaveJob sj in slaveJobs.Values) {297 foreach (SlaveJob sj in new List<SlaveJob>(slaveJobs.Values)) { 298 298 if (!sj.Finished) { 299 299 sj.KillAppDomain(); … … 311 311 312 312 lock (slaveJobs) { 313 foreach (SlaveJob sj in slaveJobs.Values) {313 foreach (SlaveJob sj in new List<SlaveJob>(slaveJobs.Values)) { 314 314 if (!sj.Finished) { 315 315 sj.PauseJob(); … … 326 326 327 327 lock (slaveJobs) { 328 foreach (SlaveJob sj in slaveJobs.Values) {328 foreach (SlaveJob sj in new List<SlaveJob>(slaveJobs.Values)) { 329 329 if (!sj.Finished) { 330 330 sj.StopJob(); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ServiceContracts/ISlaveCommunication.cs
r5826 r6263 28 28 29 29 [OperationContract] 30 boolSubscribe();30 StatusCommons Subscribe(); 31 31 32 32 [OperationContract] -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/SlaveCommunicationService.cs
r5826 r6263 30 30 private static List<ISlaveCommunicationCallbacks> subscribers = new List<ISlaveCommunicationCallbacks>(); 31 31 32 public boolSubscribe() {32 public StatusCommons Subscribe() { 33 33 try { 34 34 ISlaveCommunicationCallbacks callback = OperationContext.Current.GetCallbackChannel<ISlaveCommunicationCallbacks>(); … … 36 36 subscribers.Add(callback); 37 37 } 38 return true;38 return ConfigManager.Instance.GetStatusForClientConsole(); 39 39 } 40 40 catch { 41 return false;41 return null; 42 42 } 43 43 }
Note: See TracChangeset
for help on using the changeset viewer.