static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AppDomain.CurrentDomain.UnhandledException += handleUnhandledException; LookFeel.SetupNoirModerneLookFeel(); Logger.SetLog4NetGlobalContextProperty("LogFileDir", string.Format("{0}\\SI.Dashboard.HK", Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData))); Logger.Configure(); Logger.Debug("Logging up and running", typeof(Program)); var nMathPath = LocationFinder.GetLocation() == LocationFinder.Location.LN ? @"\\symnasuk\sd.symmetryinvestments.com$\SS\TradeAnalyzerClient\NMathNative" : @"\\symnashk\sd.symmetryinvestments.com$\SS\TradeAnalyzerClient\NMathNative"; Logger.InfoFormat(typeof(Program), "NMathNativeLocation set to: {0}", nMathPath); NMathConfiguration.NativeLocation = nMathPath; if (!SymmetryEnvironment.IsInSymmetryDomain) { DialogResult result; using (var loginForm = new SI.Controls.LoginForm()) result = loginForm.DisplayInShowFormDialog("Dashboard Login please", null); if (result != DialogResult.OK) return; } ShowForm.DefaultIcon = DashboardResources.Dashboard_01; var sf = new ShowForm { Text = string.Format("SI.Dashboard - {0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()), }; var mc = new MainContainer(); sf.Create(mc); mc.Create(); Application.DoEvents(); Application.Run(sf); }
protected override void innerLaunch() { LookFeel.SetupNoirModerneLookFeel(); ShowForm.DefaultIcon = DashboardResources.Dashboard_01; setupNMath(); var sf = new ShowForm { Text = string.Format("SI.Dashboard - {0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()), }; var mc = new MainContainer(); sf.Create(mc); mc.Create(); Application.Run(sf); }