static void Main(string[] aArgs) { // create the application helper, adding a form based crash log dumper iHelper = new HelperLinnSetup(aArgs); iHelper.AddCrashLogDumper(new CrashLogDumperForm(iHelper.Title, iHelper.Product, iHelper.Version, iHelper.Icon)); iHelper.ProcessOptionsFileAndCommandLine(); iDiagnoctics = new Diagnostics(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // ensure that all unhandled exceptions in this thread bypass the // Application class handlers and let the AppDomain handlers that // have been added in to the helper handle it if (HelperLinnSetup.IsWindows) { Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); } else { Application.ThreadException += UnhandledExceptionNonWindows; } Application.Run(new FormLinnSetup(iHelper, iDiagnoctics, new AppletManager(iHelper, iDiagnoctics))); iHelper.Dispose(); }
public FormLinnSetup(HelperLinnSetup aHelper, Diagnostics aDiagnostics, AppletManager aManager) { iManager = aManager; iHelper = aHelper; iDiagnostics = aDiagnostics; iFormUserLog = new FormUserLog(iHelper.Icon); iFormUserLog.SetBackColour(Color.Black); iFormUserLog.SetForeColour(Color.White); InitializeComponent(); this.WindowState = FormWindowState.Maximized; this.Text = iHelper.Product; this.Icon = iHelper.Icon; releaseNotesToolStripMenuItem.Image = Linn.Toolkit.WinForms.Properties.Resources.Rss; betaReleaseNotesToolStripMenuItem.Image = Linn.Toolkit.WinForms.Properties.Resources.Rss; // select view if (aHelper.ApplicationOptions.ViewDetails) { tableLayoutPanel1.Visible = false; listView1.Visible = true; deviceDetailsToolStripMenuItem.Text = "Icons"; } // set up column sorting listView1.ListViewItemSorter = new ComparerListView(0); // default to sort by room //create tabs for applets for (int i = 0; i < iManager.AppletNames.Count; i++) { TabPage page = new TabPage(iManager.AppletNames[i]); page.Tag = i; tabControl1.TabPages.Add(page); } statusStrip1.Padding = new Padding(3, 0, 3, 0); Closed += EventFormClosedHandler; }