コード例 #1
0
 internal GroupBase(Control targetControl)
 {
     this.targetControl = targetControl;
     borderThickness    = new Thickness(1);
     borderChars        = Application.Environment.BorderChars;
     TextArea           = Rect.Empty;
 }
コード例 #2
0
 /// <summary>
 /// Initialize a new instance <see cref="GridBorderChars"/>
 /// </summary>
 public GridBorderChars(BorderChars borderChars, char topInner, char rightInner, char bottomInner,
                        char leftInner, char verticalInner, char horizontalInner, char crossInner)
     : this(borderChars.TopLeft, borderChars.TopMiddle, borderChars.TopRight, borderChars.MiddleLeft,
            borderChars.MiddleRight, borderChars.BottomLeft, borderChars.BottomMiddle, borderChars.BottomRight,
            topInner, rightInner, bottomInner, leftInner, verticalInner, horizontalInner, crossInner)
 {
 }
コード例 #3
0
        /// <summary>
        /// Compare two <see cref="BorderChars" /> for equality
        /// </summary>
        public static bool operator ==(GridBorderChars gridBorderChars1, GridBorderChars gridBorderChars2)
        {
            if (ReferenceEquals(gridBorderChars1, gridBorderChars2))
            {
                return(true);
            }
            if (ReferenceEquals(gridBorderChars1, null) ||
                ReferenceEquals(gridBorderChars2, null))
            {
                return(false);
            }

            if (BorderChars.CompareParams(gridBorderChars1, gridBorderChars2))
            {
                return(gridBorderChars1.TopInner == gridBorderChars2.TopInner &&
                       gridBorderChars1.RightInner == gridBorderChars2.RightInner &&
                       gridBorderChars1.BottomInner == gridBorderChars2.BottomInner &&
                       gridBorderChars1.LeftInner == gridBorderChars2.LeftInner &&
                       gridBorderChars1.VerticalInner == gridBorderChars2.VerticalInner &&
                       gridBorderChars1.HorizontalInner == gridBorderChars2.HorizontalInner &&
                       gridBorderChars1.CrossInner == gridBorderChars2.CrossInner);
            }

            return(false);
        }
コード例 #4
0
 internal static bool CompareParams(BorderChars borderChars1, BorderChars borderChars2)
 => borderChars1.GetHashCode() == borderChars2.GetHashCode();