public static void Main() { /* Printing is done though the usual Console.Writeline, to a textbox. */ console = new SearchIOToTextWriter(); Console.SetOut(Program.console); /*** splash screen intro ***/ /* runs on a parallel thread until all program data is loaded in.*/ AboutGraphSynth introSplashWindow = new AboutGraphSynth(); console.outputBox = introSplashWindow.richTextBox1; introSplashWindow.richTextBox1.Visible = true; introSplashWindow.closeButton.Visible = false; Thread introSplashThread = new Thread(new ThreadStart(introSplashWindow.ShowAsDialog)); introSplashThread.Start(); /* declare the main window that contains other windows and is the main place/thread that * all other routines are run from. */ output("enabling visual styles"); Application.EnableVisualStyles(); output("starting main form"); main = new mainForm(); SearchIO.main = main; /*** here the default parameters from App.config are loaded in.*/ output("Reading in settings file"); settings = globalSettings.readInSettings(introSplashThread); if (settings != null) { SearchIO.defaultVerbosity = settings.defaultVerbosity; output("Default Verbosity set to " + settings.defaultVerbosity.ToString()); SafeInvokeHelper.Invoke(introSplashWindow, "SendToBack", null); /* loadDefaults can be time consuming if there are many ruleSets/rules to load. */ settings.loadDefaultSeedAndRuleSets(); /* Okay, done with load-in, close self-promo */ output("Closing Splash...", 3); if (introSplashThread.IsAlive) introSplashThread.Abort(); /* set the console.Writeline to the outputTextBox in main since the splash screen * is now closed. */ console.outputBox = main.outputTextBox; Application.Run(main); } }
private void aboutGraphSynthToolStripMenuItem_Click(object sender, EventArgs e) { AboutGraphSynth about = new AboutGraphSynth(); about.Show(); }