Ejemplo n.º 1
0
 public void Draw(ICanvas canvas, RectangleF unitrect)
 {
     try
     {
         Brush Pen        = new SolidBrush(Color.White);
         Color StateColor = canvas.DataModel.GetStateColor(State);
         if (Selected)
         {
             Pen = Brushes.Magenta;
         }
         canvas.DrawPosition(canvas, Pen, PositionID.ToString(), Location);
     }
     catch (Exception ex)
     { throw ex; }
 }
Ejemplo n.º 2
0
 public eDrawObjectMouseDownEnum OnMouseDown(ICanvas canvas, UnitPoint point, ISnapPoint snappoint)
 {
     try
     {
         Int64 MaxID = 1;
         if (canvas.DataModel.ActiveLayer.Objects.Count() > 0)
         {
             if (canvas.DataModel.ActiveLayer.Objects.Where(p => p.Id == "PositionTool").Count() > 0)
             {
                 MaxID      = canvas.DataModel.ActiveLayer.Objects.Where(p => p.Id == "PositionTool").Max(p => (p as PositionTool).PositionID);
                 PositionID = MaxID + 1;
             }
         }
         Selected = false;
         location = point;
         Brush Pen = Brushes.White;
         canvas.DrawPosition(canvas, Pen, PositionID.ToString(), Location);
         return(eDrawObjectMouseDownEnum.Done);
     }
     catch (Exception ex)
     { throw ex; }
 }