Пример #1
0
 public CMDFramePalette(CMDPaletteItem window, CMDPaletteItem text,
                        CMDFrameButtonPalette closeButton)
 {
     WindowColor      = window;
     TextColor        = text;
     CloseButtonColor = closeButton;
 }
Пример #2
0
 public CMDFramePalette(CMDPaletteItem window, CMDPaletteItem text, 
     CMDFrameButtonPalette closeButton)
 {
     WindowColor = window;
     TextColor = text;
     CloseButtonColor = closeButton;
 }
Пример #3
0
 public CMDWindowPalette(CMDPaletteItem window, CMDPaletteItem text,
                         CMDFrameButtonPalette closeButton, CMDFrameButtonPalette minimizeButton,
                         CMDFrameButtonPalette maximizeButton)
     : base(window, text, closeButton)
 {
     MinimizeButtonColor = minimizeButton;
     MaximizeButtonColor = maximizeButton;
 }
Пример #4
0
        /// <summary>
        /// Draw a single-lined rectangle
        /// </summary>
        /// <param name="palette"></param>
        /// <param name="location"></param>
        /// <param name="size"></param>
        public static void DrawSingleLinedRectangle(CMDPaletteItem palette,
                                                    Point location, Size size)
        {
            Console.ForegroundColor = palette.Foreground;
            Console.BackgroundColor = palette.Background;

            Console.SetCursorPosition(location.X, location.Y);

            Console.Write("┌");
            for (int i = 0; i < size.Width - 2; i++)
            {
                Console.Write("─");
            }
            Console.Write("┐");

            Console.SetCursorPosition(location.X, location.Y + 1);

            for (int j = 0; j < size.Height - 2; j++)
            {
                Console.Write("│");
                for (int i = 0; i < size.Width - 2; i++)
                {
                    Console.Write(" ");
                }
                Console.Write("│");

                Console.SetCursorPosition(location.X, location.Y + 1 + j);
            }

            Console.Write("└");
            for (int i = 0; i < size.Width - 2; i++)
            {
                Console.Write("─");
            }
            Console.Write("┘");
        }
Пример #5
0
        /// <summary>
        /// Draw a single-lined rectangle
        /// </summary>
        /// <param name="palette"></param>
        /// <param name="location"></param>
        /// <param name="size"></param>
        public static void DrawSingleLinedRectangle(CMDPaletteItem palette,
            Point location, Size size)
        {
            Console.ForegroundColor = palette.Foreground;
            Console.BackgroundColor = palette.Background;

            Console.SetCursorPosition(location.X, location.Y);

            Console.Write("┌");
            for (int i = 0; i < size.Width - 2; i++)
                Console.Write("─");
            Console.Write("┐");

            Console.SetCursorPosition(location.X, location.Y + 1);

            for (int j = 0; j < size.Height - 2; j++)
            {
                Console.Write("│");
                for (int i = 0; i < size.Width - 2; i++)
                    Console.Write(" ");
                Console.Write("│");

                Console.SetCursorPosition(location.X, location.Y + 1 + j);
            }

            Console.Write("└");
            for (int i = 0; i < size.Width - 2; i++)
                Console.Write("─");
            Console.Write("┘");
        }
Пример #6
0
 public CMDFrameButtonPalette(CMDPaletteItem site, CMDPaletteItem content)
 {
     this.SiteColor    = site;
     this.ContentColor = content;
 }
Пример #7
0
 public CMDMnemonicPalette(CMDPaletteItem mnemonic, CMDPaletteItem main)
 {
     MnemonicColor = mnemonic;
     MainColor     = main;
 }
Пример #8
0
 public CMDMnemonicPalette(CMDPaletteItem mnemonic, CMDPaletteItem main)
 {
     MnemonicColor = mnemonic;
     MainColor = main;
 }
Пример #9
0
 public CMDWindowPalette(CMDPaletteItem window, CMDPaletteItem text, 
     CMDFrameButtonPalette closeButton, CMDFrameButtonPalette minimizeButton,
     CMDFrameButtonPalette maximizeButton)
     : base(window, text, closeButton)
 {
     MinimizeButtonColor = minimizeButton;
     MaximizeButtonColor = maximizeButton;
 }
Пример #10
0
 public CMDFrameButtonPalette(CMDPaletteItem site, CMDPaletteItem content)
 {
     this.SiteColor = site;
     this.ContentColor = content;
 }