Beispiel #1
0
 private void _toggleFieldNoteValue(TekFieldView view, int value, TekMoves Moves)
 {
     if (view != null)
     {
         Moves.PlayNote(view.Row, view.Col, value);
         view.Refresh();
     }
 }
Beispiel #2
0
        public void SetCurrentMode(SelectMode value)
        {
            if (CurrentMode == value)
            {
                return;
            }

            if (_currentFieldView != null)
            {
                switch (CurrentMode)
                {
                case SelectMode.smNone:
                    _currentFieldView.SetSelected(false);
                    _currentFieldView.SetMultiSelected(false);
                    break;

                case SelectMode.smSingle:
                    _currentFieldView.SetSelected(false);
                    break;

                case SelectMode.smMultiple:
                    _currentFieldView.SetMultiSelected(false);
                    break;
                }
            }
            _currentMode = value;
            if (_currentFieldView != null)
            {
                switch (CurrentMode)
                {
                case SelectMode.smNone:
                    _currentFieldView = null;
                    break;

                case SelectMode.smSingle:
                    SelectCurrentField(_currentFieldView);
                    break;

                case SelectMode.smMultiple:
                    _currentFieldView.SetSelected(true);
                    break;
                }
                if (_currentFieldView != null)
                {
                    _currentFieldView.Refresh();
                }
            }
        }