public static void Main(string[] args) { Thread.Sleep(15 * 1000); //Initialize everything Log.FilePath = (Environment.ExpandEnvironmentVariables("%userprofile%") + @"\fog_user.log"); AppDomain.CurrentDomain.UnhandledException += Log.UnhandledException; Eager.Initalize(); Log.Entry(LogName, "Initializing"); if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\updating.info")) { Log.Entry(LogName, "Update.info found, exiting program"); Power.SpawnUpdateWaiter(Assembly.GetExecutingAssembly().Location); Environment.Exit(0); } _fogService = new FOGUserService(); _fogService.Start(); if (RegistryHandler.GetSystemSetting("Tray").Equals("1")) { StartTray(); } }
public static void Main(string[] args) { Thread.Sleep(15*1000); //Initialize everything Log.FilePath = (Environment.ExpandEnvironmentVariables("%userprofile%") + @"\fog_user.log"); AppDomain.CurrentDomain.UnhandledException += Log.UnhandledException; Eager.Initalize(); Log.Entry(LogName, "Initializing"); if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\updating.info")) { Log.Entry(LogName, "Update.info found, exiting program"); Power.SpawnUpdateWaiter(Assembly.GetExecutingAssembly().Location); Environment.Exit(0); } _fogService = new FOGUserService(); _fogService.Start(); if (RegistryHandler.GetSystemSetting("Tray").Equals("1")) StartTray(); }
public static void Main(string[] args) { Log.Output = Log.Mode.Quiet; Log.FilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".fog_user.log"); Log.Output = Log.Mode.File; AppDomain.CurrentDomain.UnhandledException += Log.UnhandledException; Eager.Initalize(); if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory + "updating.info"))) { Log.Entry(LogName, "Update.info found, exiting program"); UpdateWaiterHelper.SpawnUpdateWaiter(Settings.Location); Environment.Exit(0); } _fogService = new FOGUserService(); _fogService.Start(); if (Settings.Get("Tray").Equals("1")) { StartTray(); } }
//Called when the service starts protected override void OnStart(string[] args) { Log.Entry("Controller", "Start"); _fogService.Start(); }
//Called when the service starts protected override void OnStart(string[] args) { _fogService.Start(); }