|
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
namespace IssueVision
{
public class ChartPane : UserControl, IObserver
{
private Chart Chart1;
private PaneCaption PaneCaption2;
private IssueSubject m_subject;
private IContainer components = null;
// IObserver.Subject
public ISubject Subject
{
set
{
m_subject = (IssueSubject)value;
m_subject.IssueDataChanged += new IssueSubject.IssueDataChangedEventHandler(this.m_subject_IssueDataChanged);
}
}
public ChartPane()
{
InitializeComponent();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
[DebuggerStepThroughAttribute()]
private void InitializeComponent()
{
PaneCaption2 = new PaneCaption();
Chart1 = new Chart();
SuspendLayout();
PaneCaption2.AntiAlias = false;
PaneCaption2.Caption = "Issues resolved";
PaneCaption2.Dock = DockStyle.Top;
PaneCaption2.Font = new Font("Tahoma", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
PaneCaption2.InactiveGradientHighColor = Color.FromArgb(175, 200, 245);
PaneCaption2.InactiveGradientLowColor = Color.FromArgb(205, 225, 250);
PaneCaption2.InactiveTextColor = Color.Black;
PaneCaption2.Location = new Point(0, 0);
PaneCaption2.Name = "PaneCaption2";
PaneCaption2.Size = new Size(272, 20);
PaneCaption2.TabIndex = 22;
Chart1.BackColor = SystemColors.MenuText;
Chart1.Dock = DockStyle.Fill;
Chart1.Font = new Font("Arial", 7.0F);
Chart1.ForeColor = SystemColors.ControlDarkDark;
Chart1.LabelColor = Color.Gray;
Chart1.Location = new Point(0, 20);
Chart1.Message = "asdfasdfasdf";
Chart1.Name = "Chart1";
Chart1.Size = new Size(272, 196);
Chart1.TabIndex = 23;
BackColor = SystemColors.Window;
Controls.Add(Chart1);
Controls.Add(PaneCaption2);
Name = "ChartPane";
Size = new Size(272, 216);
ResumeLayout(false);
}
// m_subject.IssueDataChanged
private void m_subject_IssueDataChanged(object sender, EventArgs e)
{
Chart1.Open = m_subject.GetOpenCount();
Chart1.Escalated = m_subject.GetEscalatedCount();
Chart1.Resolved = m_subject.GetClosedCount();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Weidong has been an information system professional since 1990. He has a Master's degree in Computer Science, and is currently a MCSD .NET