コード例 #1
0
        protected virtual void OnAppointmentModified(ScheduleAppointmentModifiedEventArgs e)
        {
            EventHandler <ScheduleAppointmentModifiedEventArgs> handler = AppointmentModified;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
        void CancelButton_Clicked(object sender, EventArgs e)
        {
            ScheduleAppointmentModifiedEventArgs args = new ScheduleAppointmentModifiedEventArgs();

            args.Appointment = null;
            args.IsModified  = false;
            OnAppointmentModified(args);
            this.IsVisible = false;
        }
コード例 #3
0
        void SaveButton_Clicked(object sender, EventArgs e)
        {
            if (selectedAppointment == null)
            {
                selectedAppointment = new ScheduleAppointment();
            }

            selectedAppointment.Subject   = subjectText.Text.ToString();
            selectedAppointment.StartTime = startDate_picker.Date.Add(startTime_picker.Time);
            selectedAppointment.EndTime   = endDate_picker.Date.Add(endTime_picker.Time);
            selectedAppointment.Location  = locationText.Text.ToString();

            ScheduleAppointmentModifiedEventArgs args = new ScheduleAppointmentModifiedEventArgs();

            args.Appointment = selectedAppointment;
            args.IsModified  = true;
            OnAppointmentModified(args);

            this.IsVisible = false;
        }