示例#1
0
 /// <summary>
 /// Applies the specified <c>fourSideSetting</c> into <c>target</c> property for all four sides
 /// </summary>
 /// <param name="setting">The setting.</param>
 /// <param name="target">The target.</param>
 public void apply(fourSideSetting setting, styleFourSideParameter target)
 {
     this[styleSideDirection.bottom, target] = setting.bottom;
     this[styleSideDirection.top, target]    = setting.top;
     this[styleSideDirection.left, target]   = setting.left;
     this[styleSideDirection.right, target]  = setting.right;
 }
示例#2
0
 public Object this[styleSideDirection side, styleFourSideParameter param]
 {
     get
     {
         styleSide sd = this[side];
         return(sd[param]);
     }
     set
     {
         styleSide sd = this[side];
         sd[param] = value;
     }
 }
示例#3
0
        public object this[styleFourSideParameter param]
        {
            get
            {
                switch (param)
                {
                case styleFourSideParameter.borderColor:
                    return(borderColor);

                    break;

                case styleFourSideParameter.padding:
                    return(padding);

                    break;

                case styleFourSideParameter.margin:
                    return(margin);

                    break;

                case styleFourSideParameter.thickness:
                    return(thickness);

                    break;

                case styleFourSideParameter.type:
                    return(type);

                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
            set
            {
                switch (param)
                {
                case styleFourSideParameter.borderColor:
                    borderColor = (acePaletteRole)value;
                    break;

                case styleFourSideParameter.padding:
                    padding = (Int32)value;
                    break;

                case styleFourSideParameter.margin:
                    margin = (Int32)value;
                    break;

                case styleFourSideParameter.thickness:
                    thickness = (Int32)value;
                    break;

                case styleFourSideParameter.type:
                    type = (styleBorderType)value;

                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
        }