Пример #1
0
        public static void Initialize()
        {
            /*
             * Application.EnableVisualStyles();
             * Application.SetCompatibleTextRenderingDefault(false);
             */
            ConsoleApp.ConsoleManager f = new ConsoleApp.ConsoleManager();
            Thread thread = new Thread(() =>
            {
                Application.Run(f);
            });

            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();


            while (!f.Initialized)
            {
                Thread.Sleep(25);
            }

            consoleApp = f;
            return;
        }