/// <summary> /// =ボタンがクリックされた /// </summary> /// <param name="sender">イベントのソース</param> /// <param name="e">イベントデータ</param> private void CalculateButton_Click(object sender, EventArgs e) { switch (state.GetState()) { case ConstDefines.CalcState.Initaial: { state.InputCalculateInitialState(); break; } case ConstDefines.CalcState.WaitOperation: { state.InputCalculateWaitOperationInputState(); break; } case ConstDefines.CalcState.WaitNumInputAfterOperation: { state.InputCalculateWaitNumInputAfterOperationState(); break; } case ConstDefines.CalcState.Calulable: { state.InputCalculateCalculableState(); break; } default: { state.SetState(ConstDefines.CalcState.Initaial); break; } } }