using System; using System.Linq; using System.Windows; namespace Dominion.NET_WPF { /// /// Interaction logic for App.xaml /// public partial class App : Application { private void Application_Startup(object sender, StartupEventArgs e) { var param = string.Empty; for (var i = 0; i < e.Args.Count(); i++) { var arg = e.Args.ElementAt(i); switch (arg) { case "-u": param = "Update"; break; case "-U": Properties["Updated"] = true; break; default: if (!string.IsNullOrWhiteSpace(param)) Properties[param] = arg; param = string.Empty; break; } } } } }