When i edit a recurrence Appointment there are some problems:
1. When i change the duration then the end time is not changed as a user would expect it. When i change the end time then the duration is changed as expected.
2. Recurrence pattern monthly: Values for the spininterval1 can be in the range 0 .. 100. The range of spininterval1 should be 1 .. 31. Numbers bigger than 31 make no sense at all.
3. Recurrence pattern monthly: Values for the spininterval2 can be in the range 0 .. 100. The range of spininterval2 should be 1..100. When you enter the 0 then the EditAppointmentDialog lets crash the Scheduler with a division by zero exception.
4. Recurrence pattern yearly: Values for the spinDayNumer can be in the range 0 .. 100. The range of the spinDayNumber should be 0 .. max day of the selected month in the combobox cmbMonth1. Numbers bigger than the max day of the selected month make no sense at all.
5. When i click on the ok-Button of the EditRecurrenceDialog then the EditAppointmentDialog should check if the startdate is in the recurrence rule. When it is not in the recurrence rule then it should be changed to the first day of the recurrence rule. For example when i enter a recurrence rule which says a recurrence on every thursday and the startday in the appointment dialog is a monday then the startday should be changed to the first thursday of the recurrence rule automatically.
Kind Regards,
Ramius
| using System; |
| using System.Collections.Generic; |
| using System.Text; |
| using Telerik.WinControls; |
| using Telerik.WinControls.UI; |
| namespace LearnRadScheduler |
| { |
| public class NewAppointmentObject : Appointment |
| { |
| public NewAppointmentObject() |
| : base() |
| { |
| } |
| private string subjectEN = string.Empty; |
| public string SubjectEN |
| { |
| get { return this.subjectEN; } |
| set |
| { |
| if (this.subjectEN != value) |
| { |
| this.subjectEN = value; |
| this.OnPropertyChanged("SubjectEN"); |
| } |
| } |
| } |
| private string locationEN = string.Empty; |
| public string LocationEN |
| { |
| get { return this.locationEN; } |
| set |
| { |
| if (this.locationEN != value) |
| { |
| this.locationEN = value; |
| this.OnPropertyChanged("LocationEN"); |
| } |
| } |
| } |
| private string descriptionEN = string.Empty; |
| public string DescriptionEN |
| { |
| get { return this.descriptionEN; } |
| set |
| { |
| if (this.descriptionEN != value) |
| { |
| this.descriptionEN = value; |
| this.OnPropertyChanged("DescriptionEN"); |
| } |
| } |
| } |
| } |
| } |
| Property accessor 'SubjectEN' on object 'Telerik.WinControls.UI.Appointment' threw the following exception:'Object does not match target type.' |
| " at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)\r\n at Telerik.WinControls.UI.Scheduler.BindingProviderBase`1.UpdateDataItemProperty(Object item, T schedulerItem, SchedulerMapping mapping)\r\n at Telerik.WinControls.UI.Scheduler.BindingProviderBase`1.UpdateDataItemProperties(Object item, T schedulerItem)\r\n at Telerik.WinControls.UI.Scheduler.BindingProviderBase`1.InsertCore(T itemToInsert)\r\n at Telerik.WinControls.UI.SchedulerBindingDataSource.EventBindingProvider.InsertCore(IEvent itemToInsert)\r\n at Telerik.WinControls.UI.Scheduler.BindingProviderBase`1.Insert(T itemToInsert)\r\n at Telerik.WinControls.UI.RadScheduler.OnAddAppointments(IList list)\r\n at Telerik.WinControls.UI.RadScheduler.appointments_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)\r\n at Telerik.WinControls.Data.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)\r\n at Telerik.WinControls.Data.ObservableCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)\r\n at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)\r\n at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index)\r\n at Telerik.WinControls.Data.ObservableCollection`1.InsertItem(Int32 index, T item, Action`1 approvedAction)\r\n at Telerik.WinControls.Data.ObservableCollection`1.InsertItem(Int32 index, T item)\r\n at Telerik.WinControls.UI.SchedulerAppointmentCollection.InsertItem(Int32 index, IEvent item)\r\n at System.Collections.ObjectModel.Collection`1.Add(T item)\r\n at Telerik.WinControls.UI.RadScheduler.AddNewAppointmentWithDialog(DateTimeInterval interval, Boolean recurringAppointment, SchedulerResourceCollection resources)\r\n at Telerik.WinControls.UI.DayViewAppointmentsTable.cell_DoubleClick(Object sender, EventArgs e)\r\n at Telerik.WinControls.RadItem.OnDoubleClick(EventArgs e)\r\n at Telerik.WinControls.RadItem.DoDoubleClick(EventArgs e)\r\n at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)\r\n at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)\r\n at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)\r\n at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)\r\n at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)\r\n at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)\r\n at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)\r\n at Telerik.WinControls.UI.RadScheduler.OnMouseUp(MouseEventArgs e)\r\n at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at System.Windows.Forms.ScrollableControl.WndProc(Message& m)\r\n at Telerik.WinControls.RadControl.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.Run(ApplicationContext context)\r\n at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()\r\n at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()\r\n at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)\r\n at KocSchool_Grades.TestProject.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81\r\n at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadHelper.ThreadStart()" |
| protected override void ApplySettingsToEvent(Telerik.WinControls.UI.IEvent ev) |
| { |
| NewAppointmentObject newAppObj = ev as NewAppointmentObject; |
| if (newAppObj != null) |
| { |
| newAppObj.SubjectEN = this.txtSubjectEN.Text; |
| newAppObj.LocationEN = this.txtLocationEN.Text; |
| newAppObj.DescriptionEN = this.txtDescriptionEN.Text; |
| } |
| base.ApplySettingsToEvent(ev); |
| } |