예제 #1
0
 public override void Save(SaveVisitor visitor)
 {
     visitor.Visit(this);
     visitor.Spaces += "   ";
     foreach (ShapeComponent shape in Shapes)
     {
         shape.Save(visitor);
     }
     visitor.Spaces = visitor.Spaces.Substring(0, visitor.Spaces.Length - 3);
 }
예제 #2
0
 public override void Save(SaveVisitor visitor)
 {
     visitor.Visit(this);
     ShapeComponent.Save(visitor);
 }
예제 #3
0
        //public Point Location { get; set; }

        //public MousePositionType GetMousePositionType(Point point)
        //{
        //    double left = Location.X;
        //    double top = Location.Y;
        //    double right = left + ActualWidth;
        //    double bottom = top + ActualHeight;
        //    if (point.X < left || point.X > right || point.Y < top || point.Y > bottom ) return MousePositionType.None;

        //    const double GAP = 10;
        //    if (point.X - left < GAP)
        //    {
        //        // Left edge.
        //        if (point.Y - top < GAP) return MousePositionType.UL;
        //        if (bottom - point.Y < GAP) return MousePositionType.DL;
        //        return MousePositionType.L;
        //    }
        //    else if (right - point.X < GAP)
        //    {
        //        // Right edge.
        //        if (point.Y - top < GAP) return MousePositionType.UR;
        //        if (bottom - point.Y < GAP) return MousePositionType.DR;
        //        return MousePositionType.R;
        //    }
        //    if (point.Y - top < GAP) return MousePositionType.T;
        //    if (bottom - point.Y < GAP) return MousePositionType.B;
        //    return MousePositionType.Body;
        //}

        public override void Save(SaveVisitor visitor)
        {
            visitor.Visit(this);
        }