예제 #1
0
        }  //Used only for saving

        public System.Collections.ArrayList getAllUtilityApplications()
        {
            System.Collections.ArrayList returnColl = new System.Collections.ArrayList();
            System.Collections.ArrayList addColl    = next.getAllUtilityApplications();
            returnColl.Add("line");
            SortedDictionary <string, StringCollection> .KeyCollection keyColl = utilityApplications.Keys;
            foreach (string key in keyColl)
            {
                StringCollection valColl = utilityApplications[key];
                returnColl.Add("game");
                returnColl.Add(key);
                foreach (string val in valColl)
                {
                    returnColl.Add(val);
                }
            }
            returnColl.AddRange(addColl);
            return(returnColl);
        }
예제 #2
0
        /// <summary>
        /// Saves all Settings.
        /// </summary>
        private void applySettings()
        {
            lblInvalid.Visible     = false;
            lblInvalidPort.Visible = false;
            main.obsPath           = Path.GetFullPath(tbxObsPath.getText());
            main.removeObsLnk();
            main.createObsLnk();
            main.createObsProcess();
            btnOpenConnect.Enabled = true;

            Properties.Settings.Default.savedSceneGames        = controlLineList.getAllSceneGames();
            Properties.Settings.Default.savedOBSPath           = main.obsPath;
            Properties.Settings.Default.savedUtilityProcesses  = controlLineList.getAllUtilityApplications();
            Properties.Settings.Default.savedNotificationSound = cbxNotificationSound.Checked;
            Properties.Settings.Default.savedPort     = int.Parse(tbxPort.getText());
            Properties.Settings.Default.savedPassword = tbxPassword.getText();

            if (cbxSavePassword.Checked)
            {
                Properties.Settings.Default.savedPassword = tbxPassword.getText();
            }
            else
            {
                Properties.Settings.Default.savedPassword = "";
            }

            Properties.Settings.Default.Save();

            if (cbxStartOnBoot.Checked)
            {
                removeScheduleTask();
                createScheduleTask();
            }
            else
            {
                removeScheduleTask();
            }

            btnOK.Enabled    = false;
            btnApply.Enabled = false;
        }