Пример #1
0
        static async Task Main(string[] args)
        {
            _ = new ArgumentException(); // f****n sdk bugs reeeeeeee

            CultureInfo.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-gb");
            AppDomain.CurrentDomain.UnhandledException   += CurrentDomain_UnhandledException;
            AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException;

            buffer = new FrameBuffer(Console.WindowWidth, Console.WindowHeight);

            FrameBufferGraphics graphics = new FrameBufferGraphics(buffer);
            UIExtension         ext      = new UIExtension(buffer);

            buffer.AddDrawExtension(ext);

            SetupUI(buffer, ext);



            buffer.Run();
            await Run(buffer);

            await Task.Yield();

            ext.BeginEventLoop();
        }
Пример #2
0
        static void Main(string[] args)
        {
            FrameBuffer buffer = new FrameBuffer(Console.WindowWidth, Console.WindowHeight)
            {
                FrameLimit = 60
            };

            FrameBufferGraphics graphics = new FrameBufferGraphics(buffer);

            buffer.Run();

            UIExtension ext      = new UIExtension(buffer);
            ImageBox    imageBox = new ImageBox()
            {
                Image  = Image.Load <Rgb24>(@"C:\Users\wamwo\Downloads\congaparrot.gif"),
                Width  = 32,
                Height = 32
            };

            ext.Controls.Add(imageBox);
            ImageBox imageBox2 = new ImageBox()
            {
                Image  = Image.Load <Rgb24>(@"C:\Users\wamwo\Downloads\congaparrot.gif"),
                Width  = 32,
                Height = 32,
                X      = 32
            };

            ext.Controls.Add(imageBox2);
            ImageBox imageBox3 = new ImageBox()
            {
                Image  = Image.Load <Rgb24>(@"C:\Users\wamwo\Downloads\congaparrot.gif"),
                Width  = 32,
                Height = 32,
                X      = 64
            };

            ext.Controls.Add(imageBox3);
            ImageBox imageBox4 = new ImageBox()
            {
                Image  = Image.Load <Rgb24>(@"C:\Users\wamwo\Downloads\congaparrot.gif"),
                Width  = 32,
                Height = 32,
                X      = 96
            };

            ext.Controls.Add(imageBox4);
            buffer.AddDrawExtension(ext);
        }