Пример #1
0
        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);
        }
Пример #2
0
        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();
        }
Пример #3
0
        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();
        }
Пример #4
0
 public void HistoryRecordDzElementNewBounds(AbstractRect dzBox, Rectangle oldRect, Rectangle newRect)
 {
     this.dzCommandHistory.AddAction(new DzSetBoundsAction(dzBox, oldRect, newRect));
 }
Пример #5
0
 //-----------------------------------------------------------------------------------------------
 public void HistoryRecordDzElementNewPosition(AbstractRect dzBox, Point oldPoint, Point newPoint)
 {
     this.dzCommandHistory.AddAction(new DzSetLocationAction(dzBox, oldPoint, newPoint));
 }
Пример #6
0
 public DzSetBoundsAction(AbstractRect box, Rectangle oldBounds, Rectangle newBounds)
 {
     this.dzBox     = box;
     this.oldBounds = oldBounds;
     this.newBounds = newBounds;
 }
Пример #7
0
 public DzSetLocationAction(AbstractRect box, Point oldPoint, Point newPoint)
 {
     this.dzBox    = box;
     this.oldPoint = oldPoint;
     this.newPoint = newPoint;
 }