Пример #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)
 {
 }