diff --git a/KSTests/Console/ConsoleColorsInfoInitializationTests.cs b/KSTests/Console/ConsoleColorsInfoInitializationTests.cs
deleted file mode 100644
index c0058f9558..0000000000
--- a/KSTests/Console/ConsoleColorsInfoInitializationTests.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// Kernel Simulator Copyright (C) 2018-2024 Aptivi
-//
-// This file is part of Kernel Simulator
-//
-// Kernel Simulator is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Kernel Simulator is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY, without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-
-using NUnit.Framework;
-using Shouldly;
-
-// Kernel Simulator Copyright (C) 2018-2022 Aptivi
-//
-// This file is part of Kernel Simulator
-//
-// Kernel Simulator is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Kernel Simulator is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-using Terminaux.Colors;
-using Terminaux.Colors.Data;
-using Terminaux.Colors.Transformation.Contrast;
-
-namespace KSTests.Console
-{
-
- [TestFixture]
- public class ConsoleColorsInfoInitializationTests
- {
-
- ///
- /// Tests initializing an instance of ConsoleColorsInfo from a bright color
- ///
- [Test]
- [Description("Initialization")]
- public void TestInitializeConsoleColorsInfoInstanceBright()
- {
- // Create instance
- var ConsoleColorsInfoInstance = new ConsoleColorsInfo(ConsoleColors.Grey85);
-
- // Check for property correctness
- ConsoleColorsInfoInstance.ColorID.ShouldBe(253);
- ConsoleColorsInfoInstance.R.ShouldBe(218);
- ConsoleColorsInfoInstance.G.ShouldBe(218);
- ConsoleColorsInfoInstance.B.ShouldBe(218);
- ConsoleColorsInfoInstance.Color.Brightness.ShouldBe(ColorBrightness.Light);
- }
-
- ///
- /// Tests initializing an instance of ConsoleColorsInfo from a dark color
- ///
- [Test]
- [Description("Initialization")]
- public void TestInitializeConsoleColorsInfoInstanceDark()
- {
- // Create instance
- var ConsoleColorsInfoInstance = new ConsoleColorsInfo(ConsoleColors.Grey11);
-
- // Check for property correctness
- ConsoleColorsInfoInstance.ColorID.ShouldBe(234);
- ConsoleColorsInfoInstance.R.ShouldBe(28);
- ConsoleColorsInfoInstance.G.ShouldBe(28);
- ConsoleColorsInfoInstance.B.ShouldBe(28);
- ConsoleColorsInfoInstance.Color.Brightness.ShouldBe(ColorBrightness.Dark);
- }
-
- }
-}
diff --git a/KSTests/InitTest.cs b/KSTests/InitTest.cs
index f846788651..1aa4fe00fb 100644
--- a/KSTests/InitTest.cs
+++ b/KSTests/InitTest.cs
@@ -18,30 +18,14 @@
//
using System;
-
-// Kernel Simulator Copyright (C) 2018-2022 Aptivi
-//
-// This file is part of Kernel Simulator
-//
-// Kernel Simulator is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Kernel Simulator is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
using System.IO;
+using System.Reflection;
using KS.Files;
using KS.Files.Querying;
using KS.Login;
using KS.Misc.Configuration;
using NUnit.Framework;
+using Terminaux.Base.Checks;
namespace KSTests
{
@@ -56,6 +40,9 @@ public class InitTest
[OneTimeSetUp]
public static void ReadyEverything()
{
+ var asm = Assembly.GetEntryAssembly();
+ if (asm is not null)
+ ConsoleChecker.AddToCheckWhitelist(asm);
Paths.InitPaths();
if (!Checking.FileExists(Paths.GetKernelPath(KernelPathType.Configuration)))
{
@@ -108,4 +95,4 @@ public static void CleanEverything()
}
}
-}
\ No newline at end of file
+}
diff --git a/KSTests/KSTests.csproj b/KSTests/KSTests.csproj
index 0f6f1f50c7..e5182f8f9d 100644
--- a/KSTests/KSTests.csproj
+++ b/KSTests/KSTests.csproj
@@ -17,7 +17,7 @@
False
UnitTest
KSTest\
- 0.0.24.23
+ 0.0.24.24
Debug;Release;Debug-dotnet;Release-dotnet
diff --git a/Kernel Simulator/BootMetadata.json b/Kernel Simulator/BootMetadata.json
index 61d5f86e33..dd0e2f9d17 100644
--- a/Kernel Simulator/BootMetadata.json
+++ b/Kernel Simulator/BootMetadata.json
@@ -1,22 +1,22 @@
[
{
- "OverrideTitle": "Kernel Simulator 0.0.24.23",
+ "OverrideTitle": "Kernel Simulator 0.0.24.24",
"Arguments": []
},
{
- "OverrideTitle": "Kernel Simulator 0.0.24.23 - args",
+ "OverrideTitle": "Kernel Simulator 0.0.24.24 - args",
"Arguments": [ "args" ]
},
{
- "OverrideTitle": "Kernel Simulator 0.0.24.23 - debug",
+ "OverrideTitle": "Kernel Simulator 0.0.24.24 - debug",
"Arguments": [ "debug" ]
},
{
- "OverrideTitle": "Kernel Simulator 0.0.24.23 - test shell",
+ "OverrideTitle": "Kernel Simulator 0.0.24.24 - test shell",
"Arguments": [ "testInteractive" ]
},
{
- "OverrideTitle": "Kernel Simulator 0.0.24.23 - force on small console",
+ "OverrideTitle": "Kernel Simulator 0.0.24.24 - force on small console",
"Arguments": [ "bypasssizedetection" ]
}
]
\ No newline at end of file
diff --git a/Kernel Simulator/ConsoleBase/Inputs/Styles/ChoiceStyle.cs b/Kernel Simulator/ConsoleBase/Inputs/Styles/ChoiceStyle.cs
index 6e73a6969b..cbd6838840 100644
--- a/Kernel Simulator/ConsoleBase/Inputs/Styles/ChoiceStyle.cs
+++ b/Kernel Simulator/ConsoleBase/Inputs/Styles/ChoiceStyle.cs
@@ -18,6 +18,9 @@
//
using System;
+using System.Collections.Generic;
+using Terminaux.Inputs;
+
// Kernel Simulator Copyright (C) 2018-2022 Aptivi
//
@@ -53,10 +56,8 @@ public static class ChoiceStyle
/// Set of answers. They can be written like this: Y/N/C.
/// Output type of choices
/// When enabled, allows the input to consist of multiple characters
- public static string PromptChoice(string Question, string AnswersStr, ChoiceOutputType OutputType = ChoiceOutputType.OneLine, bool PressEnter = false)
- {
- return PromptChoice(Question, AnswersStr, [], OutputType, PressEnter);
- }
+ public static string PromptChoice(string Question, string AnswersStr, ChoiceOutputType OutputType = ChoiceOutputType.OneLine, bool PressEnter = false) =>
+ PromptChoice(Question, AnswersStr, [], OutputType, PressEnter);
///
/// Prompts user for choice
@@ -68,8 +69,21 @@ public static string PromptChoice(string Question, string AnswersStr, ChoiceOutp
/// When enabled, allows the input to consist of multiple characters
public static string PromptChoice(string Question, string AnswersStr, string[] AnswersTitles, ChoiceOutputType OutputType = ChoiceOutputType.OneLine, bool PressEnter = false)
{
- return TermChoiceStyle.PromptChoice(Question, AnswersStr, AnswersTitles, OutputType, PressEnter);
+ // Variables
+ var answerSplit = AnswersStr.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
+ var finalChoices = new List();
+
+ // Check to see if the answer titles are the same
+ if (answerSplit.Length > AnswersTitles.Length)
+ Array.Resize(ref AnswersTitles, answerSplit.Length);
+ if (AnswersTitles.Length > answerSplit.Length)
+ Array.Resize(ref answerSplit, AnswersTitles.Length);
+
+ // Now, populate choice information from the arrays
+ for (int i = 0; i < answerSplit.Length; i++)
+ finalChoices.Add(new InputChoiceInfo(answerSplit[i] ?? $"[{i + 1}]", AnswersTitles[i] ?? $"[{i + 1}]"));
+ return TermChoiceStyle.PromptChoice(Question, [.. finalChoices], OutputType, PressEnter);
}
}
-}
\ No newline at end of file
+}
diff --git a/Kernel Simulator/ConsoleBase/Inputs/Styles/SelectionStyle.cs b/Kernel Simulator/ConsoleBase/Inputs/Styles/SelectionStyle.cs
index d2fa36de5f..f19c907a53 100644
--- a/Kernel Simulator/ConsoleBase/Inputs/Styles/SelectionStyle.cs
+++ b/Kernel Simulator/ConsoleBase/Inputs/Styles/SelectionStyle.cs
@@ -18,6 +18,9 @@
//
using System;
+using System.Collections.Generic;
+using Terminaux.Inputs;
+
// Kernel Simulator Copyright (C) 2018-2022 Aptivi
//
@@ -48,10 +51,8 @@ public static class SelectionStyle
///
/// A question
/// Set of answers. They can be written like this: Y/N/C.
- public static int PromptSelection(string Question, string AnswersStr)
- {
- return PromptSelection(Question, AnswersStr, []);
- }
+ public static int PromptSelection(string Question, string AnswersStr) =>
+ PromptSelection(Question, AnswersStr, []);
///
/// Prompts user for Selection
@@ -61,8 +62,21 @@ public static int PromptSelection(string Question, string AnswersStr)
/// Working titles for each answer. It must be the same amount as the answers.
public static int PromptSelection(string Question, string AnswersStr, string[] AnswersTitles)
{
- return TermSelectionStyle.PromptSelection(Question, AnswersStr, AnswersTitles);
+ // Variables
+ var answerSplit = AnswersStr.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
+ var finalChoices = new List();
+
+ // Check to see if the answer titles are the same
+ if (answerSplit.Length > AnswersTitles.Length)
+ Array.Resize(ref AnswersTitles, answerSplit.Length);
+ if (AnswersTitles.Length > answerSplit.Length)
+ Array.Resize(ref answerSplit, AnswersTitles.Length);
+
+ // Now, populate choice information from the arrays
+ for (int i = 0; i < answerSplit.Length; i++)
+ finalChoices.Add(new InputChoiceInfo(answerSplit[i] ?? $"[{i + 1}]", AnswersTitles[i] ?? $"[{i + 1}]"));
+ return TermSelectionStyle.PromptSelection(Question, [.. finalChoices]);
}
}
-}
\ No newline at end of file
+}
diff --git a/Kernel Simulator/Files/Interactive/FileManagerCli.cs b/Kernel Simulator/Files/Interactive/FileManagerCli.cs
index 56203c68b8..c80da9ed70 100644
--- a/Kernel Simulator/Files/Interactive/FileManagerCli.cs
+++ b/Kernel Simulator/Files/Interactive/FileManagerCli.cs
@@ -64,7 +64,7 @@ public class FileManagerCli : BaseInteractiveTui, IInteractiveTu
///
/// File manager bindings
///
- public override List Bindings { get; set; } =
+ public override InteractiveTuiBinding[] Bindings { get; } =
[
new("Open", ConsoleKey.Enter, default, (info, _) => Open((FileSystemInfo)info)),
new("Copy", ConsoleKey.F1, default, (info, _) => CopyFileOrDir((FileSystemInfo)info)),
@@ -134,24 +134,21 @@ public override IEnumerable SecondaryDataSource
public override bool AcceptsEmptyData => true;
///
- public override void RenderStatus(FileSystemInfo item)
+ public override string GetStatusFromItem(FileSystemInfo item)
{
// Check to see if we're given the file system info
if (item is null)
- {
- InteractiveTuiStatus.Status = Translate.DoTranslation("No info.");
- return;
- }
+ return Translate.DoTranslation("No info.");
// Now, populate the info to the status
try
{
bool infoIsDirectory = Checking.FolderExists(item.FullName);
- InteractiveTuiStatus.Status = $"[{(infoIsDirectory ? "/" : "*")}] {item.Name}";
+ return $"[{(infoIsDirectory ? "/" : "*")}] {item.Name}";
}
catch (Exception ex)
{
- InteractiveTuiStatus.Status = ex.Message;
+ return ex.Message;
}
}
@@ -190,15 +187,14 @@ private static void Open(FileSystemInfo currentFileSystemInfo)
if (InteractiveTuiStatus.CurrentPane == 2)
{
((FileManagerCli)Instance).secondPanePath = Filesystem.NeutralizePath(currentFileSystemInfo.FullName.ToString() + "/");
- InteractiveTuiStatus.SecondPaneCurrentSelection = 1;
((FileManagerCli)Instance).refreshSecondPaneListing = true;
}
else
{
((FileManagerCli)Instance).firstPanePath = Filesystem.NeutralizePath(currentFileSystemInfo.FullName.ToString() + "/");
- InteractiveTuiStatus.FirstPaneCurrentSelection = 1;
((FileManagerCli)Instance).refreshFirstPaneListing = true;
}
+ InteractiveTuiTools.SelectionMovement(Instance, 1);
}
}
catch (Exception ex)
@@ -215,15 +211,14 @@ private static void GoUp()
if (InteractiveTuiStatus.CurrentPane == 2)
{
((FileManagerCli)Instance).secondPanePath = Filesystem.NeutralizePath(((FileManagerCli)Instance).secondPanePath + "/..");
- InteractiveTuiStatus.SecondPaneCurrentSelection = 1;
((FileManagerCli)Instance).refreshSecondPaneListing = true;
}
else
{
((FileManagerCli)Instance).firstPanePath = Filesystem.NeutralizePath(((FileManagerCli)Instance).firstPanePath + "/..");
- InteractiveTuiStatus.FirstPaneCurrentSelection = 1;
((FileManagerCli)Instance).refreshFirstPaneListing = true;
}
+ InteractiveTuiTools.SelectionMovement(Instance, 1);
}
private static void PrintFileSystemInfo(FileSystemInfo currentFileSystemInfo)
@@ -371,7 +366,7 @@ private static void GoTo()
path = Filesystem.NeutralizePath(path, ((FileManagerCli)Instance).firstPanePath);
if (Checking.FolderExists(path))
{
- InteractiveTuiStatus.FirstPaneCurrentSelection = 1;
+ InteractiveTuiTools.SelectionMovement(Instance, 1);
((FileManagerCli)Instance).firstPanePath = path;
((FileManagerCli)Instance).refreshFirstPaneListing = true;
}
diff --git a/Kernel Simulator/Kernel Simulator.csproj b/Kernel Simulator/Kernel Simulator.csproj
index 8379bc9c15..b8d279fb19 100644
--- a/Kernel Simulator/Kernel Simulator.csproj
+++ b/Kernel Simulator/Kernel Simulator.csproj
@@ -44,9 +44,9 @@
OfficialAppIcon-KernelSimulator-256.ico
app.manifest
True
- 0.0.24.23
- 0.0.24.23
- 2.1.24.20
+ 0.0.24.24
+ 0.0.24.24
+ 2.1.24.24
true
AnyCPU
@@ -98,9 +98,9 @@
-
+
-
+
diff --git a/Kernel Simulator/Misc/Animations/BeatEdgePulse/BeatEdgePulse.cs b/Kernel Simulator/Misc/Animations/BeatEdgePulse/BeatEdgePulse.cs
index 9945925ad6..a814954705 100644
--- a/Kernel Simulator/Misc/Animations/BeatEdgePulse/BeatEdgePulse.cs
+++ b/Kernel Simulator/Misc/Animations/BeatEdgePulse/BeatEdgePulse.cs
@@ -83,17 +83,17 @@ public static void Simulate(BeatEdgePulseSettings Settings)
}
else if (Settings.BeatEdgePulse255Colors)
{
- var ConsoleColor = new ConsoleColorsInfo((ConsoleColors)RandomDriver.Next(Settings.BeatEdgePulseMinimumColorLevel, Settings.BeatEdgePulseMaximumColorLevel));
- RedColorNum = ConsoleColor.R;
- GreenColorNum = ConsoleColor.G;
- BlueColorNum = ConsoleColor.B;
+ var ConsoleColor = new Color((ConsoleColors)RandomDriver.Next(Settings.BeatEdgePulseMinimumColorLevel, Settings.BeatEdgePulseMaximumColorLevel));
+ RedColorNum = ConsoleColor.RGB.R;
+ GreenColorNum = ConsoleColor.RGB.G;
+ BlueColorNum = ConsoleColor.RGB.B;
}
else
{
- var ConsoleColor = new ConsoleColorsInfo((ConsoleColors)RandomDriver.Next(Settings.BeatEdgePulseMinimumColorLevel, Settings.BeatEdgePulseMaximumColorLevel));
- RedColorNum = ConsoleColor.R;
- GreenColorNum = ConsoleColor.G;
- BlueColorNum = ConsoleColor.B;
+ var ConsoleColor = new Color((ConsoleColors)RandomDriver.Next(Settings.BeatEdgePulseMinimumColorLevel, Settings.BeatEdgePulseMaximumColorLevel));
+ RedColorNum = ConsoleColor.RGB.R;
+ GreenColorNum = ConsoleColor.RGB.G;
+ BlueColorNum = ConsoleColor.RGB.B;
}
DebugWriter.WdbgConditional(ref Screensaver.Screensaver.ScreensaverDebug, DebugLevel.I, "Got color (R;G;B: {0};{1};{2})", RedColorNum, GreenColorNum, BlueColorNum);
}
@@ -110,10 +110,10 @@ public static void Simulate(BeatEdgePulseSettings Settings)
}
else if (UserColor.Type == ColorType.EightBitColor)
{
- var ConsoleColor = new ConsoleColorsInfo((ConsoleColors)Convert.ToInt32(UserColor.PlainSequence));
- RedColorNum = ConsoleColor.R;
- GreenColorNum = ConsoleColor.G;
- BlueColorNum = ConsoleColor.B;
+ var ConsoleColor = new Color((ConsoleColors)Convert.ToInt32(UserColor.PlainSequence));
+ RedColorNum = ConsoleColor.RGB.R;
+ GreenColorNum = ConsoleColor.RGB.G;
+ BlueColorNum = ConsoleColor.RGB.B;
}
DebugWriter.WdbgConditional(ref Screensaver.Screensaver.ScreensaverDebug, DebugLevel.I, "Got color (R;G;B: {0};{1};{2})", RedColorNum, GreenColorNum, BlueColorNum);
}
diff --git a/Kernel Simulator/Misc/Animations/BeatFader/BeatFader.cs b/Kernel Simulator/Misc/Animations/BeatFader/BeatFader.cs
index 77f0fba43d..b338b07df4 100644
--- a/Kernel Simulator/Misc/Animations/BeatFader/BeatFader.cs
+++ b/Kernel Simulator/Misc/Animations/BeatFader/BeatFader.cs
@@ -82,17 +82,17 @@ public static void Simulate(BeatFaderSettings Settings)
}
else if (Settings.BeatFader255Colors)
{
- var ConsoleColor = new ConsoleColorsInfo((ConsoleColors)RandomDriver.Next(Settings.BeatFaderMinimumColorLevel, Settings.BeatFaderMaximumColorLevel));
- RedColorNum = ConsoleColor.R;
- GreenColorNum = ConsoleColor.G;
- BlueColorNum = ConsoleColor.B;
+ var ConsoleColor = new Color((ConsoleColors)RandomDriver.Next(Settings.BeatFaderMinimumColorLevel, Settings.BeatFaderMaximumColorLevel));
+ RedColorNum = ConsoleColor.RGB.R;
+ GreenColorNum = ConsoleColor.RGB.G;
+ BlueColorNum = ConsoleColor.RGB.B;
}
else
{
- var ConsoleColor = new ConsoleColorsInfo((ConsoleColors)RandomDriver.Next(Settings.BeatFaderMinimumColorLevel, Settings.BeatFaderMaximumColorLevel));
- RedColorNum = ConsoleColor.R;
- GreenColorNum = ConsoleColor.G;
- BlueColorNum = ConsoleColor.B;
+ var ConsoleColor = new Color((ConsoleColors)RandomDriver.Next(Settings.BeatFaderMinimumColorLevel, Settings.BeatFaderMaximumColorLevel));
+ RedColorNum = ConsoleColor.RGB.R;
+ GreenColorNum = ConsoleColor.RGB.G;
+ BlueColorNum = ConsoleColor.RGB.B;
}
DebugWriter.WdbgConditional(ref Screensaver.Screensaver.ScreensaverDebug, DebugLevel.I, "Got color (R;G;B: {0};{1};{2})", RedColorNum, GreenColorNum, BlueColorNum);
}
@@ -109,10 +109,10 @@ public static void Simulate(BeatFaderSettings Settings)
}
else if (UserColor.Type == ColorType.EightBitColor)
{
- var ConsoleColor = new ConsoleColorsInfo((ConsoleColors)Convert.ToInt32(UserColor.PlainSequence));
- RedColorNum = ConsoleColor.R;
- GreenColorNum = ConsoleColor.G;
- BlueColorNum = ConsoleColor.B;
+ var ConsoleColor = new Color((ConsoleColors)Convert.ToInt32(UserColor.PlainSequence));
+ RedColorNum = ConsoleColor.RGB.R;
+ GreenColorNum = ConsoleColor.RGB.G;
+ BlueColorNum = ConsoleColor.RGB.B;
}
DebugWriter.WdbgConditional(ref Screensaver.Screensaver.ScreensaverDebug, DebugLevel.I, "Got color (R;G;B: {0};{1};{2})", RedColorNum, GreenColorNum, BlueColorNum);
}
diff --git a/Kernel Simulator/Misc/Animations/BeatPulse/BeatPulse.cs b/Kernel Simulator/Misc/Animations/BeatPulse/BeatPulse.cs
index 8825ea00ef..e5c0b3082b 100644
--- a/Kernel Simulator/Misc/Animations/BeatPulse/BeatPulse.cs
+++ b/Kernel Simulator/Misc/Animations/BeatPulse/BeatPulse.cs
@@ -82,17 +82,17 @@ public static void Simulate(BeatPulseSettings Settings)
}
else if (Settings.BeatPulse255Colors)
{
- var ConsoleColor = new ConsoleColorsInfo((ConsoleColors)RandomDriver.Next(Settings.BeatPulseMinimumColorLevel, Settings.BeatPulseMaximumColorLevel));
- RedColorNum = ConsoleColor.R;
- GreenColorNum = ConsoleColor.G;
- BlueColorNum = ConsoleColor.B;
+ var ConsoleColor = new Color((ConsoleColors)RandomDriver.Next(Settings.BeatPulseMinimumColorLevel, Settings.BeatPulseMaximumColorLevel));
+ RedColorNum = ConsoleColor.RGB.R;
+ GreenColorNum = ConsoleColor.RGB.G;
+ BlueColorNum = ConsoleColor.RGB.B;
}
else
{
- var ConsoleColor = new ConsoleColorsInfo((ConsoleColors)RandomDriver.Next(Settings.BeatPulseMinimumColorLevel, Settings.BeatPulseMaximumColorLevel));
- RedColorNum = ConsoleColor.R;
- GreenColorNum = ConsoleColor.G;
- BlueColorNum = ConsoleColor.B;
+ var ConsoleColor = new Color((ConsoleColors)RandomDriver.Next(Settings.BeatPulseMinimumColorLevel, Settings.BeatPulseMaximumColorLevel));
+ RedColorNum = ConsoleColor.RGB.R;
+ GreenColorNum = ConsoleColor.RGB.G;
+ BlueColorNum = ConsoleColor.RGB.B;
}
DebugWriter.WdbgConditional(ref Screensaver.Screensaver.ScreensaverDebug, DebugLevel.I, "Got color (R;G;B: {0};{1};{2})", RedColorNum, GreenColorNum, BlueColorNum);
}
@@ -109,10 +109,10 @@ public static void Simulate(BeatPulseSettings Settings)
}
else if (UserColor.Type == ColorType.EightBitColor)
{
- var ConsoleColor = new ConsoleColorsInfo((ConsoleColors)Convert.ToInt32(UserColor.PlainSequence));
- RedColorNum = ConsoleColor.R;
- GreenColorNum = ConsoleColor.G;
- BlueColorNum = ConsoleColor.B;
+ var ConsoleColor = new Color((ConsoleColors)Convert.ToInt32(UserColor.PlainSequence));
+ RedColorNum = ConsoleColor.RGB.R;
+ GreenColorNum = ConsoleColor.RGB.G;
+ BlueColorNum = ConsoleColor.RGB.B;
}
DebugWriter.WdbgConditional(ref Screensaver.Screensaver.ScreensaverDebug, DebugLevel.I, "Got color (R;G;B: {0};{1};{2})", RedColorNum, GreenColorNum, BlueColorNum);
}
diff --git a/Kernel Simulator/Misc/Games/LoveHateRespond.cs b/Kernel Simulator/Misc/Games/LoveHateRespond.cs
index 16cd7f5690..3eff16995f 100644
--- a/Kernel Simulator/Misc/Games/LoveHateRespond.cs
+++ b/Kernel Simulator/Misc/Games/LoveHateRespond.cs
@@ -26,6 +26,7 @@
using KS.Misc.Writers.ConsoleWriters;
using KS.Misc.Writers.DebugWriters;
using KS.Misc.Writers.FancyWriters;
+using Textify.Data.Analysis.NameGen;
// Kernel Simulator Copyright (C) 2018-2022 Aptivi
//
@@ -44,8 +45,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-using Textify.NameGen;
-
namespace KS.Misc.Games
{
public static class LoveHateRespond
@@ -180,4 +179,4 @@ public static void InitializeLoveHate()
}
}
-}
\ No newline at end of file
+}
diff --git a/Kernel Simulator/Misc/Screensaver/Displays/PersonLookup.cs b/Kernel Simulator/Misc/Screensaver/Displays/PersonLookup.cs
index 63d49b8ac8..0b97ffc192 100644
--- a/Kernel Simulator/Misc/Screensaver/Displays/PersonLookup.cs
+++ b/Kernel Simulator/Misc/Screensaver/Displays/PersonLookup.cs
@@ -21,27 +21,9 @@
using System.Collections.Generic;
using KS.Misc.Threading;
using KS.Misc.Writers.ConsoleWriters;
-
-// Kernel Simulator Copyright (C) 2018-2022 Aptivi
-//
-// This file is part of Kernel Simulator
-//
-// Kernel Simulator is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Kernel Simulator is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
using KS.TimeDate;
using Terminaux.Base;
-using Textify.NameGen;
+using Textify.Data.Analysis.NameGen;
namespace KS.Misc.Screensaver.Displays
{
@@ -216,4 +198,4 @@ public override void ScreensaverLogic()
}
}
-}
\ No newline at end of file
+}
diff --git a/Kernel Simulator/Misc/Writers/FancyWriters/SeparatorWriterColor.cs b/Kernel Simulator/Misc/Writers/FancyWriters/SeparatorWriterColor.cs
index ea16b1c0c5..839bab5b57 100644
--- a/Kernel Simulator/Misc/Writers/FancyWriters/SeparatorWriterColor.cs
+++ b/Kernel Simulator/Misc/Writers/FancyWriters/SeparatorWriterColor.cs
@@ -65,7 +65,7 @@ public static void WriteSeparator(string Text, bool PrintSuffix, params object[]
/// Variables to format the message before it's written.
public static void WriteSeparator(string Text, bool PrintSuffix, KernelColorTools.ColTypes ColTypes, params object[] Vars)
{
- TermSeparator.WriteSeparatorColor(Text, PrintSuffix, KernelColorTools.GetConsoleColor(ColTypes), Vars);
+ TermSeparator.WriteSeparatorColor(Text, PrintSuffix, KernelColorTools.GetConsoleColor(ColTypes), true, Vars);
}
///
@@ -78,7 +78,7 @@ public static void WriteSeparator(string Text, bool PrintSuffix, KernelColorTool
/// Variables to format the message before it's written.
public static void WriteSeparator(string Text, bool PrintSuffix, KernelColorTools.ColTypes colorTypeForeground, KernelColorTools.ColTypes colorTypeBackground, params object[] Vars)
{
- TermSeparator.WriteSeparatorColorBack(Text, PrintSuffix, KernelColorTools.GetConsoleColor(colorTypeForeground), KernelColorTools.GetConsoleColor(colorTypeBackground), Vars);
+ TermSeparator.WriteSeparatorColorBack(Text, PrintSuffix, KernelColorTools.GetConsoleColor(colorTypeForeground), KernelColorTools.GetConsoleColor(colorTypeBackground), true, Vars);
}
///
@@ -90,7 +90,7 @@ public static void WriteSeparator(string Text, bool PrintSuffix, KernelColorTool
/// Variables to format the message before it's written.
public static void WriteSeparator(string Text, bool PrintSuffix, ConsoleColor Color, params object[] Vars)
{
- TermSeparator.WriteSeparatorColor(Text, PrintSuffix, (Color)Color, Vars);
+ TermSeparator.WriteSeparatorColor(Text, PrintSuffix, (Color)Color, true, Vars);
}
///
@@ -103,7 +103,7 @@ public static void WriteSeparator(string Text, bool PrintSuffix, ConsoleColor Co
/// Variables to format the message before it's written.
public static void WriteSeparator(string Text, bool PrintSuffix, ConsoleColor ForegroundColor, ConsoleColor BackgroundColor, params object[] Vars)
{
- TermSeparator.WriteSeparatorColorBack(Text, PrintSuffix, (Color)ForegroundColor, (Color)BackgroundColor, Vars);
+ TermSeparator.WriteSeparatorColorBack(Text, PrintSuffix, (Color)ForegroundColor, (Color)BackgroundColor, true, Vars);
}
///
@@ -115,7 +115,7 @@ public static void WriteSeparator(string Text, bool PrintSuffix, ConsoleColor Fo
/// Variables to format the message before it's written.
public static void WriteSeparator(string Text, bool PrintSuffix, Color Color, params object[] Vars)
{
- TermSeparator.WriteSeparatorColor(Text, PrintSuffix, Color, Vars);
+ TermSeparator.WriteSeparatorColor(Text, PrintSuffix, Color, true, Vars);
}
///
@@ -128,8 +128,8 @@ public static void WriteSeparator(string Text, bool PrintSuffix, Color Color, pa
/// Variables to format the message before it's written.
public static void WriteSeparator(string Text, bool PrintSuffix, Color ForegroundColor, Color BackgroundColor, params object[] Vars)
{
- TermSeparator.WriteSeparatorColorBack(Text, PrintSuffix, ForegroundColor, BackgroundColor, Vars);
+ TermSeparator.WriteSeparatorColorBack(Text, PrintSuffix, ForegroundColor, BackgroundColor, true, Vars);
}
}
-}
\ No newline at end of file
+}
diff --git a/Kernel Simulator/Shell/Commands/GenName.cs b/Kernel Simulator/Shell/Commands/GenName.cs
index b1777bfb28..4c73fc7561 100644
--- a/Kernel Simulator/Shell/Commands/GenName.cs
+++ b/Kernel Simulator/Shell/Commands/GenName.cs
@@ -19,27 +19,7 @@
using KS.Misc.Writers.ConsoleWriters;
using KS.Shell.ShellBase.Commands;
-using Textify.Data;
-
-
-// Kernel Simulator Copyright (C) 2018-2022 Aptivi
-//
-// This file is part of Kernel Simulator
-//
-// Kernel Simulator is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Kernel Simulator is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-using Textify.NameGen;
+using Textify.Data.Analysis.NameGen;
namespace KS.Shell.Commands
{
@@ -66,7 +46,6 @@ public override void Execute(string StringArgs, string[] ListArgs, string[] List
SurnameSuffix = ListArgsOnly[4];
// Generate n names
- DataInitializer.Initialize();
NameGenerator.PopulateNames();
NamesList = NameGenerator.GenerateNames(NamesCount, NamePrefix, NameSuffix, SurnamePrefix, SurnameSuffix);
ListWriterColor.WriteList(NamesList);
diff --git a/tools/version b/tools/version
index f28f430022..208e2df9f8 100644
--- a/tools/version
+++ b/tools/version
@@ -1 +1 @@
-0.0.24.23
+0.0.24.24