mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Incorporated feedback
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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 ()
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user