Example #1
0
        /// <summary>
        /// Cボタンがクリックされた
        /// </summary>
        /// <param name="sender">イベントのソース</param>
        /// <param name="e">イベントデータ</param>
        private void CButton_Click(object sender, EventArgs e)
        {
            switch (state.GetState())
            {
            case ConstDefines.CalcState.Initaial:
            {
                state.InputCButtonInitialState();
                break;
            }

            case ConstDefines.CalcState.WaitOperation:
            {
                state.InputCButtonWaitOperationInputState();
                break;
            }

            case ConstDefines.CalcState.WaitNumInputAfterOperation:
            {
                state.InputCButtonWaitNumInputAfterOperationState();
                break;
            }

            case ConstDefines.CalcState.Calulable:
            {
                state.InputCButtonCalculableState();
                break;
            }

            default:
            {
                state.SetState(ConstDefines.CalcState.Initaial);
                break;
            }
            }
        }