示例#1
0
        private void TextBox1_TextChanged(object sender, EventArgs e)
        {
            Console.Clear();
            //Console.SetBufferSize(Math.Max(CalcSize(textBox1.Text),30),Math.Max(MyFont.Height + 2,10));
            //Console.SetWindowSize(Math.Max(CalcSize(textBox1.Text),30),Math.Max(MyFont.Height + 2,10));

            MyFont.DrawText(textBox1.Text, 0, 0, ConsoleColor.White);
        }
示例#2
0
        /// <summary>Draws this label</summary>
        public override void DrawElement()
        {
            int LineOffset = 0;

            foreach (String Line in Text.Split('\n'))
            {
                Font.DrawText(Line, Parent.LeftPos + LeftPos, Parent.TopPos + TopPos + (LineOffset * Font.Height + 1), FG);
                LineOffset++;
            }
        }