Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        public void FrmMainGame_Load(object sender, EventArgs e)
        {
            C_General.RePositionGui();

            FrmAdmin.Default.Visible = false;
        }