Преглед изворни кода

AddOrSubtract.cs (one type per file!) <g>

Tig пре 1 година
родитељ
комит
d151267eb0

+ 17 - 0
Terminal.Gui/View/Layout/AddOrSubtract.cs

@@ -0,0 +1,17 @@
+namespace Terminal.Gui;
+
+/// <summary>
+///     Describes whether an operation should add or subtract values.
+/// </summary>
+public enum AddOrSubtract
+{
+    /// <summary>
+    ///     The operation should use addition.
+    /// </summary>
+    Add = 0,
+
+    /// <summary>
+    ///     The operation should use subtraction.
+    /// </summary>
+    Subtract = 1
+}

+ 1 - 18
Terminal.Gui/View/Layout/Dim.cs

@@ -565,28 +565,11 @@ public class DimAuto () : Dim
 
 
 }
 }
 
 
-/// <summary>
-/// Describes whether an operation should add or subtract values.
-/// </summary>
-public enum AddOrSubtract
-{
-    /// <summary>
-    /// The operation should use addition.
-    /// </summary>
-    Add = 0,
-
-    /// <summary>
-    /// The operation should use subtraction.
-    /// </summary>
-    Subtract = 1
-}
-
 /// <summary>
 /// <summary>
 ///     Represents a dimension that is a combination of two other dimensions.
 ///     Represents a dimension that is a combination of two other dimensions.
 /// </summary>
 /// </summary>
 /// <param name="add">
 /// <param name="add">
-///     Indicates whether the two dimensions are added or subtracted. If <see langword="true"/>, the dimensions are added,
-///     otherwise they are subtracted.
+///     Indicates whether the two dimensions are added or subtracted. 
 /// </param>
 /// </param>
 /// <remarks>
 /// <remarks>
 ///     This is a low-level API that is typically used internally by the layout system. Use the various static
 ///     This is a low-level API that is typically used internally by the layout system. Use the various static

+ 2 - 4
Terminal.Gui/View/Layout/Pos.cs

@@ -510,16 +510,14 @@ public class PosCenter : Pos
 ///     </para>
 ///     </para>
 /// </remarks>
 /// </remarks>
 /// <param name="add">
 /// <param name="add">
-///     Indicates whether the two positions are added or subtracted. If <see langword="true"/>, the positions are added,
-///     otherwise they are subtracted.
+///     Indicates whether the two positions are added or subtracted.
 /// </param>
 /// </param>
 /// <param name="left">The left position.</param>
 /// <param name="left">The left position.</param>
 /// <param name="right">The right position.</param>
 /// <param name="right">The right position.</param>
 public class PosCombine (AddOrSubtract add, Pos left, Pos right) : Pos
 public class PosCombine (AddOrSubtract add, Pos left, Pos right) : Pos
 {
 {
     /// <summary>
     /// <summary>
-    ///     Gets whether the two positions are added or subtracted. If <see langword="true"/>, the positions are added,
-    ///     otherwise they are subtracted.
+    ///     Gets whether the two positions are added or subtracted.
     /// </summary>
     /// </summary>
     public AddOrSubtract Add { get; } = add;
     public AddOrSubtract Add { get; } = add;