public TestController(ITestView view) { _view = view; _td = new TestDispatcher(); _td.TestStarted += _td_TestStarted; _td.TestCompleted += _td_TestCompleted; _td.StepStarted += _td_StepStarted; _td.StepCompleted += _td_StepCompleted; _td.RequestSent += _td_RequestSent; _td.ResponseReceived += _td_ResponseReceived; _td.OnException += _td_OnException; _td.StepEvent += _td_StepEvent; _td.TestEvent += _td_TestEvent; _td.TestSuiteCompleted += new Action <TestSuiteParameters, bool>(_td_TestSuiteCompleted); string address = System.Configuration.ConfigurationManager.AppSettings["DutManagementAddress"]; System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding(); System.ServiceModel.EndpointAddress endpointAddress = new System.ServiceModel.EndpointAddress(address); _dutClient = new AutomatedTesting.DutManagement.DutManagementService.TestSoapClient(binding, endpointAddress); }
private void EnterPasswordView_CheckPasswordEvent(object arg1, EventArgs arg2) { if (enterPasswordView.Password == model.LoadedTest.Password) { enterPasswordView.Close(); testView = new TestView(CloseApplicationEvent, TestView_LoadQuestionEvent, TestView_ChangeAnswerEvent, TestView_ShowResultEvent); model.UserAnswers = new List <UserAnswer>(); for (int i = 0; i < model.LoadedTest.Questions.Count; i++) { model.UserAnswers.Add(new UserAnswer()); } testView.QuestionsNumber = model.LoadedTest.Questions.Count; testView.loadQuestion(model.LoadedTest.Questions[0], model.UserAnswers[0]); testView.Minute = model.LoadedTest.Time; informationsView.Hide(); testView.Start(); } else { MessageBox.Show("Wrong password"); enterPasswordView.clearPassword(); } }
public TestPresenter(ITestView testView) { this.testView = testView; testModel = new TestModel(); testView.SearchClick += LoadSearchResultGrid; testView.ClearClick += LoadAllTestGrids; testView.LoadForm += LoadAllTestGrids; }
public Services(IAcceptsOneControl viewFrame) { EventBus = new SimpleEventBus(); IPresenterMapper presenterMapper = new PresenterMapper(this); PlaceController = new PlaceController(EventBus, presenterMapper, viewFrame); TestView = new TestView(); }
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]; }
public ModeCommand(TestMode mode, TestPresenter presenter, Test test, ITestView view) : base(() => { presenter.EnableMode(mode); mode.Refresh(); view.PlaceInMainPane(mode.ContentView); }) { _test = test; _mode = mode; }
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); }
public TestPresenter(ITestView win, int userId, TestsModel test) { window = win; model = test; this.userId = userId; border = new BorderPresenter(win); window.SetAllQuestions(model.Questions); count = 0; SetData(); answers = new Dictionary <int, string>(); window.Border_MouseLeftButtonDown += window_Border_MouseLeftButtonDown; window.NextBorder_MouseLeftButtonDown += window_NextBorder_MouseLeftButtonDown; }
/// <summary> /// Attach the model to the view. /// </summary> /// <param name="model">The model object</param> /// <param name="view">The view used</param> /// <param name="explorerPresenter">The explorer presenter</param> public void Attach(object model, object view, ExplorerPresenter explorerPresenter) { this.view = view as ITestView; this.tests = model as Tests; this.explorerPresenter = explorerPresenter; this.dataStore = Apsim.Find(this.tests, typeof(DataStore)) as DataStore; this.view.Editor.IntelliSenseChars = " :"; this.view.Editor.ContextItemsNeeded += this.OnContextItemsNeeded; this.view.TableNameChanged += this.OnTableNameChanged; this.PopulateView(); this.explorerPresenter.CommandHistory.ModelChanged += this.OnModelChanged; }
public TestPresenter(ITestView view) { this.view = view; view.Load += View_Load; }
public MainPresenter(ITestView view) { this.view = view; this.view.Presenter = this; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; }
public TestPresenter(ITestView view) { _view.OnSomeEvent += new EventHandler(_view_OnSomeEvent); }
public TestPresenter(ITestView view) { View = view; }
public TestController( ITestView view ) : base(view) { }