Beispiel #1
0
 private async void ShowShiftForm(Shift copy, string title)
 {
     ShiftFormViewModel viewModel = App.CurrentAppContainer
                                    .Resolve <ShiftFormViewModel>(new TypedParameter(typeof(Shift), copy));
     ShiftFormContentPage shiftForm = new ShiftFormContentPage(viewModel)
     {
         Title = title
     };
     await Navigation.PushAsync(shiftForm);
 }
Beispiel #2
0
 private async void ShiftForm_Clicked(object sender, EventArgs e)
 {
     Shift initial = new Shift
     {
         DepartureTime = DateTime.Now,
         TimeFrom = DateTime.Now,
         TimeTo = DateTime.Now.AddHours(8),
         ArrivalTime = DateTime.Now.AddHours(8),
         IsNightShift = DateTime.Now.Hour < 24 && DateTime.Now.Hour > 18,
         Country = "",
         IsClosed = true,
         WithDiets = true,
     };
     var shiftFormViewModel = App.CurrentAppContainer
         .Resolve<ShiftFormViewModel>(new TypedParameter(typeof(Shift), initial));
     var shiftFormPage = new ShiftFormContentPage(shiftFormViewModel)
     {
         Title = "Nová položka"
     };
     await Navigation.PushAsync(shiftFormPage);
 }