检查清单
期望的行为
在"档案编辑"-"调课"-"自定义日期"可以自己输入需要调节的日期,但是这个输入框目前没有输入检查,导致日期处于12/31/9999或者1/1/0001时点击按钮切换上/下一周时会触发日期越界BUG
实际结果
程序发生崩溃
重现步骤
1.打开"档案编辑"
2.点击"调课"
3.在日期输入框输入"12/31/9999"
4.点击切换到下一周
截图/录屏(可选,建议)
堆栈跟踪(可选)
System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime. (Parameter 'value')
at System.DateTime.ThrowDateArithmetic(Int32 param)
at System.DateTime.AddDays(Double value)
at ClassIsland.Controls.ScheduleDataGrid.ScheduleDataGrid.RefreshWeekScheduleRows(Boolean changeFromDate) in /_/ClassIsland/Controls/ScheduleDataGrid/ScheduleDataGrid.axaml.cs:line 277
at ClassIsland.Controls.ScheduleDataGrid.ScheduleDataGrid.ButtonNextWeek_OnClick(Object sender, RoutedEventArgs e) in /_/ClassIsland/Controls/ScheduleDataGrid/ScheduleDataGrid.axaml.cs:line 233
at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e)
at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e)
at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
at Avalonia.Controls.Button.OnClick()
at Avalonia.Controls.Button.OnPointerReleased(PointerReleasedEventArgs e)
at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value)
at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e)
at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e)
at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers, IInputElement hitTest)
at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e)
at Avalonia.Controls.TopLevel.<>c.<HandleInput>b__150_0(Object state)
at Avalonia.Threading.Dispatcher.Send(SendOrPostCallback action, Object arg, Nullable`1 priority)
诊断信息
System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime. (Parameter 'value')
at System.DateTime.ThrowDateArithmetic(Int32 param)
at System.DateTime.AddDays(Double value)
at ClassIsland.Controls.ScheduleDataGrid.ScheduleDataGrid.RefreshWeekScheduleRows(Boolean changeFromDate) in /_/ClassIsland/Controls/ScheduleDataGrid/ScheduleDataGrid.axaml.cs:line 277
at ClassIsland.Controls.ScheduleDataGrid.ScheduleDataGrid.ButtonNextWeek_OnClick(Object sender, RoutedEventArgs e) in /_/ClassIsland/Controls/ScheduleDataGrid/ScheduleDataGrid.axaml.cs:line 233
at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e)
at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e)
at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
at Avalonia.Controls.Button.OnClick()
at Avalonia.Controls.Button.OnPointerReleased(PointerReleasedEventArgs e)
at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value)
at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e)
at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e)
at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers, IInputElement hitTest)
at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e)
at Avalonia.Controls.TopLevel.<>c.<HandleInput>b__150_0(Object state)
at Avalonia.Threading.Dispatcher.Send(SendOrPostCallback action, Object arg, Nullable`1 priority)
最后一步
检查清单
期望的行为
在"档案编辑"-"调课"-"自定义日期"可以自己输入需要调节的日期,但是这个输入框目前没有输入检查,导致日期处于12/31/9999或者1/1/0001时点击按钮切换上/下一周时会触发日期越界BUG
实际结果
程序发生崩溃
重现步骤
1.打开"档案编辑"
2.点击"调课"
3.在日期输入框输入"12/31/9999"
4.点击切换到下一周
截图/录屏(可选,建议)
堆栈跟踪(可选)
诊断信息
最后一步