예제 #1
0
    private async void ButtonShowSolutionOnClick()
    {
        UIWindowMessage window = await UIWindowManager.Instance.GetWindow(SystemDefine.UI_WINDOW_NAME_MESSAGE) as UIWindowMessage;

        UIWindowMessage.MessageCmd cmd = new UIWindowMessage.MessageCmd();
        cmd.Type      = UIWindowMessage.MessageType.YesNo;
        cmd.Title     = "Are you sure to show all solutions ?";
        cmd.ActionYes = async() => {
            UIWindowManager.Instance.CloseWindow(SystemDefine.UI_WINDOW_NAME_MESSAGE).DoNotAwait();
            if (_sData.IsSolvable())
            {
                _sData.FillAllSolution();

                _selectingInput = null;

                Refresh();
            }
        };
        cmd.ActionNo = () => {
            UIWindowManager.Instance.CloseWindow(SystemDefine.UI_WINDOW_NAME_MESSAGE).DoNotAwait();
        };

        window.SetInfo(cmd);
        window.Show(true, false).DoNotAwait();
    }
예제 #2
0
    public void ButtonInputOnClick(UISudokuInput input)
    {
        if (!_isQuizGenerated)
        {
            return;
        }

        if (!_isResolving)
        {
            return;
        }

        if (input == null)
        {
            return;
        }

        if (_selectingInput == input)
        {
            _selectingInput = null;
        }
        else
        {
            _selectingInput = input;
        }

        Refresh();
    }
예제 #3
0
    private void InputOnClick(UISudokuInput uiInput)
    {
        if (uiInput == null)
        {
            return;
        }

        if (_inputOnClickAction == null)
        {
            return;
        }

        _inputOnClickAction(uiInput);
    }
예제 #4
0
    private void ResetData()
    {
        // Sudoku data
        ClearSudokuData();

        // Selected input
        _selectingInput = null;

        // Undo
        ClearUndoData();

        // Log
        ClearLogData();
    }
예제 #5
0
    private void ResetData()
    {
        // Sudoku data
        ClearSudokuData();

        // Selected input
        _selectingInput = null;

        //// Undo
        //ClearUndoData();
        //RefreshUndoButton();

        // Timer
        _timer = 0;
        CancelInvoke("RefreshTimer");
    }
예제 #6
0
    public void ButtonInputOnClick(UISudokuInput input)
    {
        if (input == null)
        {
            return;
        }

        if (_selectingInput == input)
        {
            _selectingInput = null;
        }
        else
        {
            _selectingInput = input;
        }

        Refresh();
    }