private void DeviceSelected_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            DeviceChoice deviceChoice = new DeviceChoice();

            deviceChoice.Show();
            Close();
        }
        public static void ResetAllProfiles(MainWindow configurator, string selectedProfiles)
        {
            //create a background worker
            var backgroundReset = new BackgroundWorker();

            backgroundReset.DoWork += (s, ea) => Thread.Sleep(TimeSpan.FromSeconds(0));

            //define work to be done
            backgroundReset.RunWorkerCompleted += (s, ea) =>
            {
                if (selectedProfiles.Contains("Clock"))
                {
                    DefaultClockConfig();
                }

                if (selectedProfiles.Contains("1"))
                {
                    DefaultProfile1Config();
                }

                if (selectedProfiles.Contains("2"))
                {
                    DefaultProfile2Config();
                }

                if (selectedProfiles.Contains("3"))
                {
                    DefaultProfile3Config();
                }

                if (selectedProfiles.Contains("All"))
                {
                    DefaultClockConfig();
                    DefaultProfile1Config();
                    DefaultProfile2Config();
                    DefaultProfile3Config();
                    DefaultDeviceStateConfig();
                    DeviceChoice deviceChoice = new DeviceChoice();
                    deviceChoice.Show();
                    configurator.Close();
                }

                //reload saved values
                configurator.ReloadExt();
                SettingsConfigurator.RestartSDM();
            };

            //start the background worker
            backgroundReset.RunWorkerAsync();
        }
        public MainWindow()
        {
            //show Stream Deck Device choice window
            string choiceMade = SharedSettings.config.Read("choiceMade", "StreamDeck_Device");

            if (choiceMade == "false")
            {
                DeviceChoice deviceChoice = new DeviceChoice();
                deviceChoice.Show();
                Close();
            }

            //make sure only one instance is running
            SharedSettings.CheckForTwins();
            InitializeComponent();

            //load all values from config file
            currentProfile = SharedSettings.config.Read("selectedProfile", "Current_Profile");
            PrepValueDisplay(currentProfile);
        }