[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/samples CustomControl.cs,1.1,1.2
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/samples CustomControl.cs,1.1,1.2 |
Date: |
Sat, 21 Jun 2003 17:51:43 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/samples
In directory subversions:/tmp/cvs-serv10224/samples
Modified Files:
CustomControl.cs
Log Message:
ProgressBar class fixes and CustomControl additions
Index: CustomControl.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/samples/CustomControl.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** CustomControl.cs 12 Jun 2003 11:22:22 -0000 1.1
--- CustomControl.cs 21 Jun 2003 21:51:40 -0000 1.2
***************
*** 35,39 ****
Form form = new MainForm();
form.Width = 400;
! form.Height = 320;
form.Text = "Graphs app";
GraphItem[] data=new GraphItem[]
--- 35,39 ----
Form form = new MainForm();
form.Width = 400;
! form.Height = 350;
form.Text = "Graphs app";
GraphItem[] data=new GraphItem[]
***************
*** 66,69 ****
--- 66,70 ----
const int radius=5;
private static Size offset=new Size(radius, radius);
+ private Label label;
internal void Draw(Graphics graphics)
***************
*** 84,87 ****
--- 85,89 ----
{
active=true;
+ label.Visible=true;
using(Graphics graphics=CreateGraphics())
{
***************
*** 93,96 ****
--- 95,99 ----
{
active=false;
+ label.Visible=false;
using(Graphics graphics=CreateGraphics())
{
***************
*** 107,114 ****
}
! public GraphPoint(Point pt)
{
Visible=true;
this.Location=pt-offset;
}
--- 110,123 ----
}
! public GraphPoint(Point pt, GraphItem item)
{
Visible=true;
this.Location=pt-offset;
+ label=new Label();
+ label.Text=item.ToString();
+ label.Visible=false;
+ label.Width=50;
+ label.ForeColor=Color.Blue;
+ label.Location=this.Location+offset;
}
***************
*** 120,123 ****
--- 129,140 ----
}
}
+
+ public Label Label
+ {
+ get
+ {
+ return label;
+ }
+ }
}
***************
*** 130,133 ****
--- 147,151 ----
const int edge=300;
Size offset;
+ private ProgressBar bar;
internal void Draw(Graphics graphics)
***************
*** 181,185 ****
get
{
! return new Size(edge+20,edge+20);
}
}
--- 199,203 ----
get
{
! return new Size(edge+20,edge+50);
}
}
***************
*** 188,194 ****
{
Draw(args.Graphics);
! foreach(Control ctrl in Controls)
! {
! }
}
--- 206,219 ----
{
Draw(args.Graphics);
! }
!
! protected override void OnMouseMove(MouseEventArgs e)
! {
! this.bar.Value=e.X;
! }
!
! protected override void OnMouseLeave(EventArgs e)
! {
! this.bar.Value = this.bar.Minimum;
}
***************
*** 204,210 ****
point.Y=edge-(dataset[i].Y * (edge/100));
point=point+offset;
! points[i]=new GraphPoint(point);
this.Controls.Add(points[i]);
}
}
}
--- 229,244 ----
point.Y=edge-(dataset[i].Y * (edge/100));
point=point+offset;
! points[i]=new GraphPoint(point,dataset[i]);
this.Controls.Add(points[i]);
+ this.Controls.Add(points[i].Label);
}
+
+ bar=new ProgressBar();
+ bar.Size=new Size(edge+4,16);
+ bar.Location=new Point(3,edge+5);
+ this.Controls.Add(bar);
+ this.bar.Maximum=this.Right;
+ this.bar.Minimum=this.Left;
+ this.bar.Step=(edge/10);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/samples CustomControl.cs,1.1,1.2,
Gopal.V <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms ProgressBar.cs,1.2,1.3 ControlPaint.cs,1.4,1.5
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.1070,1.1071
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms ProgressBar.cs,1.2,1.3 ControlPaint.cs,1.4,1.5
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.1070,1.1071
- Index(es):