예제 #1
0
        public void Activate(IScreenObjectRegistry screenObjects)
        {
            _screen.BindTo((Project)_context.Project);

            screenObjects.Action("Save").Bind(ModifierKeys.Control, Key.S).To(Save)
            .Icon = Icon.Save;
        }
예제 #2
0
 public void Activate(IScreenObjectRegistry screenObjects)
 {
     _view.ClearAll();
     _drivers.ClearAll();
     foreach (Test test in _subject.GetAllTests())
     {
         AddTest(test);
     }
 }
예제 #3
0
        public void Activate(IScreenObjectRegistry screenObjects)
        {
            screenObjects.Action("Save Filters and Actions").Bind(ModifierKeys.Control, Key.S).To(Save).Icon = Icon.Save;
            screenObjects.Action("Refresh Usages").Bind(ModifierKeys.Control, Key.F5).To(RefreshUsages).Icon = Icon.Refresh;

            if (!_hasUpdatedView)
            {
                BuildView();
            }
        }
예제 #4
0
        public void Activate(IScreenObjectRegistry screenObjects)
        {
            var collection = new ObservableCollection <T>();

            _view.As <FrameworkElement>().DataContext = collection;
            var q = from r in _view.As <ModelSearchView>().RefreshList
                    from d in new Repository <T>().ObservableModels.SkipUntil(_view.As <ModelSearchView>().RefreshList.Skip(1))
                    select d;

            _view.As <ModelSearchView>().RefreshList.Subscribe(_ => collection.Clear());
            q.Subscribe(v => collection.Add(v));
        }
예제 #5
0
        public void Activate(IScreenObjectRegistry screenObjects)
        {
            screenObjects.Action("Run").Bind(ModifierKeys.Control, Key.D1)
            .To(_controller.RunCommand).Icon = Icon.Run;

            screenObjects.Action("Cancel").Bind(ModifierKeys.Control, Key.D2)
            .To(_controller.CancelCommand).Icon = Icon.Stop;

            screenObjects.Action("Save").Bind(ModifierKeys.Control, Key.S)
            .To(_controller.SaveCommand).Icon = Icon.Save;

            screenObjects.Action("Preview").Bind(ModifierKeys.Control | ModifierKeys.Shift, Key.P).To(
                _presenter.Modes[Mode.Preview]).Icon = Icon.Unknown;

            screenObjects.Action("Results").Bind(ModifierKeys.Control | ModifierKeys.Shift, Key.R).To(
                _presenter.Modes[Mode.Results]).Icon = Icon.Unknown;

            screenObjects.Action("Xml").Bind(ModifierKeys.Control | ModifierKeys.Shift, Key.X).To(
                _presenter.Modes[Mode.Xml]).
            Icon = Icon.Unknown;

            screenObjects.Action("Edit").Bind(ModifierKeys.Control | ModifierKeys.Shift, Key.E).To(
                _presenter.Modes[Mode.Edit])
            .Icon = Icon.Unknown;

            screenObjects.Action("xUnit Harness").Bind(ModifierKeys.Control, Key.H).PublishEvent(
                () => new TestHarnessFileRequested(_test)).Icon = Icon.Unknown;

            screenObjects.Action("Undo").Bind(ModifierKeys.Control, Key.Z).To(_stateManager.Undo).Icon = Icon.Unknown;
            screenObjects.Action("Redo").Bind(ModifierKeys.Control, Key.Y).To(_stateManager.Redo).Icon = Icon.Unknown;

            screenObjects.Action("Go to Top Node").Bind(ModifierKeys.Control, Key.T).To(() =>
            {
                _outline.FocusOnTop();
            }).OnlyKeyboardShortcut();

            // TODO -- replace with the test outline
            screenObjects.PlaceInExplorerPane(_outline.View, "Outline");

            _presenter.Start();
            _outline.Refresh();
        }
예제 #6
0
        public void Activate(IScreenObjectRegistry screenObjects)
        {
            _view.Presenter = this;

            if (_queue.IsExecuting())
            {
                _view.DisplayCurrentTest();
            }
            else
            {
                _view.HideCurrentTest();
            }

            _queue.GetAllQueuedTests().Each(queueTest);
            determineIfAnyTestsAreQueued();


            screenObjects.Action("Clear All").Bind(ModifierKeys.Control | ModifierKeys.Shift, Key.Q).To(ClearQueue).Icon
                = Icon.Stop;
        }
예제 #7
0
 public void Activate(IScreenObjectRegistry screenObjects)
 {
     screenObjects.Action("Save").Bind(ModifierKeys.Control, Key.S).To(_save);
     screenObjects.Action("Cancel").Bind(Key.Escape).To(_cancel);
 }
예제 #8
0
 public ScreenConductor(IScreenCollection screenCollection, IScreenFactory screenFactory, IScreenObjectRegistry screenObjectRegistry)
 {
     _screens = screenCollection;
     _screenFactory = screenFactory;
     _screenObjectRegistry = screenObjectRegistry;
 }
예제 #9
0
 public override void Given()
 {
     screenCollection     = Moq.Mock <IScreenCollection>();
     screenObjectRegistry = Moq.Mock <IScreenObjectRegistry>();
     screenFactory        = Moq.Mock <IScreenFactory>();
 }
예제 #10
0
 public ScreenConductor(IScreenCollection screenCollection, IScreenFactory screenFactory, IScreenObjectRegistry screenObjectRegistry)
 {
     _screens              = screenCollection;
     _screenFactory        = screenFactory;
     _screenObjectRegistry = screenObjectRegistry;
 }
예제 #11
0
 public SystemActions(IScreenObjectRegistry screenObjects)
 {
     _screenObjects = screenObjects;
 }
 protected override void beforeEach()
 {
     screenObjectRegistry = Services.Container.GetInstance <ScreenObjectRegistry>();
     ClassUnderTest.Activate(screenObjectRegistry);
 }
예제 #13
0
 public ShellService(IScreenObjectRegistry registry, ICommandBar commands, IOptionsMenu options)
 {
     _registry = registry;
     _commands = commands;
     _options  = options;
 }
예제 #14
0
 public void Activate(IScreenObjectRegistry screenObjects)
 {
     screenObjects.Action("Save").Bind(ModifierKeys.Control, Key.S).To(_save);
     screenObjects.Action("Cancel").Bind(Key.Escape).To(_cancel);
 }
예제 #15
0
 public ShellService(IScreenObjectRegistry registry, ICommandBar commands, IOptionsMenu options)
 {
     _registry = registry;
     _commands = commands;
     _options = options;
 }
 public void Activate(IScreenObjectRegistry screenObjects)
 {
     throw new NotImplementedException();
 }
 public void Activate(IScreenObjectRegistry screenObjects)
 {
 }
예제 #18
0
 public SystemActions(IScreenObjectRegistry screenObjects)
 {
     _screenObjects = screenObjects;
 }
예제 #19
0
 public void Activate(IScreenObjectRegistry screenObjects)
 {
     throw new NotImplementedException();
 }
예제 #20
0
 public void Activate(IScreenObjectRegistry screenObjects)
 {
 }