using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Valg.EVA.Skanning.EncryptedConnectionStringConfiguration;
using Environment = System.Environment;

namespace EncryptedConnectionStringConfiguration
{
    
    
    
    public partial class App : Application
    {
        private void App_Startup(object sender, StartupEventArgs e)
        {
            if (e.Args.Length > 0 && e.Args[0].Equals("/setup", StringComparison.CurrentCultureIgnoreCase))
            {
                var processes = System.Diagnostics.Process.GetProcesses();
                if (processes.Any(p => p.MainWindowTitle.Equals("EVA Skanning liten utgave Setup", StringComparison.InvariantCultureIgnoreCase)))
                {
                    Environment.Exit(0);
                }
            }

        }
    }
}

