mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fixed nullable warnings
This commit is contained in:
@@ -195,7 +195,7 @@ public static partial class Application // Mouse handling
|
||||
{
|
||||
// This occurs when there are multiple overlapped "tops"
|
||||
// E.g. "Mdi" - in the Background Worker Scenario
|
||||
View? top = FindDeepestTop (Top, mouseEvent.Position);
|
||||
View? top = FindDeepestTop (Top!, mouseEvent.Position);
|
||||
view = View.FindDeepestView (top, mouseEvent.Position);
|
||||
|
||||
if (view is { } && view != OverlappedTop && top != Current && top is { })
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Terminal.Gui;
|
||||
public static partial class Application
|
||||
{
|
||||
/// <summary>Gets all cultures supported by the application without the invariant language.</summary>
|
||||
public static List<CultureInfo> SupportedCultures { get; private set; }
|
||||
public static List<CultureInfo>? SupportedCultures { get; private set; }
|
||||
|
||||
internal static List<CultureInfo> GetSupportedCultures ()
|
||||
{
|
||||
@@ -257,7 +257,7 @@ public static partial class Application
|
||||
|
||||
foreach (Toplevel? t in savedToplevels)
|
||||
{
|
||||
if (!t.Modal && t != Current && t != top && t != savedToplevels [index])
|
||||
if (!t!.Modal && t != Current && t != top && t != savedToplevels [index])
|
||||
{
|
||||
lock (_topLevels)
|
||||
{
|
||||
|
||||
@@ -344,7 +344,7 @@ public partial class View
|
||||
if (found is { })
|
||||
{
|
||||
start = found;
|
||||
viewportOffset = found.Parent.Frame.Location;
|
||||
viewportOffset = found.Parent?.Frame.Location ?? Point.Empty;
|
||||
}
|
||||
|
||||
int startOffsetX = currentLocation.X - (start.Frame.X + viewportOffset.X);
|
||||
@@ -796,7 +796,7 @@ public partial class View
|
||||
//}
|
||||
if (dv.Target != this)
|
||||
{
|
||||
nEdges.Add ((dv.Target, from));
|
||||
nEdges.Add ((dv.Target!, from));
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -819,7 +819,7 @@ public partial class View
|
||||
//}
|
||||
if (pv.Target != this)
|
||||
{
|
||||
nEdges.Add ((pv.Target, from));
|
||||
nEdges.Add ((pv.Target!, from));
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeEditing/GenerateMemberBody/AccessorImplementationKind/@EntryValue">BackingField</s:String>
|
||||
<s:String x:Key="/Default/CodeEditing/GenerateMemberBody/DocumentationGenerationKind/@EntryValue">Inherit</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeEditing/GenerateMemberBody/PlaceBackingFieldAboveProperty/@EntryValue">True</s:Boolean>
|
||||
@@ -390,6 +390,7 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=53eecf85_002Dd821_002D40e8_002Dac97_002Dfdb734542b84/@EntryIndexedValue"><Policy><Descriptor Staticness="Instance" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Instance fields (not private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=70345118_002D4b40_002D4ece_002D937c_002Dbbeb7a0b2e70/@EntryIndexedValue"><Policy><Descriptor Staticness="Static" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Static fields (not private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=a0b4bc4d_002Dd13b_002D4a37_002Db37e_002Dc9c6864e4302/@EntryIndexedValue"><Policy><Descriptor Staticness="Any" AccessRightKinds="Any" Description="Types and namespaces"><ElementKinds><Kind Name="NAMESPACE" /><Kind Name="CLASS" /><Kind Name="STRUCT" /><Kind Name="ENUM" /><Kind Name="DELEGATE" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="AaBb_AaBb" /></Policy></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=a4f433b8_002Dabcd_002D4e55_002Da08f_002D82e78cef0f0c/@EntryIndexedValue"><Policy><Descriptor Staticness="Any" AccessRightKinds="Any" Description="Local constants"><ElementKinds><Kind Name="LOCAL_CONSTANT" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=c873eafb_002Dd57f_002D481d_002D8c93_002D77f6863c2f88/@EntryIndexedValue"><Policy><Descriptor Staticness="Static" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Static readonly fields (not private)"><ElementKinds><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=A92AB40A0394A342A0BE0D83FEEA5DBF/@KeyIndexDefined">True</s:Boolean>
|
||||
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=A92AB40A0394A342A0BE0D83FEEA5DBF/RelativePath/@EntryValue">..\Terminal.sln.ToDo.DotSettings</s:String>
|
||||
|
||||
@@ -666,7 +666,7 @@ internal class UICatalogApp
|
||||
|
||||
MiIsMouseDisabled!.Checked = Application.IsMouseDisabled;
|
||||
|
||||
Application.Top.SetNeedsDisplay ();
|
||||
Application.Top!.SetNeedsDisplay ();
|
||||
}
|
||||
|
||||
public MenuItem []? CreateThemeMenuItems ()
|
||||
@@ -835,7 +835,7 @@ internal class UICatalogApp
|
||||
}
|
||||
|
||||
Diagnostics = _diagnosticFlags;
|
||||
Application.Top.SetNeedsDisplay ();
|
||||
Application.Top!.SetNeedsDisplay ();
|
||||
};
|
||||
menuItems.Add (item);
|
||||
}
|
||||
@@ -1061,7 +1061,7 @@ internal class UICatalogApp
|
||||
ShowStatusBar = StatusBar.Visible;
|
||||
|
||||
int height = StatusBar.Visible ? 1 : 0;
|
||||
CategoryList.Height = Dim.Fill (height);
|
||||
CategoryList!.Height = Dim.Fill (height);
|
||||
ScenarioList.Height = Dim.Fill (height);
|
||||
|
||||
// ContentPane.Height = Dim.Fill (height);
|
||||
@@ -1071,7 +1071,7 @@ internal class UICatalogApp
|
||||
}
|
||||
|
||||
Loaded -= LoadedHandler;
|
||||
CategoryList.EnsureSelectedItemVisible ();
|
||||
CategoryList!.EnsureSelectedItemVisible ();
|
||||
ScenarioList.EnsureSelectedCellIsVisible ();
|
||||
}
|
||||
|
||||
@@ -1082,7 +1082,7 @@ internal class UICatalogApp
|
||||
if (_selectedScenario is null)
|
||||
{
|
||||
// Save selected item state
|
||||
_cachedCategoryIndex = CategoryList.SelectedItem;
|
||||
_cachedCategoryIndex = CategoryList!.SelectedItem;
|
||||
_cachedScenarioIndex = ScenarioList.SelectedRow;
|
||||
|
||||
// Create new instance of scenario (even though Scenarios contains instances)
|
||||
|
||||
@@ -7,12 +7,12 @@ namespace Terminal.Gui.DriverTests;
|
||||
|
||||
public class ClipRegionTests
|
||||
{
|
||||
private readonly ITestOutputHelper output;
|
||||
private readonly ITestOutputHelper _output;
|
||||
|
||||
public ClipRegionTests (ITestOutputHelper output)
|
||||
{
|
||||
ConsoleDriver.RunningUnitTests = true;
|
||||
this.output = output;
|
||||
this._output = output;
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
||||
Reference in New Issue
Block a user