Ejemplo n.º 1
0
        private static void OpenSettingsWindow()
        {
            if (isConnectedToIRC)
            {
                Console.WriteLine("");
                Console.WriteLine("NOTE: If you update IRC settings, you must restart the bot for it to take effect.");
                Console.WriteLine("");
            }

            Console.WriteLine("Opening Settings...");

            Thread thread = new Thread(() =>
            {
                settingsHelpWindow = new MainWindow();
                settingsHelpWindow.Show();
                settingsHelpWindow.Closed += (s, e) => settingsHelpWindow.Dispatcher.InvokeShutdown();
                Dispatcher.Run();
            });

            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
        }
Ejemplo n.º 2
0
        private static void OpenSettingsWindow()
        {
            if (isConnectedToIRC)
            {
                Console.WriteLine("");
                Console.WriteLine("NOTE: If you update IRC settings, you must restart the bot for it to take effect.");
                Console.WriteLine("");
            }

            Console.WriteLine("Opening Settings...");

            Thread thread = new Thread(() =>
            {
                settingsHelpWindow = new MainWindow();
                settingsHelpWindow.Show();
                settingsHelpWindow.Closed += (s, e) => settingsHelpWindow.Dispatcher.InvokeShutdown();
                Dispatcher.Run();
            });
            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();


        }