Inheritance: StoryTeller.UserInterface.Actions.ActionCommand
Beispiel #1
0
        public void EnableMode(TestMode mode)
        {
            _currentMode.Mode.ApplyChanges();

            _currentMode = _modes[mode.Mode];

            _modes.Each(x => x.Value.Enable(_currentMode));
            _header.Update();
        }
Beispiel #2
0
        public TestPresenter(Test test, ITestView view, TestMode[] modes, ITestHeaderViewModel header)
        {
            _test   = test;
            _view   = view;
            _header = header;

            modes.Each(m => _modes.Add(m.Mode, new ModeCommand(m, this, test, view)));

            _currentMode = _modes[Mode.Preview];
        }
Beispiel #3
0
 public void Enable(ModeCommand active)
 {
     Enabled = ReferenceEquals(this, active) ? false : _mode.IsEnabled(_test);
 }
Beispiel #4
0
 public void SetMode(TestMode mode)
 {
     _currentMode = new ModeCommand(mode, this, _test, _view);
 }
Beispiel #5
0
 // Strictly for Testing
 public void SetMode(Mode mode)
 {
     _currentMode = _modes[mode];
 }
Beispiel #6
0
 public virtual void ChangeModeTo(Mode mode)
 {
     _currentMode = _modes[mode];
     _currentMode.Execute(null);
 }
Beispiel #7
0
 public void Enable(ModeCommand active)
 {
     Enabled = ReferenceEquals(this, active) ? false : _mode.IsEnabled(_test);
 }