public TimerPageModel(
            ITrackedPeriodService trackedPeriodService,
            IAccountService accountService,
            IImageService imageService,
            ILocationService locationService,
            IPhotoCapturingService photoCapturingService,
            INotificationService notificationService,
            ViewAllPageModel viewAllPageModel)
        {
            this.trackedPeriodService = trackedPeriodService;
            this.accountService       = accountService;
            this.imageService         = imageService;

            this.locationService       = locationService;
            this.photoCapturingService = photoCapturingService;
            this.notificationService   = notificationService;

            this.viewAllPageModel = viewAllPageModel;

            TimerButtonViewModel       = new ButtonViewModel("start timer", OnTimerButtonPressed);
            AttachPhotoButtonViewModel = new ButtonViewModel("attach photo", OnAttachPhotoButtonClicked, isEnabled: false);

            generalTimer = new Timer {
                Interval = 1000
            };
            generalTimer.Elapsed += (sender, args) => RunningTotal += TimeSpan.FromSeconds(1);

            notificationTimer = new Timer {
                Interval = TimeSpan.FromMinutes(1).TotalMilliseconds
            };
            notificationTimer.Elapsed += async(sender, args) => await OnNotificationTimerElapsed();
        }
 public TrackedPeriodService(
     SqliteTrackedPeriodService sqliteTrackedPeriodService,
     WebApiTrackedPeriodService webApiTrackedPeriodService)
 {
     this.sqliteTrackedPeriodService = sqliteTrackedPeriodService;
     this.webApiTrackedPeriodService = webApiTrackedPeriodService;
 }
Ejemplo n.º 3
0
 public ViewAllPageModel(
     ITrackedPeriodService trackedPeriodService,
     IAccountService accountService)
 {
     this.trackedPeriodService = trackedPeriodService;
     this.accountService       = accountService;
     AllForCurrentUser         = new ObservableCollection <TrackedPeriod>();
 }
        public ProfilePageModel(
            IAccountService accountService,
            ITrackedPeriodService trackedPeriodService,
            INavigationService navigationService,
            ViewAllPageModel viewAllPageModel,
            TimerPageModel timerPageModel)
        {
            this.accountService       = accountService;
            this.trackedPeriodService = trackedPeriodService;
            this.navigationService    = navigationService;
            this.viewAllPageModel     = viewAllPageModel;
            this.timerPageModel       = timerPageModel;

            UsernameEntryViewModel = new LoginEntryViewModel("username", isPassword: false);
            PasswordEntryViewModel = new LoginEntryViewModel("password", isPassword: true);

            UpdatePasswordButtonViewModel = new ButtonViewModel("update password", OnUpdatePasswordButtonPressed);
            ClearUserDataButtonViewModel  = new ButtonViewModel("clear data", OnClearDataButtonPressed);
            LogOutButtonViewModel         = new ButtonViewModel("log out", OnLogOutButtonPressed);
        }
Ejemplo n.º 5
0
 public TimeTrackingController(ITrackedPeriodService trackedPeriodService)
 => this.trackedPeriodService = trackedPeriodService;