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

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

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

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

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