Exemple #1
0
 public ConsoleInput()
 {
     instance = this;
 }
Exemple #2
0
        static void Main(string[] args)
        {
            Console.OutputEncoding = Encoding.UTF8;
            Console.CursorVisible  = false;

            var c = new ConsoleInput();

            c.Start();

            c.onMouseClick = (int x, int y) =>
            {
            };

            /*
             * var root = new UiRoot();
             *
             * var cb = new Foldable(10, 10);
             * cb.caption = "SystemLog";
             *
             * cb.AddItem(new TextLine("Corgi doge computer"));
             * cb.AddItem(new TextLine("Bitcoin pump"));
             * cb.AddItem(new TextLine("Scam coin"));
             * cb.AddItem(new TextLine("Corgi poop desk zuzu"));
             *
             * var fd = new Foldable(10, 10);
             * fd.caption = "Zuzu";
             * fd.AddItem(new TextLine("you"));
             * cb.AddItem(fd);
             *
             * root.AddChild(cb);
             * root.Draw();
             */

            Logger.WriteLine("test", "asdf");
            Logger.WriteLine("test", "qwer");
            Logger.WriteLine("asdf", "qwer");


            /*
             * string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), @"bluehair.png");
             * using (Graphics g = Graphics.FromHwnd(GetConsoleWindow()))
             * {
             *      using (Image image = Image.FromFile(path))
             *      {
             *              Size fontSize = GetConsoleFontSize();
             *
             *              var location = new Point(0, 0);
             *              var imageSize = new Size(80, 40);
             *
             *              // translating the character positions to pixels
             *              Rectangle imageRect = new Rectangle(
             *                      location.X * fontSize.Width,
             *                      location.Y * fontSize.Height,
             *                      imageSize.Width * fontSize.Width,
             *                      imageSize.Height * fontSize.Height);
             *              g.DrawImage(image, imageRect);
             *      }
             * }
             */

            while (true)
            {
            }
        }