Beispiel #1
0
 private void DrawCornerBorders()
 {
     Charmap[0, 0] = BorderDesign.GetBorderChar(Style, BorderPosition.LeftUpper);
     Charmap[0, Charmap.GetLength(1) - 1] = BorderDesign.GetBorderChar(Style, BorderPosition.RightUpper);
     Charmap[Charmap.GetLength(0) - 1, 0] = BorderDesign.GetBorderChar(Style, BorderPosition.LeftLower);
     Charmap[Charmap.GetLength(0) - 1, Charmap.GetLength(1) - 1] = BorderDesign.GetBorderChar(Style, BorderPosition.RightLower);
 }
Beispiel #2
0
        private void GenerateLowerBorder()
        {
            // It is special symbols for window header ( '╞', '╡' ). For better UX i did`t placed it in 'BorderDesign' class
            // to prevent other GUI objects using it
            charmap[2, 0]         = '╞';
            charmap[2, Width - 1] = '╡';

            // Generating lower statusbar row
            for (int i = 1; i < Width - 1; i++)
            {
                charmap[2, i] = BorderDesign.GetBorderChar(BorderStyle.Double, BorderPosition.Horizontal);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Setting higher window border
        /// </summary>
        private void GenerateTopBorder()
        {
            // Setting left upper window corner char
            charmap[0, 0] = BorderDesign.GetBorderChar(BorderStyle.Rounded, BorderPosition.LeftUpper);

            // Setting right upper window corner char
            charmap[0, Width - 1] = BorderDesign.GetBorderChar(BorderStyle.Rounded, BorderPosition.RightUpper);

            // Filling higher border between left and right upper corners
            for (int i = 1; i < Charmap.GetLength(1) - 1; i++)
            {
                charmap[0, i] = BorderDesign.GetBorderChar(BorderStyle.Rounded, BorderPosition.Horizontal);
            }
        }
Beispiel #4
0
        private void DrawBorders()
        {
            for (int i = 1; i < Charmap.GetLength(0) - 1; i++)
            {
                Charmap[i, 0] = BorderDesign.GetBorderChar(Style, BorderPosition.Vertical);
                Charmap[i, Charmap.GetLength(1) - 1] = BorderDesign.GetBorderChar(Style, BorderPosition.Vertical);
            }

            for (int i = 1; i < Charmap.GetLength(1) - 1; i++)
            {
                Charmap[0, i] = BorderDesign.GetBorderChar(Style, BorderPosition.Horizontal);
                Charmap[Charmap.GetLength(0) - 1, i] = BorderDesign.GetBorderChar(Style, BorderPosition.Horizontal);
            }
        }
Beispiel #5
0
        /// <summary>
        /// Draw border sides with corresponding border style symbols
        /// </summary>
        private void DrawBorders()
        {
            Charmap[Height - 1, 0]         = BorderDesign.GetBorderChar(CurrentBorderStyle, BorderPosition.LeftLower);
            Charmap[Height - 1, Width - 1] = BorderDesign.GetBorderChar(CurrentBorderStyle, BorderPosition.RightLower);


            for (int i = 1; i < Width - 1; i++)
            {
                Charmap[Height - 1, i] = BorderDesign.GetBorderChar(CurrentBorderStyle, BorderPosition.Horizontal);
            }

            for (int i = 3; i < Height - 1; i++)
            {
                Charmap[i, 0]         = BorderDesign.GetBorderChar(CurrentBorderStyle, BorderPosition.Vertical);
                Charmap[i, Width - 1] = BorderDesign.GetBorderChar(CurrentBorderStyle, BorderPosition.Vertical);
            }
        }
Beispiel #6
0
        /// <summary>
        /// Setting status border with window state control buttons(fullscreen, minimize, close) and application name
        /// </summary>
        private void GenerateStatusRow()
        {
            // Setting left and right borders
            charmap[1, 0]         = BorderDesign.GetBorderChar(BorderStyle.Rounded, BorderPosition.Vertical);
            charmap[1, Width - 1] = BorderDesign.GetBorderChar(BorderStyle.Rounded, BorderPosition.Vertical);

            // Setting window control buttons view (it is not regular buttons because buttons at least filling 3x3 grid)
            // but in this case we have only 1x1 box for drawindg
            charmap[1, 2] = '×';
            charmap[1, 5] = '□';
            charmap[1, 8] = '_';

            // Filling window status bar (Application name, or some other information for user)
            for (int i = 12; i < Width - 3; i++)
            {
                if ((i - 12) < Title.Length)
                {
                    charmap[1, i] = title.Text[i - 12];
                }
            }
        }