//初期化
        public Form1()
        {
            InitializeComponent();

            //各comboBox初期値設定
            element.SelectedIndex     = 0;
            commandType.SelectedIndex = 0;
            hpUpMath1.SelectedIndex   = 0;
            hpUpMath2.SelectedIndex   = 0;

            //comboBox,textBoxの参照を渡して、値を得られるようにする
            var textBoxes = new TextBox[] {
                state1, state2, state3, state4, state5, state6,
                state7, state8
            };
            var textBoxes2 = new TextBox[] {
                _state1, _state2, _state3, _state4, _state5, _state6,
                _state7, _state8
            };

            charaStates  = new CharaStates(textBoxes);
            charaStates2 = new CharaStates(textBoxes2, element);
            commandData  = new CommandData(commandType, scale, hpUpMath1, hpUpMath2);
            mathControl  = new MathControl(charaStates, charaStates2, commandData);
        }
Exemple #2
0
 //コンストラクタ
 public MathControl(CharaStates _charaS1, CharaStates _charaS2, CommandData _commandD)
 {
     charaS1  = _charaS1;
     charaS2  = _charaS2;
     commandD = _commandD;
 }