Пример #1
0
 private void buttonOpenConsole_Click(object sender, EventArgs e)
 {
     if (!ConsoleWindow.Allocated)
     {
         ConsoleWindow.Allocate();
     }
     else if (!ConsoleWindow.Displayed)
     {
         ConsoleWindow.Show();
     }
     else
     {
         ConsoleWindow.Hide();
     }
 }
Пример #2
0
        static void Main(string[] args)
        {
            ConsoleWindow.Allocate();

            if (Array.IndexOf(args, "--with-console") < 0)
            {
                ConsoleWindow.Hide();
            }

            Trace.WriteLine(EntryAssemblyInformation.Title + " Version " + EntryAssemblyInformation.Version);
            ConsoleWindow.SetIcon(Properties.Resources.icon);
            Console.Title = EntryAssemblyInformation.Title + " log";

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Forms.MainForm());
        }