Fixed warnings

This commit is contained in:
Tig
2024-06-20 16:04:06 -07:00
parent fd683d83f5
commit 5f448a6f9a
5 changed files with 10 additions and 12 deletions

View File

@@ -633,6 +633,7 @@ public partial class View
/// <para>See <see href="../docs/keyboard.md">for an overview of Terminal.Gui keyboard APIs.</see></para>
/// </remarks>
/// <param name="keyEvent">Contains the details about the key that produced the event.</param>
/// <param name="scope">The scope.</param>
/// <returns>
/// <see langword="false"/> if the key press was not handled. <see langword="true"/> if the keypress was handled
/// and no other view should see it.
@@ -745,6 +746,7 @@ public partial class View
/// Returns true if Key is bound in this view heirarchy. For debugging
/// </summary>
/// <param name="key"></param>
/// <param name="boundView"></param>
/// <returns></returns>
public bool IsHotKeyKeyBound (Key key, out View boundView)
{
@@ -779,6 +781,7 @@ public partial class View
/// <para>See <see href="../docs/keyboard.md">for an overview of Terminal.Gui keyboard APIs.</see></para>
/// </summary>
/// <param name="key">The key event passed.</param>
/// <param name="scope">The scope.</param>
/// <returns>
/// <see langword="null"/> if no command was bound the <paramref name="key"/>. <see langword="true"/> if
/// commands were invoked and at least one handled the command. <see langword="false"/> if commands were invoked and at

View File

@@ -11,8 +11,6 @@ public class Line : View
SuperViewRendersLineCanvas = true;
}
public Dim Length { get; set; } = Dim.Fill ();
private Orientation _orientation;
/// <summary>
@@ -30,12 +28,9 @@ public class Line : View
{
case Orientation.Horizontal:
Height = 1;
// Width = Length;
//Border.Thickness = new Thickness (1, 0, 1, 0);
break;
case Orientation.Vertical:
Height = Length;
Width = 1;
break;

View File

@@ -631,7 +631,7 @@ public class Shortcut : View
/// - if the user presses the HotKey specified by CommandView
/// - if HasFocus and the user presses Space or Enter (or any other key bound to Command.Accept).
/// </summary>
protected new bool? OnAccept (CommandContext ctx)
protected bool? OnAccept (CommandContext ctx)
{
var cancel = false;

View File

@@ -1743,7 +1743,7 @@ public class Slider<T> : View
return true;
}
internal bool Accept ()
internal new bool Accept ()
{
SetFocusedOption ();

View File

@@ -271,7 +271,7 @@ public class Scenario : IDisposable
/// <summary>Defines the category names used to categorize a <see cref="Scenario"/></summary>
[AttributeUsage (AttributeTargets.Class, AllowMultiple = true)]
public class ScenarioCategory (string Name) : System.Attribute
public class ScenarioCategory (string name) : System.Attribute
{
/// <summary>Static helper function to get the <see cref="Scenario"/> Categories given a Type</summary>
/// <param name="t"></param>
@@ -291,15 +291,15 @@ public class Scenario : IDisposable
public static string GetName (Type t) { return ((ScenarioCategory)GetCustomAttributes (t) [0]).Name; }
/// <summary>Category Name</summary>
public string Name { get; set; } = Name;
public string Name { get; set; } = name;
}
/// <summary>Defines the metadata (Name and Description) for a <see cref="Scenario"/></summary>
[AttributeUsage (AttributeTargets.Class)]
public class ScenarioMetadata (string Name, string Description) : System.Attribute
public class ScenarioMetadata (string name, string description) : System.Attribute
{
/// <summary><see cref="Scenario"/> Description</summary>
public string Description { get; set; } = Description;
public string Description { get; set; } = description;
/// <summary>Static helper function to get the <see cref="Scenario"/> Description given a Type</summary>
/// <param name="t"></param>
@@ -312,6 +312,6 @@ public class Scenario : IDisposable
public static string GetName (Type t) { return ((ScenarioMetadata)GetCustomAttributes (t) [0]).Name; }
/// <summary><see cref="Scenario"/> Name</summary>
public string Name { get; set; } = Name;
public string Name { get; set; } = name;
}
}