public void btnSaveSettings_Click(object sender, EventArgs e) { //music if (optMOn.Checked == true) { C_Types.Options.Music = (byte)1; // start music playing C_Sound.PlayMusic(C_Maps.Map.Music.Trim()); } else { C_Types.Options.Music = (byte)0; // stop music playing C_Sound.StopMusic(); C_Sound.CurMusic = ""; } //sound if (optSOn.Checked == true) { C_Types.Options.Sound = (byte)1; } else { C_Types.Options.Sound = (byte)0; C_Sound.StopSound(); } //screensize C_Types.Options.ScreenSize = System.Convert.ToByte(cmbScreenSize.SelectedIndex); if (chkHighEnd.Checked) { C_Types.Options.HighEnd = (byte)1; } else { C_Types.Options.HighEnd = (byte)0; } if (chkNpcBars.Checked) { C_Types.Options.ShowNpcBar = (byte)1; } else { C_Types.Options.ShowNpcBar = (byte)0; } // save to config.ini C_DataBase.SaveOptions(); //reload options C_DataBase.LoadOptions(); C_General.RePositionGui(); this.Visible = false; }
/// <summary> /// Handles SaveIP button press. /// </summary> public void BtnSaveIP_Click(object sender, EventArgs e) { C_Types.Options.Ip = System.Convert.ToString(txtIP.Text); C_Types.Options.Port = System.Convert.ToInt32(txtPort.Text); pnlIPConfig.Visible = false; C_DataBase.SaveOptions(); }