public StatisticsViewController(IStatisticsView view) { _view = view; _view.SetController(this); OptikItDbContext db = new OptikItDbContext(); }
/// <summary> /// See interface docs. /// </summary> /// <param name="view"></param> public void Initialise(IStatisticsView view) { _View = view; _View.ResetCountersClicked += View_ResetCountersClicked; _View.CloseClicked += View_CloseClicked; _View.UpdateCounters(); Factory.Singleton.Resolve <IHeartbeatService>().Singleton.FastTick += HeartbeatService_FastTick; }
/// <summary> /// See interface docs. /// </summary> /// <param name="view"></param> public void Initialise(IStatisticsView view) { _View = view; _View.ResetCountersClicked += View_ResetCountersClicked; _View.CloseClicked += View_CloseClicked; _View.UpdateCounters(); Factory.Singleton.Resolve<IHeartbeatService>().Singleton.FastTick += HeartbeatService_FastTick; }
private void ShowForm(IStatisticsView formToShow) { if (_currentForm != null) { _currentForm.Hide(); } _currentForm = formToShow; _currentForm.SetStatistics(_statistics); _currentForm.Show(); }
public StatisticsPresenter(IStatisticsView window, int userId) { this.userId = userId; win = window; win.cb_Choiced += win_cb_Choiced; model = new StatisticsModel(userId); SetWordStatistics(DateTime.Now.AddDays(-7).Date, DateTime.Now.Date); string[] data = new string[] { "Выучено слов", "Пройдено тестов", "Добавлено слов" }; win.SetComboBoxData(data); win.History_Click += win_History_Click; }
private void AppendView(IStatisticsView view) { if (_currentView?.GetType() != view.GetType()) { _currentView = view; view.NeedItems = async(filter) => { _filter = filter; await Refresh(); }; viewHostControl.Content = view; } }
public StatisticsViewmodel(MainViewmodel mainViewmodel, IStatisticsView statisticsView) { _mainViewmodel = mainViewmodel; this._statisticsView = statisticsView; CurrentExecutingTasks = new ObservableCollection <TaskExecutorWrapper>(); _repository = RepositoryResolver.GetRepository <ICategoriesStatisticsRepository>(); FromDate = DateTime.Now.AddMonths(-1); ToDate = DateTime.Now; RemoveActionIfFaultedCommand = new RelayCommand(RemoveActionIfFaulted); RefreshCommand = new RelayCommand(Refresh); Refresh(null); EditTransactionCommand = new RelayCommand(async(obj) => await EditTransactionAsync((Transaction)obj)); }
public StatisticsPresenter(IStatisticsView inView, PresenterMain inParentPresenter) { _view = inView; _parent = inParentPresenter; // show number of records found/total number of records List <SearchParameter> searchParams = _parent.GetSearchParameters(); FishingRecordRepository repository = FishingRecordRepository.GetInstance(); _recordsFound = SearchService.Find(repository.GetRecords(), searchParams); _view.ShowNumberOfRecordsFound(_recordsFound.Count, repository.Count()); // show available reports _availableReportsDict = new Dictionary <string, Reporter>(); _availableReportsDict.Add("Fish catch", new FishCatchReporter()); _availableReportsDict.Add("Fish profit", new FishSaleReporter()); _view.AvailableReports = _availableReportsDict.Keys.ToArray(); }
public StatisticsPresenter(IStatisticsView view) { this.view = view; this.view.RefreshRequest += RefreshHistogram; }
public StatisticsController(IStatisticsView i_View) { r_StatisticsView = i_View; i_View.SetEventListener(this); }
public StatisticsPresenter(IStatisticsView view, IAzureAPI api) { _api = api; view.GetRepositories += View_GetRepositories; }
public void ViewStatistics(IStatisticsView inForm) { inForm.ShowModaless(); }