Пример #1
0
        public override void Copy(Variable other)
        {
            base.Copy(other);
            UIVariable otherUI = other as UIVariable;

            if (otherUI == null)
            {
                return;
            }

            Height       = otherUI.Height;
            Width        = otherUI.Width;
            X            = otherUI.X;
            Y            = otherUI.Y;
            TranslationX = otherUI.TranslationX;
            TranslationY = otherUI.TranslationY;
            RuleX        = otherUI.RuleX;
            RuleY        = otherUI.RuleY;
            Location     = otherUI.Location;
            RefViewX     = otherUI.RefViewX;
            RefViewY     = otherUI.RefViewY;
            ParentView   = otherUI.ParentView;

            WidgetType = otherUI.WidgetType;
            WidgetName = otherUI.WidgetName;

            InitValue = otherUI.InitValue;
            Alignment = otherUI.Alignment;
            MinVal    = otherUI.MinVal;
            MaxVal    = otherUI.MaxVal;
            CurrVal   = otherUI.CurrVal;
            Step      = otherUI.Step;
        }
Пример #2
0
 public UIVariable(UIType type, string name = "",
                   UIVariable refViewX      = null, UIVariable refViewY = null)
 {
     WidgetType = type;
     WidgetName = name;
     RefViewX   = refViewX;
     RefViewY   = refViewY;
 }
Пример #3
0
        public override Variable Clone()
        {
            UIVariable newVar = (UIVariable)this.MemberwiseClone();

            return(newVar);
        }