/// <summary> /// Shows the calendar application with a new appointment displayed, using the <see cref="SaveAppointmentServiceParams"/> instance. /// </summary> /// <param name="saveAppointmentServiceParams">The <see cref="SaveAppointmentServiceParams"/> instance.</param> public void Show(SaveAppointmentServiceParams saveAppointmentServiceParams) { #if WP8 var saveAppointmentTask = new SaveAppointmentTask() { Subject = saveAppointmentServiceParams.Subject, Details = saveAppointmentServiceParams.Details, StartTime = saveAppointmentServiceParams.StartTime, EndTime = saveAppointmentServiceParams.EndTime, }; if (saveAppointmentServiceParams.AppointmentStatus.HasValue) { saveAppointmentTask.AppointmentStatus = saveAppointmentServiceParams.AppointmentStatus.Value; } if (saveAppointmentServiceParams.IsAllDayEvent.HasValue) { saveAppointmentTask.IsAllDayEvent = saveAppointmentServiceParams.IsAllDayEvent.Value; } saveAppointmentTask.Show(); #else throw new NotSupportedException("This service is not supported in Windows Phone 7.x"); #endif }
/// <summary> /// Shows the calendar application with a new appointment displayed, using the <see cref="SaveAppointmentServiceParams"/> instance. /// </summary> /// <param name="saveAppointmentServiceParams">The <see cref="SaveAppointmentServiceParams"/> instance.</param> public void Show(SaveAppointmentServiceParams saveAppointmentServiceParams) { #if WP8 var saveAppointmentTask = new SaveAppointmentTask() { Subject = saveAppointmentServiceParams.Subject, Details = saveAppointmentServiceParams.Details, StartTime = saveAppointmentServiceParams.StartTime, EndTime = saveAppointmentServiceParams.EndTime, }; if (saveAppointmentServiceParams.AppointmentStatus.HasValue) { saveAppointmentTask.AppointmentStatus = saveAppointmentServiceParams.AppointmentStatus.Value; } if (saveAppointmentServiceParams.IsAllDayEvent.HasValue) { saveAppointmentTask.IsAllDayEvent = saveAppointmentServiceParams.IsAllDayEvent.Value; } saveAppointmentTask.Show(); #else throw new NotSupportedException("This service is not supported in Windows Phone 7.x"); #endif }