private void CopyChildren(IPanelElement fromPanel, IPanelElement toPanel) { foreach (var copyMe in fromPanel.Children.GetAllChildren()) { var iAmCopy = InstantiateCopyBase(copyMe); toPanel.AddChild(iAmCopy); } }
private static Matrix3D GetTransformation(this IPanelElement panel) { var matrix = Matrix3D.Identity; if (panel is IMovablePanel mp) { var m = Matrix3D.Identity; m.OffsetX = mp.OffsetX; matrix.Append(m); } var mc = Matrix3D.Identity; mc.OffsetX = panel.CenterX; mc.OffsetY = panel.CenterY; mc.OffsetZ = panel.CenterZ; matrix.Append(mc); return(matrix); }
public IToolToPanelTransformer GetTransformer(IPanelElement panel, IEnumerable <IToolElement> tools) => new ToolToPanelTransformer(panel, tools);
public ToolToPanelTransformer(IPanelElement panel, IEnumerable <IToolElement> tools) { _panel = panel; _tools = tools; }