- Timestamp:
- 05/17/11 15:10:50 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4
- Files:
-
- 9 added
- 3 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/HeuristicLab.Clients.Hive.Slave.Views-3.4.csproj
r6033 r6225 123 123 </ItemGroup> 124 124 <ItemGroup> 125 <Compile Include="AboutView.cs"> 126 <SubType>UserControl</SubType> 127 </Compile> 128 <Compile Include="AboutView.Designer.cs"> 129 <DependentUpon>AboutView.cs</DependentUpon> 130 </Compile> 131 <Compile Include="LogView.cs"> 132 <SubType>UserControl</SubType> 133 </Compile> 134 <Compile Include="LogView.Designer.cs"> 135 <DependentUpon>LogView.cs</DependentUpon> 136 </Compile> 125 137 <Compile Include="Properties\Resources.Designer.cs"> 126 138 <AutoGen>True</AutoGen> … … 128 140 <DependentUpon>Resources.resx</DependentUpon> 129 141 </Compile> 130 <Compile Include="SlaveAboutDialog.cs"> 131 <SubType>Form</SubType> 132 </Compile> 133 <Compile Include="SlaveAboutDialog.Designer.cs"> 134 <DependentUpon>SlaveAboutDialog.cs</DependentUpon> 142 <Compile Include="Properties\Settings.Designer.cs"> 143 <AutoGen>True</AutoGen> 144 <DesignTimeSharedInput>True</DesignTimeSharedInput> 145 <DependentUpon>Settings.settings</DependentUpon> 135 146 </Compile> 136 147 <Compile Include="SlaveItem.cs" /> 148 <None Include="app.config" /> 137 149 <None Include="Properties\AssemblyInfo.cs.frame" /> 138 150 <None Include="HeuristicLabClientsHiveSlaveViewsPlugin.cs.frame" /> … … 145 157 <Compile Include="HeuristicLabClientsHiveSlaveViewsPlugin.cs" /> 146 158 <Compile Include="Properties\AssemblyInfo.cs" /> 159 <None Include="Properties\Settings.settings"> 160 <Generator>PublicSettingsSingleFileGenerator</Generator> 161 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 162 </None> 147 163 </ItemGroup> 148 164 <ItemGroup> … … 156 172 </ItemGroup> 157 173 <ItemGroup> 174 <EmbeddedResource Include="AboutView.resx"> 175 <DependentUpon>AboutView.cs</DependentUpon> 176 </EmbeddedResource> 177 <EmbeddedResource Include="LogView.resx"> 178 <DependentUpon>LogView.cs</DependentUpon> 179 </EmbeddedResource> 158 180 <EmbeddedResource Include="Properties\Resources.resx"> 159 181 <Generator>ResXFileCodeGenerator</Generator> 160 182 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 161 </EmbeddedResource>162 <EmbeddedResource Include="SlaveAboutDialog.resx">163 <DependentUpon>SlaveAboutDialog.cs</DependentUpon>164 183 </EmbeddedResource> 165 184 <EmbeddedResource Include="SlaveView.resx"> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveItem.cs
r6107 r6225 135 135 } 136 136 137 private int lastJobsFetched = 0; 138 137 139 public event EventHandler<EventArgs<StatusCommons>> SlaveStatusChanged; 140 public void OnUserVisibleMessageFired(string msg) { 141 var handler = UserVisibleMessageFired; 142 if (handler != null) handler(this, new EventArgs<string>(msg)); 143 } 144 145 public event EventHandler<EventArgs<string>> UserVisibleMessageFired; 138 146 public void OnStatusChanged(StatusCommons status) { 139 147 var handler = SlaveStatusChanged; 140 148 if (handler != null) handler(this, new EventArgs<StatusCommons>(status)); 149 150 int diff = status.JobsFetched - lastJobsFetched; 151 lastJobsFetched = status.JobsFetched; 152 if (diff > 0) { 153 OnUserVisibleMessageFired(string.Format("HeuristicLab Hive received {0} new jobs!", diff)); 154 } 141 155 } 142 156 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.Designer.cs
r5826 r6225 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 48 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 49 System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); 50 this.txtLog = new System.Windows.Forms.TextBox(); 47 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea6 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 48 System.Windows.Forms.DataVisualization.Charting.Legend legend6 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 49 System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series(); 51 50 this.btnPauseAll = new System.Windows.Forms.Button(); 52 51 this.btnStopAll = new System.Windows.Forms.Button(); 53 52 this.btnRestart = new System.Windows.Forms.Button(); 54 53 this.btnSleep = new System.Windows.Forms.Button(); 55 this.btnAbout = new System.Windows.Forms.Button();56 54 this.jobChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); 57 55 this.btnRestartService = new System.Windows.Forms.Button(); … … 59 57 this.SuspendLayout(); 60 58 // 61 // txtLog62 //63 this.txtLog.BackColor = System.Drawing.Color.White;64 this.txtLog.Location = new System.Drawing.Point(3, 184);65 this.txtLog.Multiline = true;66 this.txtLog.Name = "txtLog";67 this.txtLog.ReadOnly = true;68 this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;69 this.txtLog.Size = new System.Drawing.Size(584, 239);70 this.txtLog.TabIndex = 1;71 //72 59 // btnPauseAll 73 60 // 61 this.btnPauseAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 74 62 this.btnPauseAll.Location = new System.Drawing.Point(476, 3); 75 63 this.btnPauseAll.Name = "btnPauseAll"; … … 82 70 // btnStopAll 83 71 // 72 this.btnStopAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 84 73 this.btnStopAll.Location = new System.Drawing.Point(476, 32); 85 74 this.btnStopAll.Name = "btnStopAll"; … … 92 81 // btnRestart 93 82 // 83 this.btnRestart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 94 84 this.btnRestart.Location = new System.Drawing.Point(476, 90); 95 85 this.btnRestart.Name = "btnRestart"; … … 102 92 // btnSleep 103 93 // 94 this.btnSleep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 104 95 this.btnSleep.Location = new System.Drawing.Point(476, 61); 105 96 this.btnSleep.Name = "btnSleep"; … … 110 101 this.btnSleep.Click += new System.EventHandler(this.btnSleep_Click); 111 102 // 112 // btnAbout113 //114 this.btnAbout.Location = new System.Drawing.Point(476, 149);115 this.btnAbout.Name = "btnAbout";116 this.btnAbout.Size = new System.Drawing.Size(111, 28);117 this.btnAbout.TabIndex = 6;118 this.btnAbout.Text = "About Hive";119 this.btnAbout.UseVisualStyleBackColor = true;120 this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click);121 //122 103 // jobChart 123 104 // 124 chartArea 1.Name = "ChartArea1";125 this.jobChart.ChartAreas.Add(chartArea 1);126 legend 1.Name = "Legend1";127 this.jobChart.Legends.Add(legend 1);105 chartArea6.Name = "ChartArea1"; 106 this.jobChart.ChartAreas.Add(chartArea6); 107 legend6.Name = "Legend1"; 108 this.jobChart.Legends.Add(legend6); 128 109 this.jobChart.Location = new System.Drawing.Point(3, 3); 129 110 this.jobChart.Name = "jobChart"; 130 series 1.ChartArea = "ChartArea1";131 series 1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut;132 series 1.Legend = "Legend1";133 series 1.Name = "Series1";134 this.jobChart.Series.Add(series 1);111 series6.ChartArea = "ChartArea1"; 112 series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut; 113 series6.Legend = "Legend1"; 114 series6.Name = "Series1"; 115 this.jobChart.Series.Add(series6); 135 116 this.jobChart.Size = new System.Drawing.Size(293, 174); 136 117 this.jobChart.TabIndex = 7; … … 138 119 // btnRestartService 139 120 // 121 this.btnRestartService.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 140 122 this.btnRestartService.Location = new System.Drawing.Point(476, 119); 141 123 this.btnRestartService.Name = "btnRestartService"; … … 152 134 this.Controls.Add(this.btnRestartService); 153 135 this.Controls.Add(this.jobChart); 154 this.Controls.Add(this.btnAbout);155 136 this.Controls.Add(this.btnSleep); 156 137 this.Controls.Add(this.btnRestart); 157 138 this.Controls.Add(this.btnStopAll); 158 139 this.Controls.Add(this.btnPauseAll); 159 this.Controls.Add(this.txtLog);160 140 this.Name = "SlaveView"; 161 141 this.Size = new System.Drawing.Size(590, 426); 162 142 ((System.ComponentModel.ISupportInitialize)(this.jobChart)).EndInit(); 163 143 this.ResumeLayout(false); 164 this.PerformLayout();165 144 166 145 } … … 168 147 #endregion 169 148 170 private System.Windows.Forms.TextBox txtLog;171 149 private System.Windows.Forms.Button btnPauseAll; 172 150 private System.Windows.Forms.Button btnStopAll; 173 151 private System.Windows.Forms.Button btnRestart; 174 152 private System.Windows.Forms.Button btnSleep; 175 private System.Windows.Forms.Button btnAbout;176 153 private System.Windows.Forms.DataVisualization.Charting.Chart jobChart; 177 154 private System.Windows.Forms.Button btnRestartService; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.cs
r6203 r6225 58 58 #region Register Content Events 59 59 protected override void DeregisterContentEvents() { 60 Content.SlaveMessageLogged -= new System.EventHandler<EventArgs<string>>(Content_SlaveMessageLogged);61 60 Content.SlaveShutdown -= new System.EventHandler(Content_SlaveShutdown); 62 61 Content.SlaveStatusChanged -= new System.EventHandler<EventArgs<StatusCommons>>(Content_SlaveStatusChanged); … … 68 67 base.RegisterContentEvents(); 69 68 70 Content.SlaveMessageLogged += new System.EventHandler<EventArgs<string>>(Content_SlaveMessageLogged);71 69 Content.SlaveShutdown += new System.EventHandler(Content_SlaveShutdown); 72 70 Content.SlaveStatusChanged += new System.EventHandler<EventArgs<StatusCommons>>(Content_SlaveStatusChanged); … … 110 108 111 109 void Content_SlaveShutdown(object sender, System.EventArgs e) { 112 txtLog.AppendText("Slave did shutdown" + Environment.NewLine);113 110 Task.Factory.StartNew(Connector); 114 }115 116 void Content_SlaveMessageLogged(object sender, EventArgs<string> e) {117 txtLog.AppendText(e.Value + Environment.NewLine);118 111 } 119 112 #endregion … … 168 161 } 169 162 170 private void btnAbout_Click(object sender, System.EventArgs e) {171 SlaveAboutDialog diag = new SlaveAboutDialog();172 diag.ShowDialog();173 }174 175 163 private void btnRestartService_Click(object sender, EventArgs e) { 176 164 if (CheckRunAsAdmin()) {
Note: See TracChangeset
for help on using the changeset viewer.