Example #1
0
 public StartViewModel(IMiracleDaysRepository miracleDaysRepository)
 {
     _miracleDaysRepository = miracleDaysRepository;
     GotoBeginCommand       = new Command(GotoBegin);
     GotoCalendarCommand    = new Command(GotoCalendar);
     UpdateCommand          = new Command(Update);
     AddCommand             = new Command(Add);
     ClearCommand           = new Command(Clear);
 }
Example #2
0
        public App(IMiracleDaysRepository miracleDaysRepository)
        {
            InitializeComponent();

            var startViewModel = new StartViewModel(miracleDaysRepository);

            startViewModel.UpdateCommand.Execute(null);
            var startPage = new StartPage
            {
                BindingContext = startViewModel
            };

            MainPage = startPage;
        }