static void Main(string[] args) { try { if (!EventLog.SourceExists("LiveSplit")) { EventLog.CreateEventSource("LiveSplit", "Application"); } } catch { } try { FiletypeRegistryHelper.RegisterFileFormats(); } catch (Exception ex) { Log.Error(ex); } // Add LiveSplit.exe to Registry if not already there, so that Emulated Browser can load Twitch properly (look up Emulated Browsers & Compatibility View if interested) try { if (!InternetExplorerBrowserEmulation.IsBrowserEmulationSet("LiveSplit.exe")) { InternetExplorerBrowserEmulation.SetBrowserEmulationVersion("LiveSplit.exe"); } } catch (Exception ex) { Log.Error(ex); } }
static void Main(string[] args) { try { if (!EventLog.SourceExists("LiveSplit")) { EventLog.CreateEventSource("LiveSplit", "Application"); } } catch { } try { if (args.Length > 0 && args[0] == "obsplugin") { InstallOBSPlugin(); } else { FiletypeRegistryHelper.RegisterFileFormats(); } } catch (Exception ex) { Log.Error(ex); } }
static void Main(string[] args) { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Environment.CurrentDirectory = Path.GetDirectoryName(Application.ExecutablePath); #if !DEBUG FiletypeRegistryHelper.RegisterFileFormatsIfNotAlreadyRegistered(); #endif string splitsPath = null; string layoutPath = null; for (var i = 0; i < args.Length; ++i) { if (args[i] == "-s") { splitsPath = args[++i]; } else if (args[i] == "-l") { layoutPath = args[++i]; } } Application.Run(new TimerForm(splitsPath: splitsPath, layoutPath: layoutPath)); if (Twitch.Instance != null) { Twitch.Instance.CloseAllChatConnections(); } } #if !DEBUG catch (Exception e) { Log.Error(e); MessageBox.Show(string.Format("LiveSplit has crashed due to the following reason:\n\n{0}", e.Message), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } #endif finally { } }
static void Main(string[] args) { try { if (!EventLog.SourceExists("LiveSplit")) { EventLog.CreateEventSource("LiveSplit", "Application"); } } catch { } try { FiletypeRegistryHelper.RegisterFileFormats(); } catch (Exception ex) { Log.Error(ex); } }