mirror of
https://github.com/whoswhip/Spectrum.git
synced 2026-12-06 01:28:42 +00:00
Clean up code
This commit is contained in:
@@ -1,11 +1,7 @@
|
|||||||
using OpenCvSharp;
|
using OpenCvSharp;
|
||||||
using System;
|
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Spectrum
|
namespace Spectrum
|
||||||
{
|
{
|
||||||
|
|||||||
+4
-3
@@ -121,7 +121,7 @@ namespace Spectrum
|
|||||||
Sensitivity = 0.5;
|
Sensitivity = 0.5;
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
if (AutoLabel && !CollectData )
|
if (AutoLabel && !CollectData)
|
||||||
{
|
{
|
||||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||||
Console.WriteLine("[WARNING] AutoLabel is enabled but CollectData is not. Disabling AutoLabel.");
|
Console.WriteLine("[WARNING] AutoLabel is enabled but CollectData is not. Disabling AutoLabel.");
|
||||||
@@ -161,7 +161,8 @@ namespace Spectrum
|
|||||||
Console.ResetColor();
|
Console.ResetColor();
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
}
|
}
|
||||||
} public static void SaveConfig()
|
}
|
||||||
|
public static void SaveConfig()
|
||||||
{
|
{
|
||||||
var config = new JObject
|
var config = new JObject
|
||||||
{
|
{
|
||||||
@@ -198,7 +199,7 @@ namespace Spectrum
|
|||||||
["UpperHSV"] = JToken.FromObject(UpperHSV),
|
["UpperHSV"] = JToken.FromObject(UpperHSV),
|
||||||
["LowerHSV"] = JToken.FromObject(LowerHSV)
|
["LowerHSV"] = JToken.FromObject(LowerHSV)
|
||||||
}
|
}
|
||||||
}; File.WriteAllText("config.json", config.ToString(Formatting.Indented));
|
}; File.WriteAllText("config.json", config.ToString(Formatting.Indented));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void StartFileWatcher()
|
public static void StartFileWatcher()
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using OpenCvSharp;
|
using OpenCvSharp;
|
||||||
using OpenCvSharp.Internal.Vectors;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|||||||
Reference in New Issue
Block a user