public void tasks(string args) { if (!args.Contains("overrideinstances")) { if (Process.GetProcessesByName(Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location)).Count() > 1) { msgBox.Show("An instance of kOFRRepoApp.exe is already running!", "App Already Running"); Environment.Exit(0); } } httpGit.setupClients(); Styles.getStyles(); new AppLibaryWindow(args).ShowDialog(); }
private void background_Loaded(object sender, RoutedEventArgs e) { appsFrame.Visibility = Visibility.Visible; appsFrame.Content = alp; appsFrame.Visibility = Visibility.Hidden; winAero.Interval = 10; winAero.Elapsed += checkForAeroFC; winAero.Start(); themeChange.Interval = 500; themeChange.Elapsed += (se, ev) => { if (Styles.checkForChange()) { Dispatcher.Invoke(() => { Styles.getStyles(); setStyles(); appsFrame.Content = new AppLibaryPage(); if (appsFrame.Visibility == Visibility.Visible) { libraryGrid_MouseDown(null, null); } }); } }; themeChange.Start(); setupNotifyIcon(); if (startupArgs.Contains("hide")) { hideWindow(); } else { Activate(); } foreach (string appToRun in startupArgs) { if (appToRun.Contains("runapp")) { runApp(appToRun); } } }