Пример #1
0
 /// <summary>
 /// Setups the specified color role.
 /// </summary>
 /// <param name="__colorRole">The color role. Unknown for no changes</param>
 /// <param name="__thickness">The thickness. -1 for no changes</param>
 /// <param name="__padding">The padding.-1 for no changes</param>
 /// <param name="__margin">The margin.-1 for no changes</param>
 /// <param name="__type">The type. Unknown for no changes</param>
 public void setup(acePaletteRole __colorRole = acePaletteRole.none, Int32 __thickness = -1, Int32 __padding = -1, Int32 __margin = -1, styleBorderType __type = styleBorderType.unknown)
 {
     if (__colorRole != acePaletteRole.none)
     {
         borderColor = __colorRole;
     }
     if (__thickness > -1)
     {
         thickness = __thickness;
     }
     if (__padding > -1)
     {
         padding = __padding;
     }
     //padding = __padding;
     if (__margin > -1)
     {
         margin = __margin;
     }
     //margin = __margin;
     if (__type != styleBorderType.unknown)
     {
         type = __type;
     }
     type = __type;
 }
Пример #2
0
        /// <summary>
        /// Setups the specified padding.
        /// </summary>
        /// <param name="__padding">The padding. -1 to ignore</param>
        /// <param name="__margin">The margin. -1 to ignore</param>
        /// <param name="__borderColor">Color of the border. none to ignore</param>
        /// <param name="__thickness">The thickness. -1 to ignore</param>
        /// <param name="__type">The type. unknown to ignore</param>
        /// <param name="directions">The directions.</param>
        public void setup(Int32 __padding, Int32 __margin, acePaletteRole __borderColor, Int32 __thickness, styleBorderType __type, params styleSideDirection[] directions)
        {
            List <styleSideDirection> sides = directions.getFlatList <styleSideDirection>();

            if (sides.Count == 0)
            {
                sides.AddMultiple(styleSideDirection.top, styleSideDirection.right, styleSideDirection.left, styleSideDirection.bottom);
            }

            foreach (styleSideDirection side in sides)
            {
                this[side].borderColor = __borderColor;
                this[side].padding     = __padding;
                this[side].margin      = __margin;
                this[side].thickness   = __thickness;
                this[side].type        = __type;
            }
        }