コード例 #1
0
        private async void DeleteReminderExecute(KeyEventArgs args)
        {
            LoaderManager.Instance.ShowLoader();
            var result = await Task.Run(() =>
            {
                if (Reminders.Count == 0)
                {
                    return(false);
                }
                if (SelectedReminderIndex < 0)
                {
                    return(false);
                }
                DBManager.DeleteReminder(Reminders.ElementAt(SelectedReminderIndex));
                Reminders.RemoveAt(SelectedReminderIndex);
                Reminders.Sort();
                return(true);
            });

            LoaderManager.Instance.HideLoader();
            OnPropertyChanged();
        }