Changeset 1010 for trunk/sources/HeuristicLab.Hive.Client.Console
- Timestamp:
- 12/17/08 15:19:02 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Client.Console
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Console/HiveClientConsole.Designer.cs
r1002 r1010 62 62 this.lbCs = new System.Windows.Forms.Label(); 63 63 this.lbConnectionStatus = new System.Windows.Forms.Label(); 64 this.zGJobs = new ZedGraph.ZedGraphControl();65 64 this.lbConnectionStatusCaption = new System.Windows.Forms.Label(); 66 65 this.lbJobsAbortedCaption = new System.Windows.Forms.Label(); … … 87 86 this.lbServerIPCaption = new System.Windows.Forms.Label(); 88 87 this.lbPortCaption = new System.Windows.Forms.Label(); 88 this.pbGraph = new System.Windows.Forms.PictureBox(); 89 89 this.tcClientConsole.SuspendLayout(); 90 90 this.tpConnection.SuspendLayout(); … … 95 95 this.gbOnlineTime.SuspendLayout(); 96 96 this.gbServerConnection.SuspendLayout(); 97 ((System.ComponentModel.ISupportInitialize)(this.pbGraph)).BeginInit(); 97 98 this.SuspendLayout(); 98 99 // … … 163 164 // gbCommon 164 165 // 166 this.gbCommon.Controls.Add(this.pbGraph); 165 167 this.gbCommon.Controls.Add(this.lbJobsAborted); 166 168 this.gbCommon.Controls.Add(this.lbJobdone); … … 170 172 this.gbCommon.Controls.Add(this.lbCs); 171 173 this.gbCommon.Controls.Add(this.lbConnectionStatus); 172 this.gbCommon.Controls.Add(this.zGJobs);173 174 this.gbCommon.Controls.Add(this.lbConnectionStatusCaption); 174 175 this.gbCommon.Controls.Add(this.lbJobsAbortedCaption); … … 245 246 this.lbConnectionStatus.TabIndex = 16; 246 247 this.lbConnectionStatus.Text = "loading..."; 247 //248 // zGJobs249 //250 this.zGJobs.BackColor = System.Drawing.SystemColors.Control;251 this.zGJobs.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;252 this.zGJobs.Location = new System.Drawing.Point(255, 14);253 this.zGJobs.Name = "zGJobs";254 this.zGJobs.ScrollGrace = 0;255 this.zGJobs.ScrollMaxX = 0;256 this.zGJobs.ScrollMaxY = 0;257 this.zGJobs.ScrollMaxY2 = 0;258 this.zGJobs.ScrollMinX = 0;259 this.zGJobs.ScrollMinY = 0;260 this.zGJobs.ScrollMinY2 = 0;261 this.zGJobs.Size = new System.Drawing.Size(149, 111);262 this.zGJobs.TabIndex = 14;263 248 // 264 249 // lbConnectionStatusCaption … … 379 364 // gbOnlineTime 380 365 // 366 this.gbOnlineTime.BackColor = System.Drawing.SystemColors.Control; 381 367 this.gbOnlineTime.Controls.Add(this.label1); 382 368 this.gbOnlineTime.Location = new System.Drawing.Point(9, 117); … … 484 470 this.lbPortCaption.Text = "Port:"; 485 471 // 472 // pbGraph 473 // 474 this.pbGraph.Location = new System.Drawing.Point(292, 19); 475 this.pbGraph.Name = "pbGraph"; 476 this.pbGraph.Size = new System.Drawing.Size(112, 108); 477 this.pbGraph.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 478 this.pbGraph.TabIndex = 21; 479 this.pbGraph.TabStop = false; 480 // 486 481 // HiveClientConsole 487 482 // 488 483 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 489 484 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 485 this.BackColor = System.Drawing.SystemColors.Control; 490 486 this.ClientSize = new System.Drawing.Size(437, 508); 491 487 this.Controls.Add(this.tcClientConsole); … … 505 501 this.gbServerConnection.ResumeLayout(false); 506 502 this.gbServerConnection.PerformLayout(); 503 ((System.ComponentModel.ISupportInitialize)(this.pbGraph)).EndInit(); 507 504 this.ResumeLayout(false); 508 505 … … 539 536 private System.Windows.Forms.Button btnDisconnect; 540 537 private System.Windows.Forms.Button btConnect; 541 private ZedGraph.ZedGraphControl zGJobs;542 538 private System.Windows.Forms.ColumnHeader chId; 543 539 private System.Windows.Forms.ImageList ilEventLog; … … 551 547 private System.Windows.Forms.Label lbJobsAborted; 552 548 private System.Windows.Forms.Label label1; 549 private System.Windows.Forms.PictureBox pbGraph; 553 550 } 554 551 } -
trunk/sources/HeuristicLab.Hive.Client.Console/HiveClientConsole.cs
r1002 r1010 134 134 } 135 135 136 UpdateGraph( zGJobs,sc.JobsDone, sc.JobsAborted);136 UpdateGraph(sc.JobsDone, sc.JobsAborted); 137 137 138 138 if (sc.Status == NetworkEnumWcfConnState.Connected) { … … 194 194 } 195 195 196 private void UpdateGraph(ZedGraphControl zgc, int jobsDone, int jobsAborted) { 196 private void UpdateGraph(int jobsDone, int jobsAborted) { 197 ZedGraphControl zgc = new ZedGraphControl(); 197 198 GraphPane myPane = zgc.GraphPane; 198 199 myPane.GraphObjList.Clear(); 199 200 200 201 201 myPane.Title.IsVisible = false; // no title … … 205 205 myPane.YAxis.IsVisible = false; // no y-axis 206 206 myPane.Legend.IsVisible = false; // no legend 207 207 208 myPane.Fill.Color = Color.FromKnownColor(KnownColor.Control); 209 208 210 myPane.Chart.Fill.Type = FillType.None; 209 myPane.Fill.Type = FillType.None; 210 211 //// Set the titles and axis labels 212 //myPane.Legend.IsVisible = false; 213 //myPane.Title.IsVisible = false; 214 ////myPane.Fill.Type = FillType.None; 215 ////myPane.Fill = new Fill(); 216 ////myPane.Fill.Color = Color.Transparent; 211 myPane.Fill.Type = FillType.Solid; 217 212 218 213 double sum = (double)jobsDone + jobsAborted; … … 220 215 double perAborted = (double)jobsAborted / sum * 100; 221 216 222 myPane.AddPieSlice(perDone, Color.Green, 0.1, " Jobs done");223 myPane.AddPieSlice(perAborted, Color.Red, 0.1, " Jobs aborted");217 myPane.AddPieSlice(perDone, Color.Green, 0.1, ""); 218 myPane.AddPieSlice(perAborted, Color.Red, 0.1, ""); 224 219 225 220 myPane.AxisChange(); 221 222 pbGraph.Image = zgc.GetImage(); 226 223 } 227 224 … … 246 243 cc.IPAdress = tbIPAdress.Text; 247 244 cc.Port = port; 248 cccc.SetConnection (cc);245 cccc.SetConnectionAsync(cc); 249 246 } else { 250 247 MessageBox.Show("IP Adress and/or Port Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 251 248 } 252 253 249 } 254 250 255 251 private void btnDisconnect_Click(object sender, EventArgs e) { 256 cccc.Disconnect ();252 cccc.DisconnectAsync(); 257 253 } 258 254
Note: See TracChangeset
for help on using the changeset viewer.