public Dashboard() { InitializeLogger(); InitializeComponent(); manager = new Workers(Workers.GetDefaultConfiguration()); workers = new Dictionary <Guid, IWorker>(); }
/// <summary> /// Starts the background process of the application in case it isn't running already /// </summary> private static void StartBackgroundProcess() { //GetProcessesByName only throws one exception which can occur when the program runs under Windows XP or older var processes = System.Diagnostics.Process.GetProcessesByName("TinyTasksService"); if (processes.Length != 0) { return; } try { var info = new System.Diagnostics.ProcessStartInfo("TinyTasksService.exe", "--file \"" + Workers.GetDefaultConfiguration() + "\""); System.Diagnostics.Process.Start(info); } catch (Exception) { MessageBox.Show(Resources.BackgroundServiceStartupError); } }