예제 #1
0
        protected override void SetValue(object cObject, object cInnerObject)
        {
            base.SetValue(cObject, cInnerObject);
            ButtonObject buttonObject = cObject as ButtonObject;

            if (buttonObject == null)
            {
                return;
            }
            buttonObject.NormalFileData   = this.NormalFileData;
            buttonObject.PressedFileData  = this.PressedFileData;
            buttonObject.DisabledFileData = this.DisabledFileData;
            buttonObject.FontSize         = this.FontSize;
            buttonObject.ButtonText       = this.ButtonText;
            buttonObject.TextColor        = this.TextColor;
            buttonObject.FlipX            = this.FlipX;
            buttonObject.FlipY            = this.FlipY;
            buttonObject.Scale9Enable     = this.Scale9Enable;
            buttonObject.LeftEage         = this.LeftEage;
            buttonObject.RightEage        = this.RightEage;
            buttonObject.TopEage          = this.TopEage;
            buttonObject.BottomEage       = this.BottomEage;
            buttonObject.DisplayState     = this.DisplayState;
            buttonObject.FontResource     = this.FontResource;
            buttonObject.Size             = this.Size;
            buttonObject.PreSizeEnable    = this.PreSizeEnable;
            buttonObject.PreSize          = this.PreSize;
            buttonObject.DisplayState     = this.DisplayState;
        }
예제 #2
0
            public override void SetValue(ref object instance, Arguments index, bool value, object aspectArgs)
            {
                ButtonObject buttonObject = (ButtonObject)instance;

                buttonObject._scale9Enabled = value;
                buttonObject.GetInnerWidget().SetScale9Enabled(value);
                string compositeTaskName = buttonObject.GetType().Name + "Scale9Enable";

                using (CompositeTask.Run(compositeTaskName))
                {
                    if (!value)
                    {
                        buttonObject.PreSizeEnable = false;
                    }
                    buttonObject.RefreshBoundingBox(false);
                    buttonObject.RaisePropertyChanged <CocoStudio.Model.PointF>(() => buttonObject.Size);
                    buttonObject.RaisePropertyChanged <bool>(() => buttonObject.Scale9Enable);
                }
            }