private void But_Save_Click(object sender, EventArgs e)
 {
     ArcadeGameStartAndStopService.MainConfig.ServerCredential.UserName = TexBox_UserName.Text;
     ArcadeGameStartAndStopService.MainConfig.ServerCredential.Password = TexBox_Password.Text;
     JSONServiceConfig.SaveJSONServiceConfig(ArcadeGameStartAndStopService.MainConfig);
     Close();
 }
        private void But_Save_Click(object sender, EventArgs e)
        {
            if (TexBox_MachineGUID.Text.Trim() != "")
            {
                ArcadeGameStartAndStopService.MainConfig.MachineGUID = TexBox_MachineGUID.Text;
            }
            if (TexBox_LocalLogOutput.Text.Trim() != "")
            {
                ArcadeGameStartAndStopService.MainConfig.LocalLogOutput = TexBox_LocalLogOutput.Text;
            }
            if (TexBox_MachineName.Text.Trim() != "")
            {
                ArcadeGameStartAndStopService.MainConfig.MachineName = TexBox_MachineName.Text;
            }
            if (TexBox_MasterServerURL.Text.Trim() != "")
            {
                ArcadeGameStartAndStopService.MainConfig.MasterServerURL = TexBox_MasterServerURL.Text;
            }
            if (TexBox_MasterStarterMasterLoc.Text.Trim() != "")
            {
                ArcadeGameStartAndStopService.MainConfig.MasterStarterMasterLoc = TexBox_MasterStarterMasterLoc.Text;
            }
            if (TexBox_Password.Text.Trim() != "")
            {
                ArcadeGameStartAndStopService.MainConfig.ServerCredential.Password = TexBox_Password.Text;
            }
            if (TexBox_UserName.Text.Trim() != "")
            {
                ArcadeGameStartAndStopService.MainConfig.ServerCredential.UserName = TexBox_UserName.Text;
            }
            if (TexBox_ServerLogOutput.Text.Trim() != "")
            {
                ArcadeGameStartAndStopService.MainConfig.ServerLogOutput = TexBox_ServerLogOutput.Text;
            }
            //if (TexBox_ServerLogOutput.Text.Trim() != "") //depreciated with game selector
            //    Config.DefualtGameGUID = TexBox_DefualtGameGUID.Text;
            ArcadeGameStartAndStopService.MainConfig.StarterMode = GetGameStartModeFromString(LisBox_GameStarterMode.Items[LisBox_GameStarterMode.SelectedIndex].ToString());

            ArcadeGameStartAndStopService.MainConfig.ServerMode = GetServerModeFromString(LisBox_GameStarterMode.Items[LisBox_GameStarterMode.SelectedIndex].ToString());

            ArcadeGameStartAndStopService.MainConfig.CardModeMode = GetCardModeFromString(LisBox_GameStarterMode.Items[LisBox_GameStarterMode.SelectedIndex].ToString());

            Dictionary <string, List <string> > Errors;

            if (!ConfigHelpers.ValidateConfig(ArcadeGameStartAndStopService.MainConfig, out Errors))
            {
                ShowingErrorAlready = true;
                MessageBox.Show(ConfigHelpers.ConvertErrorsToMessage(Errors));
                return;
            }
            ShowingErrorAlready = true;

            ArcadeGameStartAndStopService.Logger.WriteLog("'Arcade Game Start And Stop Service' has changed config.");

            JSONServiceConfig.SaveJSONServiceConfig(ArcadeGameStartAndStopService.MainConfig);
            Close();
        }
 public static void Save(GameServiceConfig Settings)
 {
     JSONServiceConfig.SaveJSONServiceConfig(Settings);
 }