Пример #1
0
        public StatisticsViewController(IStatisticsView view)
        {
            _view = view;
            _view.SetController(this);

            OptikItDbContext db = new OptikItDbContext();
        }
Пример #2
0
        /// <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;
        }
Пример #4
0
 private void ShowForm(IStatisticsView formToShow)
 {
     if (_currentForm != null)
     {
         _currentForm.Hide();
     }
     _currentForm = formToShow;
     _currentForm.SetStatistics(_statistics);
     _currentForm.Show();
 }
Пример #5
0
 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;
 }
Пример #6
0
 private void AppendView(IStatisticsView view)
 {
     if (_currentView?.GetType() != view.GetType())
     {
         _currentView   = view;
         view.NeedItems = async(filter) =>
         {
             _filter = filter;
             await Refresh();
         };
         viewHostControl.Content = view;
     }
 }
Пример #7
0
 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));
 }
Пример #8
0
        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();
        }
Пример #9
0
 public StatisticsPresenter(IStatisticsView view)
 {
     this.view = view;
     this.view.RefreshRequest += RefreshHistogram;
 }
Пример #10
0
 public StatisticsController(IStatisticsView i_View)
 {
     r_StatisticsView = i_View;
     i_View.SetEventListener(this);
 }
Пример #11
0
 public StatisticsPresenter(IStatisticsView view, IAzureAPI api)
 {
     _api = api;
     view.GetRepositories += View_GetRepositories;
 }
Пример #12
0
 public void ViewStatistics(IStatisticsView inForm)
 {
     inForm.ShowModaless();
 }