, . , , - , ( System.Windows.Forms.Control), MyDrawingObject, . (List, Array - ) MyDrawingObjects .
, - , , . My Ball :
class Ball
{
public float Radius {get; set;}
public int Color {get; set;}
public float Weight {get; set;}
public Point Position {get; set;}
...
}
:
class MyDrawingBoard : System.Windows.Forms.Control
{
List<Ball> MyBalls = new List<Ball>();
override void OnPaint(object sender, PaintEventArgs e)
{
foreach(var b in MyBalls)
{
e.Graphics.DrawEllipse()...
}
}
}
, ClipRectangle, List . .