public static void Draw(UIElement[] elems, XCommand cmd) { cmd.canvasVector = TabControlVector.tabCanvases[TabControlVector.nameLast]; foreach (var item in elems) { cmd.canvasVector.canvas.Children.Add(item); } DrawingVector2DTool.figures = new List <UIElement>(); for (int i = 0; i < cmd.canvasVector.canvas.Children.Count; ++i) { SimpleFigures fi = cmd.canvasVector.canvas.Children[i] as SimpleFigures; fi.GainFocus += cmd.canvasVector.OnGainFocus; fi.LostFocus += cmd.canvasVector.OnLostFocus; fi.FigurePaste += cmd.canvasVector.OnFigurePaste; DrawingVector2DTool.figures.Add(cmd.canvasVector.canvas.Children[i]); } }
public static UIElement Render(CanvasVector ownerControl, Thickness rect, XData data, XCommand cmd) { SimpleFigures result = new SimpleFigures(rect, data); result.ContextMenuSetUp(cmd); ownerControl.canvas.Children.Add(result); figures.Add(result); return(result); }
public ActionType(XCommand cmd) { this.cmd = cmd; }
public ActionColor(XCommand cmd) { this.cmd = cmd; }
public ActionWidth(XCommand cmd) { this.cmd = cmd; }
public ActionLoad(XCommand cmd) { this.cmd = cmd; }
public ActionSave(XCommand cmd) { this.cmd = cmd; }
public object Clone() { XCommand cmd = new XCommand(); return(cmd); }