Example #1
0
        private void frmConfiguration_Load(object eventSender, EventArgs eventArgs)
        {
            // ダイアログを初期化

            // メッセージスピード
            cboMessageSpeed.Items.Add("手動送り");
            cboMessageSpeed.Items.Add("低速");
            cboMessageSpeed.Items.Add("普通");
            cboMessageSpeed.Items.Add("高速");
            cboMessageSpeed.Items.Add("超高速");
            cboMessageSpeed.Items.Add("神の領域");
            switch (GUI.MessageWait)
            {
            case 0:
            {
                cboMessageSpeed.Text = "神の領域";
                break;
            }

            case 200:
            {
                cboMessageSpeed.Text = "超高速";
                break;
            }

            case 400:
            {
                cboMessageSpeed.Text = "高速";
                break;
            }

            case 700:
            {
                cboMessageSpeed.Text = "普通";
                break;
            }

            case 1000:
            {
                cboMessageSpeed.Text = "低速";
                break;
            }

            case 10000000:
            {
                cboMessageSpeed.Text = "手動送り";
                break;
            }
            }

            // 戦闘アニメ表示
            if (SRC.BattleAnimation)
            {
                chkBattleAnimation.CheckState = CheckState.Checked;
            }
            else
            {
                chkBattleAnimation.CheckState = CheckState.Unchecked;
            }

            bool localFileExists()
            {
                string argfname = SRC.AppPath + @"Lib\汎用戦闘アニメ\include.eve"; var ret = GeneralLib.FileExists(ref argfname); return(ret);
            }

            if (!localFileExists())
            {
                chkBattleAnimation.CheckState = CheckState.Indeterminate; // 無効
            }

            // 拡張戦闘アニメ表示
            if (SRC.ExtendedAnimation)
            {
                chkExtendedAnimation.CheckState = CheckState.Checked;
            }
            else
            {
                chkExtendedAnimation.CheckState = CheckState.Unchecked;
            }

            if ((int)chkBattleAnimation.CheckState == 1)
            {
                chkExtendedAnimation.Enabled = true;
            }
            else
            {
                chkExtendedAnimation.Enabled = false;
            }

            // 武器準備アニメ表示
            if (SRC.WeaponAnimation)
            {
                chkWeaponAnimation.CheckState = CheckState.Checked;
            }
            else
            {
                chkWeaponAnimation.CheckState = CheckState.Unchecked;
            }

            if ((int)chkBattleAnimation.CheckState == 1)
            {
                chkWeaponAnimation.Enabled = true;
            }
            else
            {
                chkWeaponAnimation.Enabled = false;
            }

            // 移動アニメ表示
            if (SRC.MoveAnimation)
            {
                chkMoveAnimation.CheckState = CheckState.Checked;
            }
            else
            {
                chkMoveAnimation.CheckState = CheckState.Unchecked;
            }

            // スペシャルパワーアニメ表示
            if (SRC.SpecialPowerAnimation)
            {
                chkSpecialPowerAnimation.CheckState = CheckState.Checked;
            }
            else
            {
                chkSpecialPowerAnimation.CheckState = CheckState.Unchecked;
            }

            // マウスカーソルの自動移動
            if (SRC.AutoMoveCursor)
            {
                chkAutoMoveCursor.CheckState = CheckState.Checked;
            }
            else
            {
                chkAutoMoveCursor.CheckState = CheckState.Unchecked;
            }

            // マス目の表示
            if (SRC.ShowSquareLine)
            {
                chkShowSquareLine.CheckState = CheckState.Checked;
            }
            else
            {
                chkShowSquareLine.CheckState = CheckState.Unchecked;
            }

            // 味方フェイズ開始時のターン表示
            string argini_section = "Option";
            string argini_entry   = "Turn";

            if (Strings.LCase(GeneralLib.ReadIni(ref argini_section, ref argini_entry)) == "on")
            {
                chkShowTurn.CheckState = CheckState.Checked;
            }
            else
            {
                chkShowTurn.CheckState = CheckState.Unchecked;
            }

            // 敵フェイズ中にBGMを変更しない
            if (SRC.KeepEnemyBGM)
            {
                chkKeepEnemyBGM.CheckState = CheckState.Checked;
            }
            else
            {
                chkKeepEnemyBGM.CheckState = CheckState.Unchecked;
            }

            // MIDI演奏にDirectMusicを使用する
            string argini_section1 = "Option";
            string argini_entry1   = "UseDirectMusic";

            if (Strings.LCase(GeneralLib.ReadIni(ref argini_section1, ref argini_entry1)) == "on")
            {
                chkUseDirectMusic.CheckState = CheckState.Checked;
            }
            else
            {
                chkUseDirectMusic.CheckState = CheckState.Unchecked;
            }

            // MIDI音源リセットの種類
            cboMidiReset.Items.Add("None");
            cboMidiReset.Items.Add("GM");
            cboMidiReset.Items.Add("GS");
            cboMidiReset.Items.Add("XG");
            cboMidiReset.Text = SRC.MidiResetType;

            // MP3音量
            SavedMP3Volume    = Sound.MP3Volume;
            txtMP3Volume.Text = Microsoft.VisualBasic.Compatibility.VB6.Support.Format(Sound.MP3Volume);
        }