예제 #1
0
 /// <summary>
 /// Copies the specified BoxEdges instance
 /// </summary>
 /// <param name="original"></param>
 public BoxEdges(BoxEdges original)
 {
     this.top    = original.top;
     this.bottom = original.bottom;
     this.right  = original.right;
     this.left   = original.left;
 }
예제 #2
0
파일: BoxEdges.cs 프로젝트: eakova/resizer
 /// <summary>
 /// Copies the specified BoxEdges instance
 /// </summary>
 /// <param name="original"></param>
 public BoxEdges(BoxEdges original)
 {
     this.top = original.top;
     this.bottom = original.bottom;
     this.right = original.right;
     this.left = original.left;
 }
예제 #3
0
 /// <summary>
 /// Copies the specified BoxEdges instance
 /// </summary>
 /// <param name="original"></param>
 public BoxEdges(BoxEdges original)
 {
     Top    = original.Top;
     Bottom = original.Bottom;
     Right  = original.Right;
     Left   = original.Left;
 }
예제 #4
0
        public static BoxEdges Parse(string text, BoxEdges fallbackValue)
        {
            double[] coords = ParseUtils.ParseList <double>(text, 0, 1, 4);
            if (coords == null)
            {
                return(fallbackValue);                //Failed to parse, or was empty
            }
            if (coords.Length == 1)
            {
                return(new BoxEdges(coords[0]));
            }
            if (coords.Length == 4)
            {
                return(new BoxEdges(coords[0], coords[1], coords[2], coords[3]));
            }

            return(fallbackValue);
        }
예제 #5
0
파일: BoxEdges.cs 프로젝트: eakova/resizer
 public BoxEdges SetTop(double top)
 {
     BoxEdges b = new BoxEdges(this); b.top = top;
     return b;
 }
예제 #6
0
파일: BoxEdges.cs 프로젝트: eakova/resizer
 public BoxEdges SetRight(double right)
 {
     BoxEdges b = new BoxEdges(this); b.right = right;
     return b;
 }
예제 #7
0
파일: BoxEdges.cs 프로젝트: eakova/resizer
 public BoxEdges SetLeft(double left)
 {
     BoxEdges b = new BoxEdges(this); b.left = left;
     return b;
 }
예제 #8
0
파일: BoxEdges.cs 프로젝트: eakova/resizer
 public BoxEdges SetBottom(double bottom)
 {
     BoxEdges b = new BoxEdges(this); b.bottom = bottom;
     return b;
 }
예제 #9
0
파일: BoxEdges.cs 프로젝트: eakova/resizer
 /// <summary>
 /// Sets the width of all edges, returning a new instance
 /// </summary>
 /// <param name="all"></param>
 /// <returns></returns>
 public BoxEdges SetAll(double all)
 {
     BoxEdges b = new BoxEdges(this); b.all = all;
     return b;
 }
예제 #10
0
파일: BoxEdges.cs 프로젝트: eakova/resizer
        public static BoxEdges Parse(string text, BoxEdges fallbackValue)
        {
            double[] coords = ParseUtils.ParseList<double>(text, 0, 1, 4);
            if (coords == null) return fallbackValue; //Failed to parse, or was empty

            if (coords.Length == 1) return new BoxEdges(coords[0]);
            if (coords.Length == 4) return new BoxEdges(coords[0], coords[1], coords[2], coords[3]);

            return fallbackValue;
        }
예제 #11
0
        public BoxEdges SetLeft(double left)
        {
            BoxEdges b = new BoxEdges(this); b.left = left;

            return(b);
        }
예제 #12
0
        public BoxEdges SetTop(double top)
        {
            BoxEdges b = new BoxEdges(this); b.top = top;

            return(b);
        }
예제 #13
0
        /// <summary>
        /// Sets the width of all edges, returning a new instance
        /// </summary>
        /// <param name="all"></param>
        /// <returns></returns>
        public BoxEdges SetAll(double all)
        {
            BoxEdges b = new BoxEdges(this); b.all = all;

            return(b);
        }
예제 #14
0
        public BoxEdges SetBottom(double bottom)
        {
            BoxEdges b = new BoxEdges(this); b.bottom = bottom;

            return(b);
        }
예제 #15
0
        public BoxEdges SetRight(double right)
        {
            BoxEdges b = new BoxEdges(this); b.right = right;

            return(b);
        }