Skip to content

Commit

Permalink
Merge pull request #496 from irihitech/time
Browse files Browse the repository at this point in the history
Fix various nullable issue.
  • Loading branch information
rabbitism authored Nov 29, 2024
2 parents f359f73 + 0acc9c9 commit c2974a5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Ursa/Controls/DateTimePicker/DateTimePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void OnDateSelected(object? sender, CalendarDayButtonEventArgs e)
}
}

private void OnTimeSelectedChanged(object sender, TimeChangedEventArgs e)
private void OnTimeSelectedChanged(object? sender, TimeChangedEventArgs e)
{
if (SelectedDate is null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Ursa/Controls/DateTimePicker/TimePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
SyncTimeToText(SelectedTime);
}

private void OnPresenterTimeChanged(object sender, TimeChangedEventArgs e)
private void OnPresenterTimeChanged(object? sender, TimeChangedEventArgs e)
{
if (_suppressTextPresenterEvent) return;
SetCurrentValue(SelectedTimeProperty, e.NewTime);
Expand Down
2 changes: 1 addition & 1 deletion src/Ursa/Controls/DateTimePicker/TimeRangePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
SyncTimeToText(EndTime, false);
}

private void OnPresenterTimeChanged(object sender, TimeChangedEventArgs e)
private void OnPresenterTimeChanged(object? sender, TimeChangedEventArgs e)
{
if (_suppressTextPresenterEvent) return;
SetCurrentValue(Equals(sender, _startPresenter) ? StartTimeProperty : EndTimeProperty, e.NewTime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public void FormItem_Generation()
window.Show();

var form = window.FindControl<Form>("Form");
Assert.NotNull(form);
var logicalChildren = form.GetLogicalChildren().ToList();
Assert.True(logicalChildren.All(a=>a is FormItem));
Assert.IsType<TextBox>(logicalChildren[0].LogicalChildren[0]);
Expand Down Expand Up @@ -65,6 +66,7 @@ public void FormGroup_Generation()
window.Show();

var form = window.FindControl<Form>("Form");
Assert.NotNull(form);
var logicalChildren = form.GetLogicalChildren().ToList();
Assert.True(logicalChildren.All(a=>a is FormGroup));
var formGroup = (FormGroup)logicalChildren[0];
Expand Down Expand Up @@ -108,6 +110,7 @@ public void Mixture_Generation()
window.Show();

var form = window.FindControl<Form>("Form");
Assert.NotNull(form);
var logicalChildren = form.GetLogicalChildren().ToList();
Assert.True(logicalChildren.All(a=>a is FormItem || a is FormGroup));
Assert.IsType<TextBox>(logicalChildren[0].LogicalChildren[0]);
Expand Down

0 comments on commit c2974a5

Please sign in to comment.