Exemple #1
0
        public MainPageViewModel(ITimeSavingsCalculator timeSavingsCalculator)
        {
            Debug.WriteLine($"**** {this.GetType().Name}.{nameof(MainPageViewModel)}:  ctor");

            _timeSavingsCalculator = timeSavingsCalculator;

            FrequencyUnitsOfTime = new ObservableCollection <string>
            {
                "per day", "per week", "per month", "per year"
            };

            UnitsOfTime = new ObservableCollection <string> {
                "days", "weeks", "months", "years"
            };

            SelectedFrequencyTimeUnit    = "per month";
            SelectedTaskLifetimeTimeUnit = "weeks";

            Title = "EfficienSee";
            TimeSavedLabelText      = "By how many minutes could you shorten your task, given some effort to make some part of it automated, or more efficient?";
            TaskFrequencyLabelText  = "How frequently do you it?";
            TaskLifetimeLabelText   = "How long will you keep performing this task?";
            MaxTimeToAllotLabelText = "You can spend this much time before spending more time than you will save:";
        }
Exemple #2
0
        public void TestInit()
        {
            timeSavingsCalculatorSub = Substitute.For <ITimeSavingsCalculator>();

            mainPageViewModel = new MainPageViewModel(timeSavingsCalculatorSub);
        }