Browse Source

Cleaned up code

Tig Kindel 1 year ago
parent
commit
a2d3d27845

+ 4 - 9
.editorconfig

@@ -39,6 +39,9 @@ resharper_csharp_stick_comment = false
 resharper_csharp_wrap_parameters_style = chop_if_long
 resharper_force_attribute_style = separate
 resharper_indent_type_constraints = true
+resharper_xmldoc_indent_size = 2
+resharper_xmldoc_indent_style = space
+resharper_xmldoc_tab_width = 2
 #resharper_int_align_binary_expressions = true
 resharper_int_align_comments = true
 resharper_int_align_invocations = true
@@ -96,15 +99,7 @@ csharp_style_var_for_built_in_types = true:none
 resharper_wrap_before_linq_expression = true
 resharper_wrap_chained_binary_expressions = chop_if_long
 resharper_wrap_chained_binary_patterns = chop_if_long
-resharper_xmldoc_indent_size = 2
-resharper_xmldoc_indent_style = space
-resharper_xmldoc_indent_text = DoNotTouch
-resharper_xmldoc_linebreaks_inside_tags_for_elements_longer_than = 120
-resharper_xmldoc_max_blank_lines_between_tags = 1
-resharper_xmldoc_max_line_length = 100
-resharper_xmldoc_space_before_self_closing = false
-resharper_xmldoc_tab_width = 2
-resharper_xmldoc_use_indent_from_vs = true
+
 
 [*.{cs,vb}]
 dotnet_style_operator_placement_when_wrapping = beginning_of_line

+ 23 - 22
Terminal.Gui/Views/Toplevel.cs

@@ -5,24 +5,25 @@ using System.Linq;
 namespace Terminal.Gui;
 
 /// <summary>
-/// Toplevel views can be modally executed. They are used for both an application's main view (filling
-/// the entire screeN and
-/// for pop-up views such as <see cref="Dialog"/>, <see cref="MessageBox"/>, and <see cref="Wizard"/>.
+/// Toplevel views are used for both an application's main view (filling the entire screen and
+/// for modal (pop-up) views such as <see cref="Dialog"/>, <see cref="MessageBox"/>, and
+/// <see cref="Wizard"/>).
 /// </summary>
 /// <remarks>
 ///         <para>
-///     Toplevels can be modally executing views, started by calling
-/// <see cref="Application.Run(Toplevel, System.Func{System.Exception,bool}(System.Exception))"/>.
-///     They return control to the caller when <see cref="Application.RequestStop(Toplevel)"/> has
-///     been called (which sets the <see cref="Toplevel.Running"/> property to <c>false</c>).
+///         Toplevels can be modally executing views, started by calling
+///         <see cref="Application.Run(Toplevel, System.Func{System.Exception,bool}(System.Exception))"/>.
+///         They return control to the caller when <see cref="Application.RequestStop(Toplevel)"/> has
+///         been called (which sets the <see cref="Toplevel.Running"/> property to <c>false</c>).
 ///         </para>
 ///         <para>
-///     A Toplevel is created when an application initializes Terminal.Gui by calling
-/// <see cref="Application.Init"/>.
-///     The application Toplevel can be accessed via <see cref="Application.Top"/>. Additional
-/// Toplevels can be created
-///     and run (e.g. <see cref="Dialog"/>s. To run a Toplevel, create the <see cref="Toplevel"/> and
-///     call <see cref="Application.Run(Toplevel, Func{Exception, bool})"/>.
+///         A Toplevel is created when an application initializes Terminal.Gui by calling
+///         <see cref="Application.Init"/>.
+///         The application Toplevel can be accessed via <see cref="Application.Top"/>. Additional
+///         Toplevels can be created
+///         and run (e.g. <see cref="Dialog"/>s. To run a Toplevel, create the <see cref="Toplevel"/> and
+///         call
+///         <see cref="Application.Run(Toplevel, System.Func{System.Exception,bool}(System.Exception))"/>.
 ///         </para>
 /// </remarks>
 public partial class Toplevel : View {
@@ -55,7 +56,7 @@ public partial class Toplevel : View {
 	/// Gets or sets whether the main loop for this <see cref="Toplevel"/> is running or not.
 	/// </summary>
 	/// <remarks>
-	///    Setting this property directly is discouraged. Use <see cref="Application.RequestStop"/>
+	/// Setting this property directly is discouraged. Use <see cref="Application.RequestStop"/>
 	/// instead.
 	/// </remarks>
 	public bool Running { get; set; }
@@ -67,8 +68,8 @@ public partial class Toplevel : View {
 	public override bool CanFocus => SuperView == null ? true : base.CanFocus;
 
 	/// <summary>
-	///  Determines whether the <see cref="Toplevel"/> is modal or not.
-	///  If set to <c>false</c> (the default):
+	/// Determines whether the <see cref="Toplevel"/> is modal or not.
+	/// If set to <c>false</c> (the default):
 	/// <list type="bullet">
 	///         <item>
 	///                 <description><see cref="View.OnKeyDown"/> events will propagate keys upwards.</description>
@@ -84,8 +85,8 @@ public partial class Toplevel : View {
 	///         </item>
 	///         <item>
 	///                 <description>
-	/// The Toplevel will and look like a modal (pop-up) (e.g. see
-	/// <see cref="Dialog"/>.
+	///                 The Toplevel will and look like a modal (pop-up) (e.g. see
+	///                 <see cref="Dialog"/>.
 	///                 </description>
 	///         </item>
 	/// </list>
@@ -558,10 +559,10 @@ public partial class Toplevel : View {
 	}
 
 	/// <summary>
-	///  Gets a new location of the <see cref="Toplevel"/> that is within the Bounds of the
+	/// Gets a new location of the <see cref="Toplevel"/> that is within the Bounds of the
 	/// <paramref name="top"/>'s
 	/// <see cref="View.SuperView"/> (e.g. for dragging a Window).
-	///  The `out` parameters are the new X and Y coordinates.
+	/// The `out` parameters are the new X and Y coordinates.
 	/// </summary>
 	/// <remarks>
 	/// If <paramref name="top"/> does not have a <see cref="View.SuperView"/> or it's SuperView is not
@@ -577,7 +578,7 @@ public partial class Toplevel : View {
 	/// <param name="menuBar">The new top most menuBar</param>
 	/// <param name="statusBar">The new top most statusBar</param>
 	/// <returns>
-	///  Either <see cref="Application.Top"/> (if <paramref name="top"/> does not have a Super View) or
+	/// Either <see cref="Application.Top"/> (if <paramref name="top"/> does not have a Super View) or
 	/// <paramref name="top"/>'s SuperView. This can be used to ensure LayoutSubviews is called on the
 	/// correct View.
 	/// </returns>
@@ -937,7 +938,7 @@ public class ToplevelEqualityComparer : IEqualityComparer<Toplevel> {
 	/// <param name="x">The first object of type <see cref="Toplevel"/> to compare.</param>
 	/// <param name="y">The second object of type <see cref="Toplevel"/> to compare.</param>
 	/// <returns>
-	///     <see langword="true"/> if the specified objects are equal; otherwise, <see langword="false"/>.
+	/// <see langword="true"/> if the specified objects are equal; otherwise, <see langword="false"/>.
 	/// </returns>
 	public bool Equals (Toplevel x, Toplevel y)
 	{

+ 1 - 1
Terminal.Gui/Views/ToplevelOverlapped.cs

@@ -2,7 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 
-namespace Terminal.Gui; 
+namespace Terminal.Gui;
 
 public partial class Toplevel {
 	/// <summary>

+ 1 - 2
UnitTests/Views/OverlappedTests.cs

@@ -2,7 +2,7 @@
 using Xunit;
 using Xunit.Abstractions;
 
-namespace Terminal.Gui.ViewsTests; 
+namespace Terminal.Gui.ViewsTests;
 
 public class OverlappedTests {
 	readonly ITestOutputHelper _output;
@@ -683,7 +683,6 @@ public class OverlappedTests {
 	[Fact]
 	public void MoveToOverlappedChild_Throw_NullReferenceException_Passing_Null_Parameter () => Assert.Throws<NullReferenceException> (delegate { Application.MoveToOverlappedChild (null); });
 
-
 	[Fact] [AutoInitShutdown]
 	public void Visible_False_Does_Not_Clear ()
 	{