public ExersicePopup(NewTrainingPage newTrainingPage, NewTrainingViewModel newTrainingViewModel) { InitializeComponent(); _newTrainingPage = newTrainingPage; _newTrainingViewModel = newTrainingViewModel; BindingContext = _vm = new ExercisePopupViewModel(this, _newTrainingViewModel); }
public TimerPopup(NewTrainingPage newTrainingPage, NewTrainingViewModel newTrainingViewModel, int timetoelapse) { InitializeComponent(); _timeToElapse = timetoelapse; _newTrainingViewModel = newTrainingViewModel; BindingContext = _vm = new TimerPopupViewModel(this, _newTrainingViewModel, timetoelapse); }
public void CanSearchTraining() { TrainingListPage.GoTo(); NewTrainingPage.GoTo(); NewTrainingPage.CreateTraining("CanSearchTraining Test").WithDate("28.08.2016").Publish(); TrainingListPage.SearchForTraining("CanSearchTraining Test"); TrainingListPage.FindAndOpenTraining("CanSearchTraining Test").WithDate("28.08.2016").Open(); Assert.AreEqual(TrainingDetailsPage.TrainingName, "CanSearchTraining Test", "Title did not match"); Assert.AreEqual(TrainingDetailsPage.TrainingDate, "2016-08-28", "Date did not match"); //cleanup TrainingListPage.GoTo(); TrainingListPage.FindAndDeleteTraining("CanSearchTraining Test").WithDate("28.08.2016").Delete(); }
public void CanCreateNewTraining() { TrainingListPage.GoTo(); NewTrainingPage.GoTo(); NewTrainingPage.CreateTraining("Nowy trening").WithDate("11.08.2016").Publish(); TrainingListPage.GoTo(); TrainingListPage.FindAndOpenTraining("Nowy trening").WithDate("11.08.2016").Open(); Assert.AreEqual(TrainingDetailsPage.TrainingName, "Nowy trening", "Title did not match"); Assert.AreEqual(TrainingDetailsPage.TrainingDate, "2016-08-11", "Date did not match"); //cleanup TrainingListPage.GoTo(); TrainingListPage.FindAndDeleteTraining("Nowy trening").WithDate("11.08.2016").Delete(); }
public NewTrainingViewModel(NewTrainingPage newTrainingPage) { _newTrainingPage = newTrainingPage; SetStartValues(); AddClickCommand = new Command(AddClickCommandImpl); AcceptClickCommand = new Command(AcceptClickCommandImpl); btnSub1ClickCommand = new Command(btnSub1ClickCommandImpl); btnAdd1ClickCommand = new Command(btnAdd1ClickCommandImpl); btnSub2ClickCommand = new Command(btnSub2ClickCommandImpl); btnAdd2ClickCommand = new Command(btnAdd2ClickCommandImpl); btnSub3ClickCommand = new Command(btnSub3ClickCommandImpl); btnAdd3ClickCommand = new Command(btnAdd3ClickCommandImpl); }
public NewTrainingViewModel(NewTrainingPage newTrainingPage, List <List <Exercise> > exercises) { _newTrainingPage = newTrainingPage; SetStartValues(); AddClickCommand = new Command(AddClickCommandImpl); AcceptClickCommand = new Command(AcceptClickCommandImpl); btnSub1ClickCommand = new Command(btnSub1ClickCommandImpl); btnAdd1ClickCommand = new Command(btnAdd1ClickCommandImpl); btnSub2ClickCommand = new Command(btnSub2ClickCommandImpl); btnAdd2ClickCommand = new Command(btnAdd2ClickCommandImpl); btnSub3ClickCommand = new Command(btnSub3ClickCommandImpl); btnAdd3ClickCommand = new Command(btnAdd3ClickCommandImpl); ExerciseList = exercises; // Tutaj zacząć jak nie działa RefreashPropertiesInViewModel(); }