public TurnsRatioTestInteractor(ITransaction transaction, ITestPresenter presenter)
 {
     _transaction  = transaction;
     _presenter    = presenter;
     _startCommand = TestingCore.CommandFactory.Scope.Factory.CreateStartTestCommand();
     _stopCommand  = TestingCore.CommandFactory.Scope.Factory.CreatStopTestCommand();
 }
예제 #2
0
        public void TestPresenterFactory()
        {
            ITestPresenter presenter = PresenterFactory.Create().GetPresenter <ITestPresenter>(new TestView());

            Assert.IsNotNull(presenter);

            ITestGenericPresentor <Entities.Address> presenter2 = PresenterFactory.Create().GetPresenter <ITestGenericPresentor <Entities.Address> >(new TestView());

            Assert.IsNotNull(presenter2);
        }
예제 #3
0
        public TestScreen(ITestPresenter presenter, ITestView view, Test test, ITestStateManager stateManager, ITestScreenCloser closer, IEditTestController controller, IOutlineController outline)
        {
            _presenter    = presenter;
            _view         = view;
            _test         = test;
            _stateManager = stateManager;
            _closer       = closer;
            _controller   = controller;
            _outline      = outline;

            _stateManager.RegisterListener(_presenter);
        }
예제 #4
0
        // Конструктор класса
        public TestUserControl(ITestPresenter testPresenter)
        {
            _testPresenter = testPresenter;
            InitializeComponent();

            // Группировки кнопок с вариантами ответов
            _answerButtons = new List <RadioButton>()
            {
                FirstAnswer,
                SecondAnswer,
                ThirdAnswer,
                FourAnswer
            };
        }
예제 #5
0
        public EditTestController(Test test, ITestService service, ITestStateManager stateManager, ITestPresenter presenter, IMessageCreator messageBox)
        {
            _test         = test;
            _service      = service;
            _stateManager = stateManager;
            _presenter    = presenter;
            _messageBox   = messageBox;

            _runCommand = new ActionCommand(() =>
            {
                if (SaveChanges())
                {
                    _service.QueueTest(_test);
                }
            });

            _saveCommand   = new ActionCommand(() => SaveChanges());
            _cancelCommand = new ActionCommand(Cancel);
        }
예제 #6
0
 public void AttachPresenter(ITestPresenter presenter)
 {
     _presenter = presenter;
 }
예제 #7
0
 public ITestInteractor MakeTurnsRatioTestInteractor(ITransaction transaction, ITestPresenter presenter)
 {
     return(new TurnsRatioTestInteractor(transaction, presenter));
 }
예제 #8
0
 private void FormInitialize()
 {
     testPI = new TestPresenter(this, this);
 }