예제 #1
0
        internal void ClearAppointments()
        {
            int boldedCount = _boldedDates.Count;

            if (boldedCount > 0)
            {
                for (int i = boldedCount - 1; i >= 0; i--)
                {
                    this[_boldedDates.Items[i]].Clear();
                }
                _boldedDates.Clear();
            }
        }
예제 #2
0
        async Task ExecuteLoadItemsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                DateList.Clear();
                var items = await DataStore.GetItemsAsync("", true);

                DateList.ReplaceRange(items);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                MessagingCenter.Send(new MessagingCenterAlert
                {
                    Title   = "Error",
                    Message = "Unable to load items.",
                    Cancel  = "OK"
                }, "message");
            }
            finally
            {
                IsBusy = false;
            }
        }