Incorporated feedback

This commit is contained in:
Tig
2024-07-02 16:41:53 -06:00
parent e365e8e34b
commit 710bd7f371
4 changed files with 10 additions and 8 deletions

View File

@@ -352,13 +352,15 @@ public static partial class Application
InitializedChanged?.Invoke (null, new (in _initialized));
}
#nullable enable
/// <summary>
/// This event is fired after the <see cref="Init"/> and <see cref="Shutdown"/> methods have been called.
/// This event is raised after the <see cref="Init"/> and <see cref="Shutdown"/> methods have been called.
/// </summary>
/// <remarks>
/// Intended to support unit tests that need to know when the application has been initialized.
/// </remarks>
public static event EventHandler<EventArgs<bool>> InitializedChanged;
public static event EventHandler<EventArgs<bool>>? InitializedChanged;
#nullable restore
#endregion Initialization (Init/Shutdown)

View File

@@ -147,12 +147,12 @@ public partial class View : Responder, ISupportInitializeNotification
}
/// <summary>
/// Called when the <see cref="Command.Accept"/> command is invoked. Fires the <see cref="Accept"/>
/// Called when the <see cref="Command.Accept"/> command is invoked. Raises <see cref="Accept"/>
/// event.
/// </summary>
/// <returns>
/// If <see langword="true"/> the event was canceled. If <see langword="false"/> the event was fired but not canceled.
/// If <see langword="null"/> no event was fired.
/// If <see langword="true"/> the event was canceled. If <see langword="false"/> the event was raised but not canceled.
/// If <see langword="null"/> no event was raised.
/// </returns>
protected bool? OnAccept ()
{

View File

@@ -422,7 +422,7 @@ public class ComboBox : View
if (SelectedItem > -1 && _listview.Source?.Count > 0)
{
Text = _listview.Source.ToList () [SelectedItem].ToString ();
Text = _listview.Source.ToList () [SelectedItem]?.ToString ();
}
}
else if (!ReadOnly)

View File

@@ -84,7 +84,7 @@ public class RadioGroup : View
{
SelectedItem = _cursor;
return OnAccept () != false;
return OnAccept () is true or null;
}
);
@@ -97,7 +97,7 @@ public class RadioGroup : View
{
SelectedItem = (int)ctx.KeyBinding?.Context!;
return OnAccept () != false;
return OnAccept () is true or null;
}
return true;