예제 #1
0
        private void RunAction(DisplayToDoViewModel sender, object data)
        {
            var userActionDM = data as UserActionDisplayModel;

            if (userActionDM is null)
            {
                DisplayAlert("Error", "Error", "Ok");
                return;
            }

            var userActionVM = new UserActionViewModel
            {
                Id            = userActionDM.ID,
                Date          = userActionDM.Date,
                ActionContext = userActionDM.ActionContext,
                StartTime     = userActionDM.StartTime,
                EndTime       = userActionDM.EndTime,
                Status        = userActionDM.Status,
                Title         = userActionDM.Title
            };

            var userAction = userActionVM.GetAction();

            Navigation.PushAsync(new Pages.ActionStates.RunningActionPage()
            {
                BindingContext = new RunningActionViewModel(userAction, userActionDM.ActionContext)
            });
        }
예제 #2
0
 private async void DeleteAction(DisplayToDoViewModel sender, object data)
 {
     await DeleteToDoItem((data as UserActionDisplayModel));
 }