Beispiel #1
0
 public override void OnMouseDown(MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         CC.ID = CC.GetNewID();
         DrawRectangle w = new DrawRectangle(e.X, e.Y, 1, 1, Color.Red, CC.ID);
         this.AddNewObject(w);
         this.isNewObjectAdded = true;
     }
 }
Beispiel #2
0
 //鼠标按下时触发的事件
 public override void OnMouseDown(MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         CC.ID = CC.GetNewID();
         DrawImage w = new DrawImage(e.X, e.Y, 10, 10, CC.bitmap, CC.ID);
         this.AddNewObject(w);
         this.isNewObjectAdded = true;
     }
 }
Beispiel #3
0
 public override void OnMouseDown(MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         this.isNewObjectAdded = true;
         CC.ID = CC.GetNewID();
         DrawText w = new DrawText(e.X, e.Y, CC.strText, CC.color, CC.ID);
         this.AddNewObject(w);
         CC.panel.Refresh();
     }
 }
Beispiel #4
0
 public override void OnMouseDown(MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         CC.ID = CC.GetNewID();
         Point     p = new Point(e.X, e.Y);
         DrawCurve w = new DrawCurve(p, Color.Red, 2, CC.ID);
         this.AddNewObject(w);
         myLastPoint           = p;
         this.isNewObjectAdded = true;
     }
 }