public UIHolderBox WrapWithHolderBox(int x, int y, AbstractRect uibox) { //create holder ui var box1 = new UIHolderBox(uibox.Width + 10, uibox.Height + 10); uibox.SetLocation(5, 5); box1.AddChild(uibox); box1.SetLocation(x, y); box1.TargetBox = uibox; SetupActiveBoxProperties(box1); userBoxes.Add(box1); return(box1); }
public static void WriteElement(DzBoxSerializer writer, AbstractRect uiElement, string elemName) { uiElement.Walk(writer); //writer.BeginElement(elemName); ////collect bounds and attrs //writer.AddAttribute("left", uiElement.Left.ToString()); //writer.AddAttribute("top", uiElement.Top.ToString()); //writer.AddAttribute("width", uiElement.Width.ToString()); //writer.AddAttribute("height", uiElement.Height.ToString()); ////------------------------------------------------------- ////content //writer.EndElement(); }
public static void WriteCommon(DzBoxSerializer writer, AbstractRect uiElement) { //find element type //var elemType = uiElement.GetType(); //writer.BeginElement(elemName); ////collect bounds and attrs //writer.AddAttribute("left", uiElement.Left.ToString()); //writer.AddAttribute("top", uiElement.Top.ToString()); //writer.AddAttribute("width", uiElement.Width.ToString()); //writer.AddAttribute("height", uiElement.Height.ToString()); ////------------------------------------------------------- ////content //writer.EndElement(); }
public void HistoryRecordDzElementNewBounds(AbstractRect dzBox, Rectangle oldRect, Rectangle newRect) { this.dzCommandHistory.AddAction(new DzSetBoundsAction(dzBox, oldRect, newRect)); }
//----------------------------------------------------------------------------------------------- public void HistoryRecordDzElementNewPosition(AbstractRect dzBox, Point oldPoint, Point newPoint) { this.dzCommandHistory.AddAction(new DzSetLocationAction(dzBox, oldPoint, newPoint)); }
public DzSetBoundsAction(AbstractRect box, Rectangle oldBounds, Rectangle newBounds) { this.dzBox = box; this.oldBounds = oldBounds; this.newBounds = newBounds; }
public DzSetLocationAction(AbstractRect box, Point oldPoint, Point newPoint) { this.dzBox = box; this.oldPoint = oldPoint; this.newPoint = newPoint; }