Exemple #1
0
        private async void RemoveButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Appointment appointment = AppointmentListBox.SelectedItem as Appointment;
                bool        isSuccess   = await appointmentStore.ShowRemoveAppointmentAsync(appointment.LocalId, new Rect());

                if (isSuccess)
                {
                    status.Log(LocalizableStrings.CALENDAR_APPOINTMENT_REMOVE_SUCCESS);
                    ShowAllAppointments();
                }
                else
                {
                    status.Log(LocalizableStrings.CALENDAR_APPOINTMENT_REMOVE_FAIL);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.ToString());
                status.Log(ex.GetType().ToString());
            }
        }