浏览代码

Fixed warnings

Tigger Kindel 1 年之前
父节点
当前提交
3df894238d
共有 3 个文件被更改,包括 9 次插入8 次删除
  1. 8 5
      Terminal.Gui/Drawing/Color.cs
  2. 0 2
      Terminal.Gui/Views/ColorPicker.cs
  3. 1 1
      Terminal.Gui/Views/FileSystemColorProvider.cs

+ 8 - 5
Terminal.Gui/Drawing/Color.cs

@@ -141,6 +141,9 @@ namespace Terminal.Gui {
 			B = c.B;
 			B = c.B;
 		}
 		}
 
 
+		/// <summary>
+		/// Initializes a new instance of the <see cref="Color"/>.
+		/// </summary>
 		public Color ()
 		public Color ()
 		{
 		{
 			A = 0xFF;
 			A = 0xFF;
@@ -231,7 +234,7 @@ namespace Terminal.Gui {
 		// Euclidean distance between the input color and each dictionary color in RGB space,
 		// Euclidean distance between the input color and each dictionary color in RGB space,
 		// and keeps track of the closest entry found so far. The function returns a KeyValuePair
 		// and keeps track of the closest entry found so far. The function returns a KeyValuePair
 		// representing the closest color entry and its associated color name.
 		// representing the closest color entry and its associated color name.
-		public static ColorNames FindClosestColor (Color inputColor)
+		internal static ColorNames FindClosestColor (Color inputColor)
 		{
 		{
 			ColorNames closestColor = ColorNames.Black; // Default to Black
 			ColorNames closestColor = ColorNames.Black; // Default to Black
 			double closestDistance = double.MaxValue;
 			double closestDistance = double.MaxValue;
@@ -608,11 +611,11 @@ namespace Terminal.Gui {
 			Foreground = d.Foreground;
 			Foreground = d.Foreground;
 			Background = d.Background;
 			Background = d.Background;
 		}
 		}
-		
+
 		/// <summary>
 		/// <summary>
 		/// Initializes a new instance with platform specific color value.
 		/// Initializes a new instance with platform specific color value.
 		/// </summary>
 		/// </summary>
-		/// <param name="value">Value.</param>
+		/// <param name="platformColor">Value.</param>
 		internal Attribute (int platformColor)
 		internal Attribute (int platformColor)
 		{
 		{
 			ColorNames foreground = Default.Foreground.ColorName;
 			ColorNames foreground = Default.Foreground.ColorName;
@@ -629,9 +632,9 @@ namespace Terminal.Gui {
 		}
 		}
 
 
 		/// <summary>
 		/// <summary>
-		/// Initializes a new instance with <see cref="ColorNames" value./>
+		/// Initializes a new instance with a <see cref="ColorNames"/> value.
 		/// </summary>
 		/// </summary>
-		/// <param name="value">Value.</param>
+		/// <param name="colorName">Value.</param>
 		internal Attribute (ColorNames colorName)
 		internal Attribute (ColorNames colorName)
 		{
 		{
 			ColorNames foreground = colorName;
 			ColorNames foreground = colorName;

+ 0 - 2
Terminal.Gui/Views/ColorPicker.cs

@@ -117,8 +117,6 @@ namespace Terminal.Gui {
 			SetInitialProperties ();
 			SetInitialProperties ();
 		}
 		}
 
 
-		bool laidOut = false;
-
 		private void SetInitialProperties ()
 		private void SetInitialProperties ()
 		{
 		{
 			CanFocus = true;
 			CanFocus = true;

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

@@ -14,7 +14,7 @@ namespace Terminal.Gui {
 		/// </summary>
 		/// </summary>
 		/// <param name="file"></param>
 		/// <param name="file"></param>
 		/// <returns></returns>
 		/// <returns></returns>
-		public Color? GetColor (IFileSystemInfo file)
+		public Color GetColor (IFileSystemInfo file)
 		{
 		{
 			if (FilenameToColor.ContainsKey (file.Name)) {
 			if (FilenameToColor.ContainsKey (file.Name)) {
 				return FilenameToColor [file.Name];
 				return FilenameToColor [file.Name];