using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows; namespace Tango.DispenserAnalyzer.UI { /// /// Interaction logic for App.xaml /// public partial class App : Application { private void Application_Startup(object sender, StartupEventArgs e) { MainWindow wnd = new MainWindow(); string[] args = null; if (AppDomain.CurrentDomain.SetupInformation.ActivationArguments != null) { string[] inputArgs = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData; if (inputArgs != null && inputArgs.Length > 0) { char[] spearator = { ','}; args = inputArgs[0].Split(spearator); } } else if (e.Args.Length > 0) { char[] spearator = { ',' }; args = e.Args[0].Split(spearator); } if(args != null && args.Length > 0) { //MessageBox.Show("Before generate" + String.Join(" ", args)); wnd.GenerateResultsInBackground(args); } else { wnd.Show(); } } } }