diff --git a/private/Nitrocid.Analyzers.Test/ConsoleBase/ConsoleTitleUsageAnalyzerUnitTests.cs b/private/Nitrocid.Analyzers.Test/ConsoleBase/ConsoleTitleUsageAnalyzerUnitTests.cs
index ddd4ec22cb..aa50fef40f 100644
--- a/private/Nitrocid.Analyzers.Test/ConsoleBase/ConsoleTitleUsageAnalyzerUnitTests.cs
+++ b/private/Nitrocid.Analyzers.Test/ConsoleBase/ConsoleTitleUsageAnalyzerUnitTests.cs
@@ -101,7 +101,7 @@ class MyMod
{
public static void Main()
{
- ConsoleExtensions.SetTitle("thing");
+ ConsoleMisc.SetTitle("thing");
}
}
}
diff --git a/private/Nitrocid.LocaleCheck/Nitrocid.LocaleCheck.csproj b/private/Nitrocid.LocaleCheck/Nitrocid.LocaleCheck.csproj
index d2ecbdf89f..f184a965b0 100644
--- a/private/Nitrocid.LocaleCheck/Nitrocid.LocaleCheck.csproj
+++ b/private/Nitrocid.LocaleCheck/Nitrocid.LocaleCheck.csproj
@@ -23,7 +23,7 @@
true
-
+
diff --git a/private/Nitrocid.LocaleClean/Nitrocid.LocaleClean.csproj b/private/Nitrocid.LocaleClean/Nitrocid.LocaleClean.csproj
index 7bf4738b50..9b2bab846a 100644
--- a/private/Nitrocid.LocaleClean/Nitrocid.LocaleClean.csproj
+++ b/private/Nitrocid.LocaleClean/Nitrocid.LocaleClean.csproj
@@ -23,7 +23,7 @@
true
-
+
diff --git a/private/Nitrocid.LocaleTrim/Nitrocid.LocaleTrim.csproj b/private/Nitrocid.LocaleTrim/Nitrocid.LocaleTrim.csproj
index 0501f78241..bd534e085b 100644
--- a/private/Nitrocid.LocaleTrim/Nitrocid.LocaleTrim.csproj
+++ b/private/Nitrocid.LocaleTrim/Nitrocid.LocaleTrim.csproj
@@ -23,7 +23,7 @@
true
-
+
diff --git a/private/Nitrocid.Tests/ConsoleBase/ColorQueryingTests.cs b/private/Nitrocid.Tests/ConsoleBase/ColorQueryingTests.cs
index 2dbf13227d..b6fdf6643e 100644
--- a/private/Nitrocid.Tests/ConsoleBase/ColorQueryingTests.cs
+++ b/private/Nitrocid.Tests/ConsoleBase/ColorQueryingTests.cs
@@ -142,7 +142,7 @@ public void TestPopulateColorsEmpty()
[Description("Querying")]
public void TestGetGrayLight()
{
- var expected = new Color(ConsoleColors.Gray);
+ var expected = new Color(ConsoleColors.Silver);
Should.NotThrow(() => KernelColorTools.SetColor(KernelColorType.Background, new Color(255, 255, 255)));
var color = ColorTools.GetGray();
color.ShouldBe(expected);
@@ -155,7 +155,7 @@ public void TestGetGrayLight()
[Description("Querying")]
public void TestGetGrayDark()
{
- var expected = new Color(ConsoleColors.Gray);
+ var expected = new Color(ConsoleColors.Silver);
Should.NotThrow(() => KernelColorTools.SetColor(KernelColorType.Background, new Color(0, 0, 0)));
var color = ColorTools.GetGray();
color.ShouldBe(expected);
@@ -189,7 +189,7 @@ public void TestGetRandomColor()
Should.NotThrow(() => color = ColorTools.GetRandomColor(type));
type = color.PlainSequence.Contains(';') ?
ColorType.TrueColor : color.ColorId.ColorId >= 16 ?
- ColorType._255Color : ColorType._16Color;
+ ColorType.EightBitColor : ColorType.FourBitColor;
color.ShouldNotBeNull();
color.Type.ShouldBe(type);
}
diff --git a/private/Nitrocid.Tests/ConsoleBase/ConsoleQueryingTests.cs b/private/Nitrocid.Tests/ConsoleBase/ConsoleQueryingTests.cs
index d1a412d62c..1d747dd0f6 100644
--- a/private/Nitrocid.Tests/ConsoleBase/ConsoleQueryingTests.cs
+++ b/private/Nitrocid.Tests/ConsoleBase/ConsoleQueryingTests.cs
@@ -21,6 +21,7 @@
using Shouldly;
using System;
using Terminaux.Base;
+using Terminaux.Base.Extensions;
using Textify.General;
namespace Nitrocid.Tests.ConsoleBase
@@ -39,8 +40,8 @@ public void TestFilterVTSequences()
{
char BellChar = Convert.ToChar(7);
char EscapeChar = CharManager.GetEsc();
- ConsoleExtensions.FilterVTSequences($"Hello!{EscapeChar}[38;5;43m").ShouldBe("Hello!");
- ConsoleExtensions.FilterVTSequences($"{EscapeChar}]0;This is the title{BellChar}Hello!").ShouldBe("Hello!");
+ ConsoleMisc.FilterVTSequences($"Hello!{EscapeChar}[38;5;43m").ShouldBe("Hello!");
+ ConsoleMisc.FilterVTSequences($"{EscapeChar}]0;This is the title{BellChar}Hello!").ShouldBe("Hello!");
}
}
diff --git a/private/Nitrocid.Tests/Misc/Interactive/Interactives/MyCustomInteractiveTui.cs b/private/Nitrocid.Tests/Misc/Interactive/Interactives/MyCustomInteractiveTui.cs
index d8b4fcbdbb..72b25131dc 100644
--- a/private/Nitrocid.Tests/Misc/Interactive/Interactives/MyCustomInteractiveTui.cs
+++ b/private/Nitrocid.Tests/Misc/Interactive/Interactives/MyCustomInteractiveTui.cs
@@ -23,11 +23,11 @@
namespace Nitrocid.Tests.Misc.Interactive.Interactives
{
- internal class MyCustomInteractiveTui : BaseInteractiveTui, IInteractiveTui
+ internal class MyCustomInteractiveTui : BaseInteractiveTui, IInteractiveTui
{
- public override List Bindings => new()
- {
+ public override List Bindings =>
+ [
new InteractiveTuiBinding("Test", ConsoleKey.F1, (_, idx) => Console.WriteLine(idx))
- };
+ ];
}
}
diff --git a/private/Nitrocid.Tests/Misc/Text/TextToolsTest.cs b/private/Nitrocid.Tests/Misc/Text/TextToolsTest.cs
index d8bf82e74f..13bfe89cf7 100644
--- a/private/Nitrocid.Tests/Misc/Text/TextToolsTest.cs
+++ b/private/Nitrocid.Tests/Misc/Text/TextToolsTest.cs
@@ -20,6 +20,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shouldly;
using System.Linq;
+using Terminaux.Base.Extensions;
using Textify.General;
namespace Nitrocid.Tests.Misc.Text
diff --git a/private/Nitrocid.Tests/Nitrocid.Tests.csproj b/private/Nitrocid.Tests/Nitrocid.Tests.csproj
index de9a9f6083..abb7ce6b42 100644
--- a/private/Nitrocid.Tests/Nitrocid.Tests.csproj
+++ b/private/Nitrocid.Tests/Nitrocid.Tests.csproj
@@ -69,7 +69,7 @@
-
+
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/BackRace.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/BackRace.cs
index 4768caf894..3afb610283 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/BackRace.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/BackRace.cs
@@ -32,6 +32,7 @@
using Terminaux.Inputs;
using Terminaux.Base;
using Terminaux.Colors.Data;
+using Terminaux.Reader;
namespace Nitrocid.Extras.Amusements.Amusements.Games
{
@@ -153,7 +154,7 @@ void ResetAll()
// Wait for the input
winner = 0;
- var input = Input.DetectKeypress().Key;
+ var input = TermReader.ReadKey().Key;
switch (input)
{
case ConsoleKey.UpArrow:
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Hangman.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Hangman.cs
index 0e9c273994..9fb8e78e67 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Hangman.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Hangman.cs
@@ -29,6 +29,7 @@
using Terminaux.Colors;
using Textify.Words;
using Terminaux.Base;
+using Terminaux.Reader;
namespace Nitrocid.Extras.Amusements.Amusements.Games
{
@@ -167,7 +168,7 @@ public static void InitializeHangman(HangmanDifficulty difficulty)
else
{
// Wait for character
- var input = Input.DetectKeypress();
+ var input = TermReader.ReadKey();
var inputChar = input.KeyChar;
if (RandomWord.Contains(inputChar))
{
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/MeteorShooter.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/MeteorShooter.cs
index 77c7f40d2c..5299c7cc18 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/MeteorShooter.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/MeteorShooter.cs
@@ -31,6 +31,7 @@
using Terminaux.Base;
using Terminaux.Colors.Data;
using Nitrocid.Kernel.Debugging;
+using Terminaux.Reader;
namespace Nitrocid.Extras.Amusements.Amusements.Games
{
@@ -103,7 +104,7 @@ public static void InitializeMeteor(bool simulation = false, bool dodge = false)
if (ConsoleWrapper.KeyAvailable)
{
// Read the key and handle it
- Keypress = Input.DetectKeypress();
+ Keypress = TermReader.ReadKey();
HandleKeypress(Keypress.Key, dodge);
}
}
@@ -177,21 +178,21 @@ private static void DrawGame(bool dodge)
if (y != SpaceshipHeight)
buffer.Append(
new Color(ConsoleColors.Black).VTSequenceBackground +
- TextWriterWhereColor.RenderWherePlain(" ", 0, y)
+ TextWriterWhereColor.RenderWhere(" ", 0, y)
);
}
// Show the score
buffer.Append(
new Color(ConsoleColors.Green).VTSequenceForeground +
- TextWriterWhereColor.RenderWherePlain($"{score}", ConsoleWrapper.WindowWidth - $"{score}".Length, 0)
+ TextWriterWhereColor.RenderWhere($"{score}", ConsoleWrapper.WindowWidth - $"{score}".Length, 0)
);
// Move the meteors left
for (int Meteor = 0; Meteor <= Meteors.Count - 1; Meteor++)
{
buffer.Append(new Color(ConsoleColors.Black).VTSequenceBackground);
- buffer.Append(TextWriterWhereColor.RenderWherePlain(" ", Meteors[Meteor].Item1, Meteors[Meteor].Item2));
+ buffer.Append(TextWriterWhereColor.RenderWhere(" ", Meteors[Meteor].Item1, Meteors[Meteor].Item2));
int MeteorX = Meteors[Meteor].Item1 - 1;
int MeteorY = Meteors[Meteor].Item2;
Meteors[Meteor] = (MeteorX, MeteorY);
@@ -201,7 +202,7 @@ private static void DrawGame(bool dodge)
for (int Bullet = 0; Bullet <= Bullets.Count - 1; Bullet++)
{
buffer.Append(new Color(ConsoleColors.Black).VTSequenceBackground);
- buffer.Append(TextWriterWhereColor.RenderWherePlain(" ", Bullets[Bullet].Item1, Bullets[Bullet].Item2));
+ buffer.Append(TextWriterWhereColor.RenderWhere(" ", Bullets[Bullet].Item1, Bullets[Bullet].Item2));
int BulletX = Bullets[Bullet].Item1 + 1;
int BulletY = Bullets[Bullet].Item2;
Bullets[Bullet] = (BulletX, BulletY);
@@ -278,8 +279,8 @@ private static void DrawGame(bool dodge)
{
// The meteor crashed! Remove both the bullet and the meteor
buffer.Append(new Color(ConsoleColors.Black).VTSequenceBackground);
- buffer.Append(TextWriterWhereColor.RenderWherePlain(" ", Meteor.Item1, Meteor.Item2));
- buffer.Append(TextWriterWhereColor.RenderWherePlain(" ", Bullet.Item1, Bullet.Item2));
+ buffer.Append(TextWriterWhereColor.RenderWhere(" ", Meteor.Item1, Meteor.Item2));
+ buffer.Append(TextWriterWhereColor.RenderWhere(" ", Bullet.Item1, Bullet.Item2));
Bullets.RemoveAt(BulletIndex);
Meteors.RemoveAt(MeteorIndex);
score++;
@@ -288,7 +289,7 @@ private static void DrawGame(bool dodge)
}
// Wait for a few milliseconds
- TextWriterColor.WritePlain(buffer.ToString(), false);
+ TextWriterRaw.WritePlain(buffer.ToString(), false);
ThreadManager.SleepNoBlock(MeteorSpeed, MeteorDrawThread);
}
}
@@ -350,7 +351,7 @@ private static string DrawMeteor(int MeteorX, int MeteorY)
private static string DrawBullet(int BulletX, int BulletY)
{
char BulletSymbol = '-';
- return TextWriterWhereColor.RenderWhere(Convert.ToString(BulletSymbol), BulletX, BulletY, false, ConsoleColors.Cyan, ConsoleColors.Black);
+ return TextWriterWhereColor.RenderWhere(Convert.ToString(BulletSymbol), BulletX, BulletY, false, ConsoleColors.Aqua, ConsoleColors.Black);
}
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/ShipDuet.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/ShipDuet.cs
index 67147c4782..d31d519961 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/ShipDuet.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/ShipDuet.cs
@@ -31,6 +31,7 @@
using Terminaux.Base;
using Terminaux.Colors.Data;
using Nitrocid.Kernel.Debugging;
+using Terminaux.Reader;
namespace Nitrocid.Extras.Amusements.Amusements.Games
{
@@ -103,7 +104,7 @@ public static void InitializeShipDuet(bool simulation = false)
if (ConsoleWrapper.KeyAvailable)
{
// Read the key and handle it
- Keypress = Input.DetectKeypress();
+ Keypress = TermReader.ReadKey();
HandleKeypress(Keypress.Key);
}
}
@@ -193,12 +194,12 @@ private static void DrawGame()
if (y != SpaceshipHeightPlayer1)
buffer.Append(
new Color(ConsoleColors.Black).VTSequenceBackground +
- TextWriterWhereColor.RenderWherePlain(" ", 0, y)
+ TextWriterWhereColor.RenderWhere(" ", 0, y)
);
if (y != SpaceshipHeightPlayer2)
buffer.Append(
new Color(ConsoleColors.Black).VTSequenceBackground +
- TextWriterWhereColor.RenderWherePlain(" ", ConsoleWrapper.WindowWidth - 1, y)
+ TextWriterWhereColor.RenderWhere(" ", ConsoleWrapper.WindowWidth - 1, y)
);
}
@@ -207,7 +208,7 @@ private static void DrawGame()
{
buffer.Append(
new Color(ConsoleColors.Black).VTSequenceBackground +
- TextWriterWhereColor.RenderWherePlain(" ", BulletsPlayer1[Bullet].Item1, BulletsPlayer1[Bullet].Item2)
+ TextWriterWhereColor.RenderWhere(" ", BulletsPlayer1[Bullet].Item1, BulletsPlayer1[Bullet].Item2)
);
int BulletX = BulletsPlayer1[Bullet].Item1 + 1;
int BulletY = BulletsPlayer1[Bullet].Item2;
@@ -219,7 +220,7 @@ private static void DrawGame()
{
buffer.Append(
new Color(ConsoleColors.Black).VTSequenceBackground +
- TextWriterWhereColor.RenderWherePlain(" ", BulletsPlayer2[Bullet].Item1, BulletsPlayer2[Bullet].Item2)
+ TextWriterWhereColor.RenderWhere(" ", BulletsPlayer2[Bullet].Item1, BulletsPlayer2[Bullet].Item2)
);
int BulletX = BulletsPlayer2[Bullet].Item1 - 1;
int BulletY = BulletsPlayer2[Bullet].Item2;
@@ -231,7 +232,7 @@ private static void DrawGame()
{
buffer.Append(
new Color(ConsoleColors.Black).VTSequenceBackground +
- TextWriterWhereColor.RenderWherePlain(" ", Stars[Star].Item1, Stars[Star].Item2)
+ TextWriterWhereColor.RenderWhere(" ", Stars[Star].Item1, Stars[Star].Item2)
);
int StarX = Stars[Star].Item1 - 1;
int StarY = Stars[Star].Item2;
@@ -322,7 +323,7 @@ private static void DrawGame()
}
// Wait for a few milliseconds
- TextWriterColor.WritePlain(buffer.ToString(), false);
+ TextWriterRaw.WritePlain(buffer.ToString(), false);
ThreadManager.SleepNoBlock(ShipDuetSpeed, ShipDuetDrawThread);
}
}
@@ -388,7 +389,7 @@ private static string DrawSpaceships()
private static string DrawBullet(int BulletX, int BulletY)
{
char BulletSymbol = '-';
- return TextWriterWhereColor.RenderWhere(Convert.ToString(BulletSymbol), BulletX, BulletY, false, ConsoleColors.Cyan, ConsoleColors.Black);
+ return TextWriterWhereColor.RenderWhere(Convert.ToString(BulletSymbol), BulletX, BulletY, false, ConsoleColors.Aqua, ConsoleColors.Black);
}
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Snaker.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Snaker.cs
index 50d334b78d..c3741add6a 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Snaker.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Snaker.cs
@@ -29,6 +29,8 @@
using Terminaux.Inputs;
using Terminaux.Base;
using Terminaux.Colors.Data;
+using Terminaux.Reader;
+using Terminaux.Colors.Transformation.Contrast;
namespace Nitrocid.Extras.Amusements.Amusements.Games
{
@@ -243,7 +245,7 @@ public static void InitializeSnaker(bool Simulation)
// User pressed the arrow button to move the snake
if (ConsoleWrapper.KeyAvailable)
{
- var Pressed = Input.DetectKeypress().Key;
+ var Pressed = TermReader.ReadKey().Key;
switch (Pressed)
{
case ConsoleKey.DownArrow:
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/SpeedPress.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/SpeedPress.cs
index a518962419..51c295cbec 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/SpeedPress.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/SpeedPress.cs
@@ -24,6 +24,7 @@
using Terminaux.Writer.ConsoleWriters;
using Nitrocid.Languages;
using Textify.General;
+using Terminaux.Reader;
namespace Nitrocid.Extras.Amusements.Amusements.Games
{
@@ -140,9 +141,9 @@ public static void InitializeSpeedPress(SpeedPressDifficulty Difficulty, int Cus
// Prompt user for character
TextWriterColor.Write(Translate.DoTranslation("Current character:") + " {0}", SelectedChar);
TextWriters.Write("> ", false, KernelColorType.Input);
- var (result, provided) = Input.ReadKeyTimeout(false, TimeSpan.FromMilliseconds(SpeedTimeout));
+ var (result, provided) = TermReader.ReadKeyTimeout(false, TimeSpan.FromMilliseconds(SpeedTimeout));
WrittenChar = result;
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Check to see if the user has pressed the correct character
if (provided)
@@ -158,7 +159,7 @@ public static void InitializeSpeedPress(SpeedPressDifficulty Difficulty, int Cus
}
else
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(Translate.DoTranslation("Character not pressed on time."), true, KernelColorType.Warning);
}
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Wordle.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Wordle.cs
index e8aa26de9d..a4d098d948 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Wordle.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Amusements/Games/Wordle.cs
@@ -28,6 +28,7 @@
using Terminaux.Writer.FancyWriters;
using Terminaux.Base;
using Terminaux.Colors.Data;
+using Terminaux.Reader;
namespace Nitrocid.Extras.Amusements.Amusements.Games
{
@@ -52,7 +53,7 @@ public static void InitializeWordle(bool orig = false)
RenderBoxes(RandomWord, maxGuesses, currentTries);
// Let the user decide the character
- var pressedChar = Input.DetectKeypress();
+ var pressedChar = TermReader.ReadKey();
switch (pressedChar.Key)
{
case ConsoleKey.Escape:
@@ -98,7 +99,7 @@ public static void InitializeWordle(bool orig = false)
private static void RenderBoxes(string RandomWord, int maxGuesses, char[,] currentTries)
{
- var boxColorNeutral = new Color(ConsoleColors.Gray);
+ var boxColorNeutral = new Color(ConsoleColors.Silver);
var boxColorRightChar = new Color(ConsoleColors.Green);
var boxColorMatchingChar = new Color(ConsoleColors.DarkOrange);
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Commands/Anniversary.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Commands/Anniversary.cs
index e5b086e974..4ae1c98273 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Commands/Anniversary.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Commands/Anniversary.cs
@@ -71,7 +71,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
[
Translate.DoTranslation("This version now refines the kernel to the point that it no longer behaves like the old versions.") + " " +
Translate.DoTranslation("Because the new groundbreaking features got released, we decided to name this kernel...") + " \n\n" +
- new Color(ConsoleColors.Green3_00d700).VTSequenceForeground + "Nitrocid KS 0.1.0!\n\n" + KernelColorTools.GetColor(KernelColorType.NeutralText).VTSequenceForeground +
+ new Color(ConsoleColors.Green3Alt).VTSequenceForeground + "Nitrocid KS 0.1.0!\n\n" + KernelColorTools.GetColor(KernelColorType.NeutralText).VTSequenceForeground +
"< " + Translate.DoTranslation("Happy 5-year anniversary!") + " >\n\n" +
"-- Aptivi"
]
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Nitrocid.Extras.Amusements.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Nitrocid.Extras.Amusements.csproj
index d522b0fc05..6dba1e95ca 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Nitrocid.Extras.Amusements.csproj
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Nitrocid.Extras.Amusements.csproj
@@ -49,7 +49,7 @@
-
+
true
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Splashes/Quote.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Splashes/Quote.cs
index 65f10c73bc..a3e80306d5 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Splashes/Quote.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Splashes/Quote.cs
@@ -70,7 +70,7 @@ public override string Display(SplashContext context)
string str = quoteSplit[i];
builder.Append(
_quoteColor.VTSequenceForeground +
- TextWriterWhereColor.RenderWherePlain(str, quotePosX, currentY)
+ TextWriterWhereColor.RenderWhere(str, quotePosX, currentY)
);
}
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.ArchiveShell/Archive/Shell/Commands/List.cs b/public/Nitrocid.Addons/Nitrocid.Extras.ArchiveShell/Archive/Shell/Commands/List.cs
index 0825718227..4d0721d0f1 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.ArchiveShell/Archive/Shell/Commands/List.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.ArchiveShell/Archive/Shell/Commands/List.cs
@@ -59,7 +59,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
}
else
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
}
return 0;
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Animations/Lyrics/Lyrics.cs b/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Animations/Lyrics/Lyrics.cs
index 80f3041ccc..de3b962b0e 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Animations/Lyrics/Lyrics.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Animations/Lyrics/Lyrics.cs
@@ -39,6 +39,7 @@
using Textify.General;
using Terminaux.Colors;
using Terminaux.Base;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Extras.BassBoom.Animations.Lyrics
{
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Commands/PlaySound.cs b/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Commands/PlaySound.cs
index bd1831fec6..55715d2103 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Commands/PlaySound.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Commands/PlaySound.cs
@@ -32,6 +32,7 @@
using System.IO;
using System.Threading;
using Terminaux.Base;
+using Terminaux.Reader;
namespace Nitrocid.Extras.BassBoom.Commands
{
@@ -105,7 +106,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
{
if (ConsoleWrapper.KeyAvailable)
{
- var key = Input.DetectKeypress();
+ var key = TermReader.ReadKey();
if (key.Key == ConsoleKey.Q)
PlaybackTools.Stop();
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Nitrocid.Extras.BassBoom.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Nitrocid.Extras.BassBoom.csproj
index 875f30d149..d4196ac9ab 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Nitrocid.Extras.BassBoom.csproj
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Nitrocid.Extras.BassBoom.csproj
@@ -48,7 +48,7 @@
-
+
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Player/PlayerTui.cs b/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Player/PlayerTui.cs
index 20a4ecbaba..707c7f2c3e 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Player/PlayerTui.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.BassBoom/Player/PlayerTui.cs
@@ -48,7 +48,7 @@
using System.Text;
using System.Threading;
using Terminaux.Colors;
-using Textify.Sequences.Builder.Types;
+using Terminaux.Sequences.Builder.Types;
using Terminaux.Inputs.Styles.Infobox;
using Terminaux.Writer.ConsoleWriters;
using Nitrocid.ConsoleBase.Colors;
@@ -60,6 +60,8 @@
using Textify.General;
using Terminaux.Base;
using Terminaux.Colors.Data;
+using Terminaux.Base.Extensions;
+using Terminaux.Reader;
namespace Nitrocid.Extras.BassBoom.Player
{
@@ -150,7 +152,7 @@ public static void PlayerLoop()
{
var buffer = new StringBuilder();
buffer.Append(
- TextWriterWhereColor.RenderWhere(ConsoleExtensions.GetClearLineToRightSequence(), 0, ConsoleWrapper.WindowHeight - 10, KernelColorTools.GetColor(KernelColorType.NeutralText), KernelColorTools.GetColor(KernelColorType.Background)) +
+ TextWriterWhereColor.RenderWhere(ConsoleClearing.GetClearLineToRightSequence(), 0, ConsoleWrapper.WindowHeight - 10, KernelColorTools.GetColor(KernelColorType.NeutralText), KernelColorTools.GetColor(KernelColorType.Background)) +
CenteredTextColor.RenderCentered(ConsoleWrapper.WindowHeight - 10, lyricInstance.GetLastLineCurrent(), KernelColorTools.GetColor(KernelColorType.NeutralText), KernelColorTools.GetColor(KernelColorType.Background))
);
return buffer.ToString();
@@ -167,7 +169,7 @@ public static void PlayerLoop()
{
var buffer = new StringBuilder();
buffer.Append(
- TextWriterWhereColor.RenderWhere(ConsoleExtensions.GetClearLineToRightSequence(), 0, ConsoleWrapper.WindowHeight - 10, KernelColorTools.GetColor(KernelColorType.NeutralText), KernelColorTools.GetColor(KernelColorType.Background))
+ TextWriterWhereColor.RenderWhere(ConsoleClearing.GetClearLineToRightSequence(), 0, ConsoleWrapper.WindowHeight - 10, KernelColorTools.GetColor(KernelColorType.NeutralText), KernelColorTools.GetColor(KernelColorType.Background))
);
return buffer.ToString();
});
@@ -180,7 +182,7 @@ public static void PlayerLoop()
// Handle the keystroke
if (ConsoleWrapper.KeyAvailable)
{
- var keystroke = Input.DetectKeypress();
+ var keystroke = TermReader.ReadKey();
if (PlaybackTools.Playing)
HandleKeypressPlayMode(keystroke);
else
@@ -351,7 +353,7 @@ private static void HandlePlay()
populate = true;
currentSong = musicFiles.IndexOf(musicFile) + 1;
PlayerControls.PopulateMusicFileInfo(musicFile);
- TextWriterColor.WritePlain(PlayerControls.RenderSongName(musicFile), false);
+ TextWriterRaw.WritePlain(PlayerControls.RenderSongName(musicFile), false);
if (paused)
{
paused = false;
@@ -392,7 +394,7 @@ private static string HandleDraw()
drawn.Append(CenteredTextColor.RenderCentered(ConsoleWrapper.WindowHeight - 4, separator));
// Write powered by...
- drawn.Append(TextWriterWhereColor.RenderWherePlain($"[ {Translate.DoTranslation("Powered by BassBoom")} ]", 2, ConsoleWrapper.WindowHeight - 4));
+ drawn.Append(TextWriterWhereColor.RenderWhere($"[ {Translate.DoTranslation("Powered by BassBoom")} ]", 2, ConsoleWrapper.WindowHeight - 4));
// In case we have no songs in the playlist...
if (musicFiles.Count == 0)
@@ -431,7 +433,7 @@ private static string HandleDraw()
}
// Render an entry
- var finalForeColor = finalIndex == currentSong - 1 ? new Color(ConsoleColors.Green) : new Color(ConsoleColors.Gray);
+ var finalForeColor = finalIndex == currentSong - 1 ? new Color(ConsoleColors.Green) : new Color(ConsoleColors.Silver);
int top = startPos + finalIndex - startIndex;
playlist.Append(
$"{CsiSequences.GenerateCsiCursorPosition(1, top + 1)}" +
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Calendar/Calendar/CalendarPrint.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Calendar/Calendar/CalendarPrint.cs
index 6483c4589d..c8199c5fc5 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Calendar/Calendar/CalendarPrint.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Calendar/Calendar/CalendarPrint.cs
@@ -71,7 +71,7 @@ public static void PrintCalendar(int Year, int Month, CalendarTypes calendar = C
// Populate the calendar data
TextWriters.WriteWhere(CalendarTitle, (int)Math.Round((ConsoleWrapper.WindowWidth - CalendarTitle.Length) / 2d), ConsoleWrapper.CursorTop, true, KernelColorType.TableTitle);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
for (int CurrentDay = 1; CurrentDay <= DateTo.Day; CurrentDay++)
{
var CurrentDate = new DateTime(year, month, CurrentDay);
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Calendar/Calendar/CalendarTui.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Calendar/Calendar/CalendarTui.cs
index e9c330f154..8c54673e0a 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Calendar/Calendar/CalendarTui.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Calendar/Calendar/CalendarTui.cs
@@ -22,8 +22,8 @@
using System;
using System.Linq;
using System.Text;
-using Textify.Sequences.Builder.Types;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences.Builder.Types;
+using Terminaux.Sequences;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Kernel.Time.Calendars;
using Terminaux.Inputs.Styles.Infobox;
@@ -39,6 +39,8 @@
using Textify.General;
using Terminaux.Colors;
using Terminaux.Base;
+using Terminaux.Reader;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Extras.Calendar.Calendar
{
@@ -100,7 +102,7 @@ internal static void OpenInteractive(int Year, int Month, int Day, CalendarTypes
// Wait for a keypress
ScreenTools.Render(screen);
- var keypress = Input.DetectKeypress();
+ var keypress = TermReader.ReadKey();
HandleKeypress(keypress, ref state);
// Reset, in case selection changed
@@ -173,7 +175,7 @@ private static void RenderStatus(ref Screen screen)
builder.Append(
$"{InteractiveTuiStatus.ForegroundColor.VTSequenceForeground}" +
$"{KernelColorTools.GetColor(KernelColorType.Background).VTSequenceBackground}" +
- $"{TextWriterWhereColor.RenderWherePlain(status + ConsoleExtensions.GetClearLineToRightSequence(), 0, 0)}"
+ $"{TextWriterWhereColor.RenderWhere(status + ConsoleClearing.GetClearLineToRightSequence(), 0, 0)}"
);
return builder.ToString();
});
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Contacts/Interactives/ContactsManagerCli.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Contacts/Interactives/ContactsManagerCli.cs
index bb7e98388a..b6013186e7 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Contacts/Interactives/ContactsManagerCli.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Contacts/Interactives/ContactsManagerCli.cs
@@ -35,7 +35,7 @@ namespace Nitrocid.Extras.Contacts.Contacts.Interactives
///
/// Contacts manager class
///
- public class ContactsManagerCli : BaseInteractiveTui, IInteractiveTui
+ public class ContactsManagerCli : BaseInteractiveTui, IInteractiveTui
{
///
/// Contact manager bindings
@@ -56,7 +56,7 @@ public class ContactsManagerCli : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
ContactsManager.GetContacts();
///
@@ -64,10 +64,10 @@ public class ContactsManagerCli : BaseInteractiveTui, IInteractiveTui
true;
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(Card item)
{
// Get some info from the contact
- Card selectedContact = (Card)item;
+ Card selectedContact = item;
if (selectedContact is null)
return Translate.DoTranslation("There is no contact. If you'd like to import contacts, please use the import options using the keystrokes defined at the bottom of the screen.");
@@ -91,10 +91,10 @@ public override string GetInfoFromItem(object item)
}
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(Card item)
{
// Get some info from the contact
- Card selectedContact = (Card)item;
+ Card selectedContact = item;
if (selectedContact is null)
return;
@@ -106,9 +106,9 @@ public override void RenderStatus(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(Card item)
{
- Card contact = (Card)item;
+ Card contact = item;
if (contact is null)
return "";
return contact.ContactFullName;
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Nitrocid.Extras.Contacts.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Nitrocid.Extras.Contacts.csproj
index bc88d5b7b8..f838f08d75 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Nitrocid.Extras.Contacts.csproj
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Nitrocid.Extras.Contacts.csproj
@@ -48,7 +48,7 @@
-
+
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Diagnostics/Commands/ThreadsBt.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Diagnostics/Commands/ThreadsBt.cs
index 30714c27cb..8420877bd0 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Diagnostics/Commands/ThreadsBt.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Diagnostics/Commands/ThreadsBt.cs
@@ -56,7 +56,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
string[] threadTrace = trace.Value;
TextWriters.Write(Translate.DoTranslation("Thread stack trace information for {0}") + "\n", true, KernelColorType.ListTitle, threadAddress);
ListWriterColor.WriteList(threadTrace);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
return 0;
}
@@ -79,7 +79,7 @@ public override int ExecuteDumb(CommandParameters parameters, ref string variabl
TextWriters.Write(Translate.DoTranslation("Thread stack trace information for {0}") + "\n", true, KernelColorType.ListTitle, threadAddress);
foreach (string threadTraceStr in threadTrace)
TextWriterColor.Write(threadTraceStr);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
return 0;
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Docking/Dock/Docks/DigitalClock.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Docking/Dock/Docks/DigitalClock.cs
index 6de9f2f0db..8084385c92 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Docking/Dock/Docks/DigitalClock.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Docking/Dock/Docks/DigitalClock.cs
@@ -34,11 +34,12 @@
using System.Text;
using Terminaux.Colors;
using Textify.General;
-using Textify.Sequences.Builder.Types;
+using Terminaux.Sequences.Builder.Types;
using Terminaux.Base;
using Nitrocid.Users.Login.Motd;
using Nitrocid.Network.Types.RSS;
using Nitrocid.Kernel.Configuration;
+using Terminaux.Reader;
namespace Nitrocid.Extras.Docking.Dock.Docks
{
@@ -171,7 +172,7 @@ static string UpdateHeadline()
ThreadManager.SleepNoBlock(1);
}
if (ConsoleWrapper.KeyAvailable)
- Input.DetectKeypress();
+ TermReader.ReadKey();
ScreenTools.UnsetCurrent(screen);
}
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/Get.cs b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/Get.cs
index 486795b30e..6276b443fc 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/Get.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/Get.cs
@@ -44,13 +44,13 @@ public override int Execute(CommandParameters parameters, ref string variableVal
bool Result = !string.IsNullOrWhiteSpace(LocalFile) ? FTPTransfer.FTPGetFile(RemoteFile, LocalFile) : FTPTransfer.FTPGetFile(RemoteFile);
if (Result)
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(Translate.DoTranslation("Downloaded file {0}."), true, KernelColorType.Success, RemoteFile);
return 0;
}
else
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(Translate.DoTranslation("Download failed for file {0}."), true, KernelColorType.Error, RemoteFile);
return KernelExceptionTools.GetErrorCode(KernelExceptionType.FTPNetwork);
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/GetFolder.cs b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/GetFolder.cs
index f11a4f1f4b..406d5c425d 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/GetFolder.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/GetFolder.cs
@@ -44,13 +44,13 @@ public override int Execute(CommandParameters parameters, ref string variableVal
bool Result = !string.IsNullOrWhiteSpace(LocalFolder) ? FTPTransfer.FTPGetFolder(RemoteFolder, LocalFolder) : FTPTransfer.FTPGetFolder(RemoteFolder);
if (Result)
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(Translate.DoTranslation("Downloaded folder {0}."), true, KernelColorType.Success, RemoteFolder);
return 0;
}
else
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(Translate.DoTranslation("Download failed for folder {0}."), true, KernelColorType.Error, RemoteFolder);
return KernelExceptionTools.GetErrorCode(KernelExceptionType.FTPNetwork);
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/Put.cs b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/Put.cs
index d0c9c842d0..150ef98bc1 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/Put.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/Put.cs
@@ -48,13 +48,13 @@ public override int Execute(CommandParameters parameters, ref string variableVal
bool Result = !string.IsNullOrWhiteSpace(LocalFile) ? FTPTransfer.FTPUploadFile(RemoteFile, LocalFile) : FTPTransfer.FTPUploadFile(RemoteFile);
if (Result)
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(Translate.DoTranslation("Uploaded file {0}"), true, KernelColorType.Success, LocalFile);
return 0;
}
else
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(Translate.DoTranslation("Failed to upload {0}"), true, KernelColorType.Error, LocalFile);
return KernelExceptionTools.GetErrorCode(KernelExceptionType.FTPFilesystem);
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/PutFolder.cs b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/PutFolder.cs
index eda4078910..0f1602bc9f 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/PutFolder.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/FTP/Commands/PutFolder.cs
@@ -49,13 +49,13 @@ public override int Execute(CommandParameters parameters, ref string variableVal
bool Result = !string.IsNullOrWhiteSpace(LocalFolder) ? FTPTransfer.FTPUploadFolder(RemoteFolder, LocalFolder) : FTPTransfer.FTPUploadFolder(RemoteFolder);
if (Result)
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(CharManager.NewLine + Translate.DoTranslation("Uploaded folder {0}"), true, KernelColorType.Success, parameters.ArgumentsList[0]);
return 0;
}
else
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(CharManager.NewLine + Translate.DoTranslation("Failed to upload {0}"), true, KernelColorType.Error, parameters.ArgumentsList[0]);
return KernelExceptionTools.GetErrorCode(KernelExceptionType.FTPFilesystem);
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/Tools/FTPTools.cs b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/Tools/FTPTools.cs
index 6db54db641..9c5dfcb8dc 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/Tools/FTPTools.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/Tools/FTPTools.cs
@@ -35,6 +35,7 @@
using Terminaux.Colors;
using Nitrocid.ConsoleBase.Inputs;
using Nitrocid.Network.Connections;
+using Terminaux.Reader;
namespace Nitrocid.Extras.FtpShell.Tools
{
@@ -283,8 +284,8 @@ public static void TryToValidate(BaseFtpClient control, FtpSslValidationEventArg
{
TextWriters.Write(Translate.DoTranslation("Are you sure that you want to connect?") + " (y/n) ", false, KernelColorType.Question);
ColorTools.SetConsoleColor(KernelColorTools.GetColor(KernelColorType.Input));
- Answer = Convert.ToString(Input.DetectKeypress().KeyChar);
- TextWriterColor.Write();
+ Answer = Convert.ToString(TermReader.ReadKey().KeyChar);
+ TextWriterRaw.Write();
DebugWriter.WriteDebug(DebugLevel.I, $"Answer is {Answer}");
if (Answer.Equals("y", StringComparison.OrdinalIgnoreCase))
{
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/Tools/Transfer/FTPTransferProgress.cs b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/Tools/Transfer/FTPTransferProgress.cs
index 5bd405edbb..356cb45794 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/Tools/Transfer/FTPTransferProgress.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.FtpShell/Tools/Transfer/FTPTransferProgress.cs
@@ -22,6 +22,7 @@
using Nitrocid.ConsoleBase.Colors;
using Nitrocid.ConsoleBase.Writers;
using Terminaux.Base;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Extras.FtpShell.Tools.Transfer
{
@@ -57,7 +58,7 @@ private static void FileProgressHandler(FtpProgress Percentage)
if (FTPTransfer.progressFlag & Percentage.Progress != 100d)
{
TextWriters.Write(" {0}% (ETA: {1}d {2}:{3}:{4} @ {5})", false, KernelColorType.Progress, Percentage.Progress.ToString("N2"), Percentage.ETA.Days, Percentage.ETA.Hours, Percentage.ETA.Minutes, Percentage.ETA.Seconds, Percentage.TransferSpeedToString());
- ConsoleExtensions.ClearLineToRight();
+ ConsoleClearing.ClearLineToRight();
}
ConsoleWrapper.SetCursorPosition(FTPTransfer.ConsoleOriginalPositionLeft, FTPTransfer.ConsoleOriginalPositionTop);
}
@@ -81,7 +82,7 @@ private static void MultipleProgressHandler(FtpProgress Percentage)
{
TextWriters.Write("- [{0}/{1}] {2}: ", false, KernelColorType.ListEntry, Percentage.FileIndex + 1, Percentage.FileCount, Percentage.RemotePath);
TextWriters.Write("{0}% (ETA: {1}d {2}:{3}:{4} @ {5})", false, KernelColorType.Progress, Percentage.Progress.ToString("N2"), Percentage.ETA.Days, Percentage.ETA.Hours, Percentage.ETA.Minutes, Percentage.ETA.Seconds, Percentage.TransferSpeedToString());
- ConsoleExtensions.ClearLineToRight();
+ ConsoleClearing.ClearLineToRight();
}
ConsoleWrapper.SetCursorPosition(FTPTransfer.ConsoleOriginalPositionLeft, FTPTransfer.ConsoleOriginalPositionTop);
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Blame.cs b/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Blame.cs
index 327400e995..81a3ed99bb 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Blame.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Blame.cs
@@ -72,7 +72,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriters.Write($"{initialStart}", true, KernelColorType.ListValue);
TextWriters.Write("- " + Translate.DoTranslation("Final line number") + ": ", false, KernelColorType.ListEntry);
TextWriters.Write($"{finalStart}", true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Initial commit info
TextWriters.Write("- " + Translate.DoTranslation("Initial commit"), true, KernelColorType.ListEntry);
@@ -86,7 +86,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriters.Write($"{initialCommit.Committer.Name} <{initialCommit.Committer.Email}>", true, KernelColorType.ListValue);
TextWriters.Write(" - " + Translate.DoTranslation("Number of parents") + ": ", false, KernelColorType.ListEntry);
TextWriters.Write($"{initialCommit.Parents.Count()}", true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Final commit info
TextWriters.Write("- " + Translate.DoTranslation("Final commit"), true, KernelColorType.ListEntry);
@@ -100,7 +100,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriters.Write($"{finalCommit.Committer.Name} <{finalCommit.Committer.Email}>", true, KernelColorType.ListValue);
TextWriters.Write(" - " + Translate.DoTranslation("Number of parents") + ": ", false, KernelColorType.ListEntry);
TextWriters.Write($"{finalCommit.Parents.Count()}", true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Increment the hunk number for display
hunkNum++;
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Diff.cs b/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Diff.cs
index 7c2c24d369..52ac91ea22 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Diff.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Diff.cs
@@ -76,7 +76,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
foreach (var change in renamed)
TextWriters.Write($"[R] / {change.OldPath} -> {change.Path}", KernelColorType.ListEntry);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
if (doPatch)
{
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Status.cs b/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Status.cs
index 9aace7bd28..e7c1a26cb4 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Status.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.GitShell/Git/Commands/Status.cs
@@ -57,7 +57,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
}
else
TextWriters.Write(Translate.DoTranslation("No untracked files."), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// ...added...
TextWriters.Write(Translate.DoTranslation("Added files") + ":", true, KernelColorType.ListEntry);
@@ -68,7 +68,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
}
else
TextWriters.Write(Translate.DoTranslation("No added files."), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// ...modified...
TextWriters.Write(Translate.DoTranslation("Modified files") + ":", true, KernelColorType.ListEntry);
@@ -79,7 +79,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
}
else
TextWriters.Write(Translate.DoTranslation("No modified files."), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// ...removed...
TextWriters.Write(Translate.DoTranslation("Removed files") + ":", true, KernelColorType.ListEntry);
@@ -90,7 +90,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
}
else
TextWriters.Write(Translate.DoTranslation("No removed files."), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// ...staged...
TextWriters.Write(Translate.DoTranslation("Staged files") + ":", true, KernelColorType.ListEntry);
@@ -101,7 +101,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
}
else
TextWriters.Write(Translate.DoTranslation("No staged files."), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// ...renamed...
TextWriters.Write(Translate.DoTranslation("Renamed staged files") + ":", true, KernelColorType.ListEntry);
@@ -112,7 +112,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
}
else
TextWriters.Write(Translate.DoTranslation("No renamed staged files."), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// ...renamed unstaged...
TextWriters.Write(Translate.DoTranslation("Renamed files") + ":", true, KernelColorType.ListEntry);
@@ -123,7 +123,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
}
else
TextWriters.Write(Translate.DoTranslation("No renamed files."), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// ...and missing
TextWriters.Write(Translate.DoTranslation("Missing files") + ":", true, KernelColorType.ListEntry);
@@ -134,7 +134,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
}
else
TextWriters.Write(Translate.DoTranslation("No missing files."), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
return 0;
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.JsonShell/Json/Commands/JsonInfo.cs b/public/Nitrocid.Addons/Nitrocid.Extras.JsonShell/Json/Commands/JsonInfo.cs
index 1c0629dcee..8c77a81113 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.JsonShell/Json/Commands/JsonInfo.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.JsonShell/Json/Commands/JsonInfo.cs
@@ -40,7 +40,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriterColor.Write(Translate.DoTranslation("Base has values") + ": {0}", true, false, JsonShellCommon.FileToken.HasValues);
TextWriterColor.Write(Translate.DoTranslation("Children token count") + ": {0}", JsonShellCommon.FileToken.Count());
TextWriterColor.Write(Translate.DoTranslation("Base path") + ": {0}", JsonShellCommon.FileToken.Path);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Individual properties
if (!parameters.SwitchesList.Contains("-simplified"))
@@ -54,7 +54,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriterColor.Write(Translate.DoTranslation("Token path") + ": {0}", token.Path);
if (parameters.SwitchesList.Contains("-showvals"))
TextWriterColor.Write(Translate.DoTranslation("Token value") + ": {0}", token);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Check to see if the token is a property
if (token.Type == JTokenType.Property)
@@ -66,7 +66,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriterColor.Write(Translate.DoTranslation("Property path") + ": {0}", ((JProperty)token).Path);
if (parameters.SwitchesList.Contains("-showvals"))
TextWriterColor.Write(Translate.DoTranslation("Property value") + ": {0}", ((JProperty)token).Value);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
}
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.LanguageStudio/Studio/LanguageStudioApp.cs b/public/Nitrocid.Addons/Nitrocid.Extras.LanguageStudio/Studio/LanguageStudioApp.cs
index b8501e05e3..cbbd837692 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.LanguageStudio/Studio/LanguageStudioApp.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.LanguageStudio/Studio/LanguageStudioApp.cs
@@ -145,7 +145,7 @@ public static void StartLanguageStudio(string pathToTranslations)
[
new InputChoiceInfo($"{englishLines.Count + 1}", Translate.DoTranslation("Go Back...")),
];
- int selectedStringNum = SelectionStyle.PromptSelection("- " + finalTitle + " " + new string('-', ConsoleWrapper.WindowWidth - ("- " + finalTitle + " ").Length) + CharManager.NewLine + CharManager.NewLine + Translate.DoTranslation("Select a string to translate:"), choices, altChoices);
+ int selectedStringNum = SelectionStyle.PromptSelection("- " + finalTitle + " " + new string('-', ConsoleWrapper.WindowWidth - ("- " + finalTitle + " ").Length) + CharManager.NewLine + CharManager.NewLine + Translate.DoTranslation("Select a string to translate:"), [.. choices], [.. altChoices]);
// Check the answer
if (selectedStringNum == englishLines.Count + 1)
@@ -160,7 +160,7 @@ public static void StartLanguageStudio(string pathToTranslations)
{
// User chose to remove a string.
finalTitle = Translate.DoTranslation("Remove string");
- int selectedRemovedStringNum = SelectionStyle.PromptSelection("- " + finalTitle + " " + new string('-', ConsoleWrapper.WindowWidth - ("- " + finalTitle + " ").Length) + CharManager.NewLine + CharManager.NewLine + Translate.DoTranslation("Select a string to remove:"), choices, altChoicesRemove);
+ int selectedRemovedStringNum = SelectionStyle.PromptSelection("- " + finalTitle + " " + new string('-', ConsoleWrapper.WindowWidth - ("- " + finalTitle + " ").Length) + CharManager.NewLine + CharManager.NewLine + Translate.DoTranslation("Select a string to remove:"), [.. choices], [.. altChoicesRemove]);
if (selectedRemovedStringNum == englishLines.Count + 1 || selectedRemovedStringNum == -1)
continue;
else
@@ -216,7 +216,7 @@ private static void HandleStringTranslation(List strings, int index, str
new InputChoiceInfo($"{targetLanguages.Length + 1}", Translate.DoTranslation("Go Back...")),
];
string finalTitle = Translate.DoTranslation("Select language");
- int selectedLangNum = SelectionStyle.PromptSelection("- " + finalTitle + " " + new string('-', ConsoleWrapper.WindowWidth - ("- " + finalTitle + " ").Length) + CharManager.NewLine + CharManager.NewLine + Translate.DoTranslation("Select a language to translate this string to:"), choices, altChoices);
+ int selectedLangNum = SelectionStyle.PromptSelection("- " + finalTitle + " " + new string('-', ConsoleWrapper.WindowWidth - ("- " + finalTitle + " ").Length) + CharManager.NewLine + CharManager.NewLine + Translate.DoTranslation("Select a language to translate this string to:"), [.. choices], [.. altChoices]);
if (selectedLangNum == targetLanguages.Length + 1 || selectedLangNum == -1)
return;
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Directory/MailManager.cs b/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Directory/MailManager.cs
index 35fc9fd44b..af11f73fa6 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Directory/MailManager.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Directory/MailManager.cs
@@ -31,6 +31,7 @@
using Nitrocid.Kernel.Exceptions;
using Nitrocid.Languages;
using Textify.General;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Extras.MailShell.Tools.Directory
{
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Transfer/MailTransfer.cs b/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Transfer/MailTransfer.cs
index c30c269414..18427058d3 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Transfer/MailTransfer.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Transfer/MailTransfer.cs
@@ -87,7 +87,7 @@ public static void MailPrintMessage(int MessageNum, bool Decrypt = false)
}
// Prepare view
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Print all the addresses that sent the mail
DebugWriter.WriteDebug(DebugLevel.I, "{0} senders.", Msg.From.Count);
@@ -110,7 +110,7 @@ public static void MailPrintMessage(int MessageNum, bool Decrypt = false)
TextWriters.Write(Translate.DoTranslation("- Sent at {0} in {1}"), true, KernelColorType.ListEntry, TimeDateRenderers.RenderTime(Msg.Date.DateTime), TimeDateRenderers.RenderDate(Msg.Date.DateTime));
// Prepare subject
- TextWriterColor.Write();
+ TextWriterRaw.Write();
DebugWriter.WriteDebug(DebugLevel.I, "Subject length: {0}, {1}", Msg.Subject.Length, Msg.Subject);
TextWriters.Write($"- {Msg.Subject}", false, KernelColorType.ListEntry);
@@ -122,11 +122,11 @@ public static void MailPrintMessage(int MessageNum, bool Decrypt = false)
}
else
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
// Prepare body
- TextWriterColor.Write();
+ TextWriterRaw.Write();
DebugWriter.WriteDebug(DebugLevel.I, "Displaying body...");
var DecryptedMessage = default(Dictionary);
DebugWriter.WriteDebug(DebugLevel.I, "To decrypt: {0}", Decrypt);
@@ -174,7 +174,7 @@ public static void MailPrintMessage(int MessageNum, bool Decrypt = false)
{
TextWriters.Write(Msg.GetTextBody(MailShellCommon.TextFormat), true, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Populate attachments
if (Msg.Attachments.Any())
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Transfer/MailTransferProgress.cs b/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Transfer/MailTransferProgress.cs
index b5b88521e2..8c7632367a 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Transfer/MailTransferProgress.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Tools/Transfer/MailTransferProgress.cs
@@ -25,6 +25,7 @@
using Nitrocid.Misc.Reflection;
using Nitrocid.Misc.Text.Probers.Placeholder;
using Terminaux.Base;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Extras.MailShell.Tools.Transfer
{
@@ -41,11 +42,11 @@ public void Report(long bytesTransferred, long totalSize)
{
if (!string.IsNullOrWhiteSpace(MailShellCommon.ProgressStyle))
{
- TextWriters.WriteWhere(PlaceParse.ProbePlaces(MailShellCommon.ProgressStyle) + $"{ConsoleExtensions.GetClearLineToRightSequence()}", 0, ConsoleWrapper.CursorTop, true, KernelColorType.Progress, bytesTransferred.SizeString(), totalSize.SizeString());
+ TextWriters.WriteWhere(PlaceParse.ProbePlaces(MailShellCommon.ProgressStyle) + $"{ConsoleClearing.GetClearLineToRightSequence()}", 0, ConsoleWrapper.CursorTop, true, KernelColorType.Progress, bytesTransferred.SizeString(), totalSize.SizeString());
}
else
{
- TextWriters.WriteWhere("{0}/{1} " + Translate.DoTranslation("of mail transferred...") + $"{ConsoleExtensions.GetClearLineToRightSequence()}", 0, ConsoleWrapper.CursorTop, true, KernelColorType.Progress, bytesTransferred.SizeString(), totalSize.SizeString());
+ TextWriters.WriteWhere("{0}/{1} " + Translate.DoTranslation("of mail transferred...") + $"{ConsoleClearing.GetClearLineToRightSequence()}", 0, ConsoleWrapper.CursorTop, true, KernelColorType.Progress, bytesTransferred.SizeString(), totalSize.SizeString());
}
}
}
@@ -57,11 +58,11 @@ public void Report(long bytesTransferred)
{
if (!string.IsNullOrWhiteSpace(MailShellCommon.ProgressStyleSingle))
{
- TextWriters.WriteWhere(PlaceParse.ProbePlaces(MailShellCommon.ProgressStyleSingle) + $"{ConsoleExtensions.GetClearLineToRightSequence()}", 0, ConsoleWrapper.CursorTop, true, KernelColorType.Progress, bytesTransferred.SizeString());
+ TextWriters.WriteWhere(PlaceParse.ProbePlaces(MailShellCommon.ProgressStyleSingle) + $"{ConsoleClearing.GetClearLineToRightSequence()}", 0, ConsoleWrapper.CursorTop, true, KernelColorType.Progress, bytesTransferred.SizeString());
}
else
{
- TextWriters.WriteWhere("{0} " + Translate.DoTranslation("of mail transferred...") + $"{ConsoleExtensions.GetClearLineToRightSequence()}", 0, ConsoleWrapper.CursorTop, true, KernelColorType.Progress, bytesTransferred.SizeString());
+ TextWriters.WriteWhere("{0} " + Translate.DoTranslation("of mail transferred...") + $"{ConsoleClearing.GetClearLineToRightSequence()}", 0, ConsoleWrapper.CursorTop, true, KernelColorType.Progress, bytesTransferred.SizeString());
}
}
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.NameGen/Nitrocid.Extras.NameGen.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.NameGen/Nitrocid.Extras.NameGen.csproj
index bcc6ad08a1..2aebd43ba3 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.NameGen/Nitrocid.Extras.NameGen.csproj
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.NameGen/Nitrocid.Extras.NameGen.csproj
@@ -65,7 +65,7 @@
-
+
true
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Notes/Interactive/NoteViewerCli.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Notes/Interactive/NoteViewerCli.cs
index 55e5b02094..c330545c4d 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Notes/Interactive/NoteViewerCli.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Notes/Interactive/NoteViewerCli.cs
@@ -20,24 +20,24 @@
using Terminaux.Inputs.Interactive;
using Nitrocid.Extras.Notes.Management;
using Nitrocid.Languages;
-using System.Collections;
+using System.Collections.Generic;
namespace Nitrocid.Extras.Notes.Interactive
{
///
/// Notes viewer class
///
- public class NoteViewerCli : BaseInteractiveTui, IInteractiveTui
+ public class NoteViewerCli : BaseInteractiveTui, IInteractiveTui
{
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
NoteManagement.ListNotes();
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(string item)
{
// Get some info from the note
- string noteInstance = (string)item;
+ string noteInstance = item;
bool noteEmpty = string.IsNullOrEmpty(noteInstance);
// Generate the rendered text
@@ -50,10 +50,10 @@ public override string GetInfoFromItem(object item)
}
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(string item)
{
// Get some info from the note
- string noteInstance = (string)item;
+ string noteInstance = item;
bool noteEmpty = string.IsNullOrEmpty(noteInstance);
// Generate the rendered text
@@ -66,10 +66,10 @@ public override void RenderStatus(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(string item)
{
// Get some info from the note
- string noteInstance = (string)item;
+ string noteInstance = item;
bool noteEmpty = string.IsNullOrEmpty(noteInstance);
// Generate the rendered text
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Commands/List.cs b/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Commands/List.cs
index 5d08b4099b..4b8569496b 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Commands/List.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Commands/List.cs
@@ -23,6 +23,7 @@
using Terminaux.Writer.ConsoleWriters;
using Nitrocid.Shell.ShellBase.Commands;
using Textify.General;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Extras.RssShell.RSS.Commands
{
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Commands/Search.cs b/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Commands/Search.cs
index e86fd6a50b..1e96463409 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Commands/Search.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Commands/Search.cs
@@ -25,6 +25,7 @@
using Terminaux.Writer.ConsoleWriters;
using Nitrocid.ConsoleBase.Colors;
using Textify.General;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Extras.RssShell.RSS.Commands
{
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Interactive/RssReaderCli.cs b/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Interactive/RssReaderCli.cs
index 786e37f0c1..e71a0cf3c0 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Interactive/RssReaderCli.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.RssShell/RSS/Interactive/RssReaderCli.cs
@@ -36,7 +36,7 @@ namespace Nitrocid.Extras.RssShell.RSS.Interactive
///
/// RSS Reader TUI class
///
- public class RssReaderCli : BaseInteractiveTui, IInteractiveTui
+ public class RssReaderCli : BaseInteractiveTui, IInteractiveTui
{
internal static NetworkConnection rssConnection;
@@ -62,14 +62,14 @@ private static RSSFeed Feed
];
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
Feed.FeedArticles;
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(RSSArticle item)
{
// Get some info from the article
- RSSArticle selectedArticle = (RSSArticle)item;
+ RSSArticle selectedArticle = item;
bool hasTitle = !string.IsNullOrEmpty(selectedArticle.ArticleTitle);
bool hasDescription = !string.IsNullOrEmpty(selectedArticle.ArticleDescription);
@@ -92,16 +92,16 @@ public override string GetInfoFromItem(object item)
}
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(RSSArticle item)
{
- RSSArticle article = (RSSArticle)item;
+ RSSArticle article = item;
InteractiveTuiStatus.Status = article.ArticleTitle;
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(RSSArticle item)
{
- RSSArticle article = (RSSArticle)item;
+ RSSArticle article = item;
return article.ArticleTitle;
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SFTP/Commands/Get.cs b/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SFTP/Commands/Get.cs
index f71940a307..36f740c305 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SFTP/Commands/Get.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SFTP/Commands/Get.cs
@@ -41,13 +41,13 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriters.Write(Translate.DoTranslation("Downloading file {0}..."), false, KernelColorType.Progress, parameters.ArgumentsList[0]);
if (SFTPTransfer.SFTPGetFile(parameters.ArgumentsList[0]))
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(Translate.DoTranslation("Downloaded file {0}."), true, KernelColorType.Success, parameters.ArgumentsList[0]);
return 0;
}
else
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(Translate.DoTranslation("Download failed for file {0}."), true, KernelColorType.Error, parameters.ArgumentsList[0]);
return KernelExceptionTools.GetErrorCode(KernelExceptionType.SFTPFilesystem);
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SFTP/Commands/Put.cs b/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SFTP/Commands/Put.cs
index f4cac681bd..85bd2296ed 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SFTP/Commands/Put.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SFTP/Commands/Put.cs
@@ -48,13 +48,13 @@ public override int Execute(CommandParameters parameters, ref string variableVal
// Begin the uploading process
if (SFTPTransfer.SFTPUploadFile(parameters.ArgumentsList[0]))
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(CharManager.NewLine + Translate.DoTranslation("Uploaded file {0}"), true, KernelColorType.Success, parameters.ArgumentsList[0]);
return 0;
}
else
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextWriters.Write(CharManager.NewLine + Translate.DoTranslation("Failed to upload {0}"), true, KernelColorType.Error, parameters.ArgumentsList[0]);
return KernelExceptionTools.GetErrorCode(KernelExceptionType.SFTPFilesystem);
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SSH/SSHTools.cs b/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SSH/SSHTools.cs
index bb972faa5d..dd8ab30f45 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SSH/SSHTools.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.SftpShell/SSH/SSHTools.cs
@@ -38,6 +38,7 @@
using Terminaux.Base;
using Nitrocid.ConsoleBase.Inputs;
using Nitrocid.Network.Connections;
+using Terminaux.Reader;
namespace Nitrocid.Extras.SftpShell.SSH
{
@@ -105,7 +106,7 @@ public static ConnectionInfo PromptConnectionInfo(string Address, int Port, stri
DebugWriter.WriteDebug(DebugLevel.W, "Option is not valid. Returning...");
TextWriters.Write(Translate.DoTranslation("Specified option {0} is invalid."), true, KernelColorType.Error, Answer);
TextWriters.Write(Translate.DoTranslation("Press any key to go back."), true, KernelColorType.Error);
- Input.DetectKeypress();
+ TermReader.ReadKey();
break;
}
@@ -117,7 +118,7 @@ public static ConnectionInfo PromptConnectionInfo(string Address, int Port, stri
DebugWriter.WriteDebug(DebugLevel.W, "Answer is not numeric.");
TextWriters.Write(Translate.DoTranslation("The answer must be numeric."), true, KernelColorType.Error);
TextWriters.Write(Translate.DoTranslation("Press any key to go back."), true, KernelColorType.Error);
- Input.DetectKeypress();
+ TermReader.ReadKey();
}
}
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.SqlShell/Nitrocid.Extras.SqlShell.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.SqlShell/Nitrocid.Extras.SqlShell.csproj
index c87dd730d8..7f6b26a6f4 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.SqlShell/Nitrocid.Extras.SqlShell.csproj
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.SqlShell/Nitrocid.Extras.SqlShell.csproj
@@ -62,7 +62,7 @@
-
+
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.ThemeStudio/Studio/ThemeStudioApp.cs b/public/Nitrocid.Addons/Nitrocid.Extras.ThemeStudio/Studio/ThemeStudioApp.cs
index c132bd26a4..0ffbe88722 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.ThemeStudio/Studio/ThemeStudioApp.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.ThemeStudio/Studio/ThemeStudioApp.cs
@@ -30,10 +30,10 @@
using Nitrocid.Kernel.Events;
using Nitrocid.Languages;
using Terminaux.Colors;
-using Terminaux.Colors.Selector;
using Textify.General;
using Terminaux.Base;
using Nitrocid.ConsoleBase.Inputs;
+using Terminaux.Inputs.Styles;
namespace Nitrocid.Extras.ThemeStudio.Studio
{
@@ -83,7 +83,7 @@ public static void StartThemeStudio(string ThemeName)
TextWriterColor.Write(Translate.DoTranslation("Making a new theme \"{0}\".") + CharManager.NewLine, ThemeName);
// Prompt user
- int response = SelectionStyle.PromptSelection(TextTools.FormatString(Translate.DoTranslation("Making a new theme \"{0}\"."), ThemeName), choices, altChoices, true);
+ int response = SelectionStyle.PromptSelection(TextTools.FormatString(Translate.DoTranslation("Making a new theme \"{0}\"."), ThemeName), [.. choices], [.. altChoices], true);
DebugWriter.WriteDebug(DebugLevel.I, "Got response: {0}", response);
// Check for response integrity
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Timers/Timers/StopwatchScreen.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Timers/Timers/StopwatchScreen.cs
index e36170bf59..551de1ebc8 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Timers/Timers/StopwatchScreen.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Timers/Timers/StopwatchScreen.cs
@@ -28,6 +28,8 @@
using Terminaux.Inputs;
using Terminaux.Base.Buffered;
using Terminaux.Base;
+using Terminaux.Base.Extensions;
+using Terminaux.Reader;
namespace Nitrocid.Extras.Timers.Timers
{
@@ -98,7 +100,7 @@ public static void OpenStopwatch()
// Print informational messages
builder.Append(
TextWriterWhereColor.RenderWhere(status, 1, 0, false, KernelColorTools.GetColor(KernelColorType.NeutralText), KernelColorTools.GetColor(KernelColorType.Background)) +
- ConsoleExtensions.GetClearLineToRightSequence()
+ ConsoleClearing.GetClearLineToRightSequence()
);
// Print the laps list
@@ -134,12 +136,12 @@ public static void OpenStopwatch()
{
// Wait for a keypress
if (ConsoleWrapper.KeyAvailable)
- KeysKeypress = Input.DetectKeypress().Key;
+ KeysKeypress = TermReader.ReadKey().Key;
}
else
{
// Wait for a keypress
- KeysKeypress = Input.DetectKeypress().Key;
+ KeysKeypress = TermReader.ReadKey().Key;
}
// Check for a keypress
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Timers/Timers/TimerScreen.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Timers/Timers/TimerScreen.cs
index 9c147b7005..72554c81a1 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.Timers/Timers/TimerScreen.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.Timers/Timers/TimerScreen.cs
@@ -33,6 +33,7 @@
using Terminaux.Writer.FancyWriters;
using Terminaux.Colors;
using Terminaux.Base;
+using Terminaux.Reader;
namespace Nitrocid.Extras.Timers.Timers
{
@@ -177,12 +178,12 @@ public static void OpenTimer()
{
// Wait for a keypress
if (ConsoleWrapper.KeyAvailable)
- KeysKeypress = Input.DetectKeypress().Key;
+ KeysKeypress = TermReader.ReadKey().Key;
}
else
{
// Wait for a keypress
- KeysKeypress = Input.DetectKeypress().Key;
+ KeysKeypress = TermReader.ReadKey().Key;
}
// Check for a keypress
diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.UnitConv/Interactives/UnitConverterCli.cs b/public/Nitrocid.Addons/Nitrocid.Extras.UnitConv/Interactives/UnitConverterCli.cs
index d52766c2f6..28c731feb6 100644
--- a/public/Nitrocid.Addons/Nitrocid.Extras.UnitConv/Interactives/UnitConverterCli.cs
+++ b/public/Nitrocid.Addons/Nitrocid.Extras.UnitConv/Interactives/UnitConverterCli.cs
@@ -33,7 +33,7 @@ namespace Nitrocid.Extras.UnitConv.Interactives
///
/// Unit converter TUI class
///
- public class UnitConverterCli : BaseInteractiveTui, IInteractiveTui
+ public class UnitConverterCli : BaseInteractiveTui
diff --git a/public/Nitrocid.LocaleGen/Nitrocid.LocaleGen.csproj b/public/Nitrocid.LocaleGen/Nitrocid.LocaleGen.csproj
index 57640aa383..d46aa2cabb 100644
--- a/public/Nitrocid.LocaleGen/Nitrocid.LocaleGen.csproj
+++ b/public/Nitrocid.LocaleGen/Nitrocid.LocaleGen.csproj
@@ -160,7 +160,7 @@
-
+
diff --git a/public/Nitrocid/Arguments/Help/ArgumentHelpPrintTools.cs b/public/Nitrocid/Arguments/Help/ArgumentHelpPrintTools.cs
index 0cf7dc5e2b..43e82c6ecf 100644
--- a/public/Nitrocid/Arguments/Help/ArgumentHelpPrintTools.cs
+++ b/public/Nitrocid/Arguments/Help/ArgumentHelpPrintTools.cs
@@ -114,7 +114,7 @@ internal static void ShowHelpUsage(string argument)
DebugWriter.WriteDebug(DebugLevel.I, "Rendered argument: {0}", renderedArgument);
TextWriters.Write(renderedArgument, false, KernelColorType.ListEntry);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
else
TextWriters.Write(Translate.DoTranslation("Usage:") + $" {argument}", true, KernelColorType.ListEntry);
diff --git a/public/Nitrocid/ConsoleBase/ConsoleTools.cs b/public/Nitrocid/ConsoleBase/ConsoleTools.cs
index 9fb0dfef1a..e51303a3c0 100644
--- a/public/Nitrocid/ConsoleBase/ConsoleTools.cs
+++ b/public/Nitrocid/ConsoleBase/ConsoleTools.cs
@@ -29,10 +29,11 @@
using System;
using Textify.General;
using Terminaux.Base.Buffered;
-using Textify.Sequences.Builder;
+using Terminaux.Sequences.Builder;
using Nitrocid.Languages;
using Terminaux.Inputs;
using Terminaux.Writer.FancyWriters;
+using Terminaux.Reader;
namespace Nitrocid.ConsoleBase
{
@@ -94,7 +95,7 @@ public static void ResetBackground(bool useKernelColors = false)
if (useKernelColors)
KernelColorTools.SetConsoleColor(KernelColorType.Background, Background: true);
else
- ConsoleExtensions.ResetBackground();
+ ColorTools.ResetBackground();
}
///
@@ -106,7 +107,7 @@ public static void ResetForeground(bool useKernelColors = false)
if (useKernelColors)
KernelColorTools.SetConsoleColor(KernelColorType.NeutralText);
else
- ConsoleExtensions.ResetForeground();
+ ColorTools.ResetForeground();
}
internal static void PreviewMainBuffer()
@@ -215,7 +216,7 @@ internal static void ShowColorRampAndSet()
band.Append($"{new Color($"hsl:{Convert.ToInt32(h * hueThreshold)};100;50").VTSequenceBackground} ");
band.AppendLine();
band.Append(CharManager.GetEsc() + $"[49m");
- return TextWriterWhereColor.RenderWherePlain(TextTools.FormatString(band.ToString(), KernelPlatform.GetTerminalType(), KernelPlatform.GetTerminalEmulator()), 3, 3);
+ return TextWriterWhereColor.RenderWhere(TextTools.FormatString(band.ToString(), KernelPlatform.GetTerminalType(), KernelPlatform.GetTerminalEmulator()), 3, 3);
});
// Tell the user to select either Y or N
@@ -229,7 +230,7 @@ internal static void ShowColorRampAndSet()
ConsoleKey answer = ConsoleKey.None;
ScreenTools.Render();
while (answer != ConsoleKey.N && answer != ConsoleKey.Y)
- answer = Input.DetectKeypress().Key;
+ answer = TermReader.ReadKey().Key;
// Set the appropriate config
bool supports256Color = answer == ConsoleKey.Y;
diff --git a/public/Nitrocid/ConsoleBase/Themes/ThemePreviewTools.cs b/public/Nitrocid/ConsoleBase/Themes/ThemePreviewTools.cs
index 936d3380a7..1787ff346b 100644
--- a/public/Nitrocid/ConsoleBase/Themes/ThemePreviewTools.cs
+++ b/public/Nitrocid/ConsoleBase/Themes/ThemePreviewTools.cs
@@ -29,6 +29,8 @@
using Terminaux.Base;
using Terminaux.Inputs;
using Terminaux.Inputs.Styles.Selection;
+using Terminaux.Base.Extensions;
+using Terminaux.Reader;
namespace Nitrocid.ConsoleBase.Themes
{
@@ -81,7 +83,7 @@ internal static void PreviewThemeSimple(Dictionary color
// Give a prompt for theme preview
while (true)
{
- int prev = SelectionStyle.PromptSelection(Translate.DoTranslation("Here's how your theme will look like:"), choices, altChoices, true);
+ int prev = SelectionStyle.PromptSelection(Translate.DoTranslation("Here's how your theme will look like:"), [.. choices], [.. altChoices], true);
if (prev == choices.Count + 1)
break;
}
@@ -139,7 +141,7 @@ internal static void PreviewTheme(Dictionary colors, The
// Render the type name and some info
int typeY = ConsoleWrapper.WindowHeight - 6;
- TextWriterWhereColor.WriteWhere(ConsoleExtensions.GetClearLineToRightSequence(), 0, typeY);
+ TextWriterWhereColor.WriteWhere(ConsoleClearing.GetClearLineToRightSequence(), 0, typeY);
CenteredTextColor.WriteCentered(typeY, $"{colorType} - {colorInstance.PlainSequence} [{colorInstance.PlainSequenceTrueColor}]");
// Render the color box
@@ -153,7 +155,7 @@ internal static void PreviewTheme(Dictionary colors, The
BoxColor.WriteBox(startExteriorX + 1, startExteriorY, diffInteriorX, diffInteriorY, colorInstance);
// Wait for input
- var input = Input.DetectKeypress();
+ var input = TermReader.ReadKey();
switch (input.Key)
{
case ConsoleKey.Enter:
diff --git a/public/Nitrocid/ConsoleBase/Themes/ThemeTools.cs b/public/Nitrocid/ConsoleBase/Themes/ThemeTools.cs
index 4b20a9cc79..71d98e6907 100644
--- a/public/Nitrocid/ConsoleBase/Themes/ThemeTools.cs
+++ b/public/Nitrocid/ConsoleBase/Themes/ThemeTools.cs
@@ -279,7 +279,7 @@ public static bool Is255ColorsRequired(Dictionary colors
// Now, check for 255-color requirement
for (int key = 0; key < colors.Count; key++)
- if (colors.Values.ElementAt(key).Type == ColorType._255Color)
+ if (colors.Values.ElementAt(key).Type == ColorType.EightBitColor)
return true;
// Else, 255 color support is not required
diff --git a/public/Nitrocid/ConsoleBase/Writers/TextDynamicWriters.cs b/public/Nitrocid/ConsoleBase/Writers/TextDynamicWriters.cs
index dc004d7491..2649c617df 100644
--- a/public/Nitrocid/ConsoleBase/Writers/TextDynamicWriters.cs
+++ b/public/Nitrocid/ConsoleBase/Writers/TextDynamicWriters.cs
@@ -24,6 +24,7 @@
using System;
using System.Threading;
using Terminaux.Writer.ConsoleWriters;
+using Terminaux.Writer.DynamicWriters;
namespace Nitrocid.ConsoleBase.Writers
{
diff --git a/public/Nitrocid/ConsoleBase/Writers/TextFancyWriters.cs b/public/Nitrocid/ConsoleBase/Writers/TextFancyWriters.cs
index 55568b3b79..84135045bb 100644
--- a/public/Nitrocid/ConsoleBase/Writers/TextFancyWriters.cs
+++ b/public/Nitrocid/ConsoleBase/Writers/TextFancyWriters.cs
@@ -569,7 +569,7 @@ public static void WriteFiglet(string Text, FigletizeFont FigletFont, KernelColo
{
try
{
- TextWriterColor.WritePlain(FigletColor.RenderFigletPlain(Text, FigletFont, KernelColorTools.GetColor(ColTypes), KernelColorTools.GetColor(KernelColorType.Background), Vars), false);
+ TextWriterRaw.WritePlain(FigletColor.RenderFigletPlain(Text, FigletFont, KernelColorTools.GetColor(ColTypes), KernelColorTools.GetColor(KernelColorType.Background), Vars), false);
}
catch (Exception ex) when (ex.GetType().Name != nameof(ThreadInterruptedException))
{
@@ -590,7 +590,7 @@ public static void WriteFiglet(string Text, FigletizeFont FigletFont, KernelColo
{
try
{
- TextWriterColor.WritePlain(FigletColor.RenderFigletPlain(Text, FigletFont, KernelColorTools.GetColor(colorTypeForeground), KernelColorTools.GetColor(colorTypeBackground), Vars), false);
+ TextWriterRaw.WritePlain(FigletColor.RenderFigletPlain(Text, FigletFont, KernelColorTools.GetColor(colorTypeForeground), KernelColorTools.GetColor(colorTypeBackground), Vars), false);
}
catch (Exception ex) when (ex.GetType().Name != nameof(ThreadInterruptedException))
{
@@ -791,7 +791,7 @@ public static void WriteProgress(double Progress, int Left, int Top, int LeftWid
{
try
{
- TextWriterColor.WritePlain(ProgressBarColor.RenderProgress(Progress, Left, Top, LeftWidthOffset, RightWidthOffset, KernelColorTools.GetColor(ProgressColor), KernelColorTools.GetColor(FrameColor), KernelColorTools.GetColor(BackgroundColor), DrawBorder, Targeted));
+ TextWriterRaw.WritePlain(ProgressBarColor.RenderProgress(Progress, Left, Top, LeftWidthOffset, RightWidthOffset, KernelColorTools.GetColor(ProgressColor), KernelColorTools.GetColor(FrameColor), KernelColorTools.GetColor(BackgroundColor), DrawBorder, Targeted));
}
catch (Exception ex) when (ex.GetType().Name != nameof(ThreadInterruptedException))
{
@@ -876,7 +876,7 @@ public static void WriteVerticalProgress(double Progress, int Left, int Top, int
{
try
{
- TextWriterColor.WritePlain(ProgressBarVerticalColor.RenderVerticalProgress(Progress, Left, Top, TopHeightOffset, BottomHeightOffset, KernelColorTools.GetColor(ProgressColor), KernelColorTools.GetColor(FrameColor), DrawBorder));
+ TextWriterRaw.WritePlain(ProgressBarVerticalColor.RenderVerticalProgress(Progress, Left, Top, TopHeightOffset, BottomHeightOffset, KernelColorTools.GetColor(ProgressColor), KernelColorTools.GetColor(FrameColor), DrawBorder));
}
catch (Exception ex) when (ex.GetType().Name != nameof(ThreadInterruptedException))
{
diff --git a/public/Nitrocid/ConsoleBase/Writers/TextWriters.cs b/public/Nitrocid/ConsoleBase/Writers/TextWriters.cs
index 58369e5660..92639424e7 100644
--- a/public/Nitrocid/ConsoleBase/Writers/TextWriters.cs
+++ b/public/Nitrocid/ConsoleBase/Writers/TextWriters.cs
@@ -123,14 +123,14 @@ public static void Write(string Text, bool Line, bool Highlight, KernelColorType
// Write the text to console
if (Highlight)
{
- TextWriterColor.WritePlain(Text, false, vars);
+ TextWriterRaw.WritePlain(Text, false, vars);
KernelColorTools.SetConsoleColorDry(colorType);
KernelColorTools.SetConsoleColorDry(KernelColorType.Background, true);
- TextWriterColor.WritePlain("", Line);
+ TextWriterRaw.WritePlain("", Line);
}
else
{
- TextWriterColor.WritePlain(Text, Line, vars);
+ TextWriterRaw.WritePlain(Text, Line, vars);
}
}
catch (Exception ex) when (ex.GetType().Name != nameof(ThreadInterruptedException))
@@ -184,14 +184,14 @@ public static void Write(string Text, bool Line, bool Highlight, KernelColorType
// Write the text to console
if (Highlight)
{
- TextWriterColor.WritePlain(Text, false, vars);
+ TextWriterRaw.WritePlain(Text, false, vars);
KernelColorTools.SetConsoleColorDry(colorTypeForeground);
KernelColorTools.SetConsoleColorDry(colorTypeBackground, true);
- TextWriterColor.WritePlain("", Line);
+ TextWriterRaw.WritePlain("", Line);
}
else
{
- TextWriterColor.WritePlain(Text, Line, vars);
+ TextWriterRaw.WritePlain(Text, Line, vars);
}
}
catch (Exception ex) when (ex.GetType().Name != nameof(ThreadInterruptedException))
diff --git a/public/Nitrocid/Drivers/Console/BaseConsoleDriver.cs b/public/Nitrocid/Drivers/Console/BaseConsoleDriver.cs
index f05b379a88..a64d61dd08 100644
--- a/public/Nitrocid/Drivers/Console/BaseConsoleDriver.cs
+++ b/public/Nitrocid/Drivers/Console/BaseConsoleDriver.cs
@@ -22,13 +22,14 @@
using System.Threading;
using SystemConsole = System.Console;
using TextEncoding = System.Text.Encoding;
-using Textify.Sequences.Builder.Types;
+using Terminaux.Sequences.Builder.Types;
using Nitrocid.Kernel;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Languages;
using Terminaux.Writer.ConsoleWriters;
using Terminaux.Colors;
using System.Runtime.Serialization;
+using Terminaux.Writer.DynamicWriters;
namespace Nitrocid.Drivers.Console
{
@@ -408,7 +409,7 @@ public virtual void WritePlain(string Text, bool Line, params object[] vars)
///
public virtual void WritePlain() =>
- TextWriterColor.Write();
+ TextWriterRaw.Write();
///
public virtual void WriteSlowlyPlain(string msg, bool Line, double MsEachLetter, params object[] vars) =>
@@ -428,15 +429,15 @@ public virtual void WriteWherePlain(string msg, int Left, int Top, bool Return,
///
public virtual string RenderWherePlain(string msg, int Left, int Top, params object[] vars) =>
- TextWriterWhereColor.RenderWherePlain(msg, Left, Top, false, 0, vars);
+ TextWriterWhereColor.RenderWhere(msg, Left, Top, false, 0, vars);
///
public virtual string RenderWherePlain(string msg, int Left, int Top, bool Return, params object[] vars) =>
- TextWriterWhereColor.RenderWherePlain(msg, Left, Top, Return, 0, vars);
+ TextWriterWhereColor.RenderWhere(msg, Left, Top, Return, 0, vars);
///
public virtual string RenderWherePlain(string msg, int Left, int Top, bool Return, int RightMargin, params object[] vars) =>
- TextWriterWhereColor.RenderWherePlain(msg, Left, Top, Return, RightMargin, vars);
+ TextWriterWhereColor.RenderWhere(msg, Left, Top, Return, RightMargin, vars);
///
public virtual void WriteWhereSlowlyPlain(string msg, bool Line, int Left, int Top, double MsEachLetter, params object[] vars) =>
diff --git a/public/Nitrocid/Drivers/Console/Bases/File.cs b/public/Nitrocid/Drivers/Console/Bases/File.cs
index caa4150879..de8e2a5213 100644
--- a/public/Nitrocid/Drivers/Console/Bases/File.cs
+++ b/public/Nitrocid/Drivers/Console/Bases/File.cs
@@ -21,7 +21,7 @@
using System.IO;
using System.Linq;
using System.Threading;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences;
using TextEncoding = System.Text.Encoding;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Files.Operations;
diff --git a/public/Nitrocid/Drivers/Console/Bases/FileSequence.cs b/public/Nitrocid/Drivers/Console/Bases/FileSequence.cs
index 2b94ece9e8..e49af3a109 100644
--- a/public/Nitrocid/Drivers/Console/Bases/FileSequence.cs
+++ b/public/Nitrocid/Drivers/Console/Bases/FileSequence.cs
@@ -21,7 +21,7 @@
using System.IO;
using System.Linq;
using System.Threading;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences;
using TextEncoding = System.Text.Encoding;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Files.Operations;
diff --git a/public/Nitrocid/Drivers/Console/Bases/TerminalDebug.cs b/public/Nitrocid/Drivers/Console/Bases/TerminalDebug.cs
index 4427e24e17..1cb4fad7e2 100644
--- a/public/Nitrocid/Drivers/Console/Bases/TerminalDebug.cs
+++ b/public/Nitrocid/Drivers/Console/Bases/TerminalDebug.cs
@@ -18,7 +18,7 @@
//
using Nitrocid.Kernel.Debugging;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences;
namespace Nitrocid.Drivers.Console.Bases
{
diff --git a/public/Nitrocid/Drivers/Console/Bases/TerminalMonoCompat.cs b/public/Nitrocid/Drivers/Console/Bases/TerminalMonoCompat.cs
index cfe267e328..2e172856be 100644
--- a/public/Nitrocid/Drivers/Console/Bases/TerminalMonoCompat.cs
+++ b/public/Nitrocid/Drivers/Console/Bases/TerminalMonoCompat.cs
@@ -22,6 +22,7 @@
using System;
using System.Threading;
using Terminaux.Base;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Drivers.Console.Bases
{
@@ -41,7 +42,7 @@ public override void WritePlain(string Text, bool Line, params object[] vars)
{
// Get the filtered positions first.
int FilteredLeft = default, FilteredTop = default;
- var pos = ConsoleExtensions.GetFilteredPositions(Text, Line, vars);
+ var pos = ConsolePositioning.GetFilteredPositions(Text, Line, vars);
FilteredLeft = pos.Item1;
FilteredTop = pos.Item2;
diff --git a/public/Nitrocid/Drivers/Filesystem/BaseFilesystemDriver.cs b/public/Nitrocid/Drivers/Filesystem/BaseFilesystemDriver.cs
index 677b692293..5b34eace66 100644
--- a/public/Nitrocid/Drivers/Filesystem/BaseFilesystemDriver.cs
+++ b/public/Nitrocid/Drivers/Filesystem/BaseFilesystemDriver.cs
@@ -491,7 +491,7 @@ public virtual void DisplayInHex(byte ByteContent, bool HighlightResults, long S
ByteNumberEachSixteen = 1;
}
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
else if (StartByte > FileByte.LongLength)
{
@@ -1397,7 +1397,7 @@ public virtual void PrintDirectoryInfo(FileSystemEntry DirectoryInfo, bool ShowD
TextWriters.Write(": ", false, KernelColorType.ListEntry);
TextWriters.Write(Translate.DoTranslation("{0}, Created in {1} {2}, Modified in {3} {4}"), false, KernelColorType.ListValue, TotalSize.SizeString(), finalDirInfo.CreationTime.ToShortDateString(), finalDirInfo.CreationTime.ToShortTimeString(), finalDirInfo.LastWriteTime.ToShortDateString(), finalDirInfo.LastWriteTime.ToShortTimeString());
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
}
else
@@ -1435,7 +1435,7 @@ public virtual void PrintFileInfo(FileSystemEntry FileInfo, bool ShowFileDetails
{
TextWriters.Write(Translate.DoTranslation("{0}, Created in {1} {2}, Modified in {3} {4}"), false, KernelColorType.ListValue, ((FileInfo)FileInfo.BaseEntry).Length.SizeString(), FileInfo.BaseEntry.CreationTime.ToShortDateString(), FileInfo.BaseEntry.CreationTime.ToShortTimeString(), FileInfo.BaseEntry.LastWriteTime.ToShortDateString(), FileInfo.BaseEntry.LastWriteTime.ToShortTimeString());
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
}
else
diff --git a/public/Nitrocid/Drivers/Network/BaseNetworkDriver.cs b/public/Nitrocid/Drivers/Network/BaseNetworkDriver.cs
index 975f1c7ac9..bf1516dc0d 100644
--- a/public/Nitrocid/Drivers/Network/BaseNetworkDriver.cs
+++ b/public/Nitrocid/Drivers/Network/BaseNetworkDriver.cs
@@ -153,7 +153,7 @@ public virtual bool DownloadFile(string URL, bool ShowProgress, string FileName)
// We're done downloading. Check to see if it's actually an error
NetworkTools.TransferFinished = false;
if (ShowProgress & !NetworkTransfer.SuppressDownloadMessage)
- TextWriterColor.Write();
+ TextWriterRaw.Write();
NetworkTransfer.SuppressDownloadMessage = false;
if (NetworkTransfer.IsError)
{
@@ -252,7 +252,7 @@ public virtual string DownloadString(string URL, bool ShowProgress)
// We're done downloading. Check to see if it's actually an error
NetworkTools.TransferFinished = false;
if (ShowProgress & !NetworkTransfer.SuppressDownloadMessage)
- TextWriterColor.Write();
+ TextWriterRaw.Write();
NetworkTransfer.SuppressDownloadMessage = false;
if (NetworkTransfer.IsError)
{
@@ -325,7 +325,7 @@ public virtual bool UploadFile(string FileName, string URL, bool ShowProgress)
// We're done uploading. Check to see if it's actually an error
NetworkTools.TransferFinished = false;
if (ShowProgress & !NetworkTransfer.SuppressUploadMessage)
- TextWriterColor.Write();
+ TextWriterRaw.Write();
NetworkTransfer.SuppressUploadMessage = false;
if (NetworkTransfer.IsError)
{
@@ -392,7 +392,7 @@ public virtual bool UploadString(string URL, string Data, bool ShowProgress)
// We're done uploading. Check to see if it's actually an error
NetworkTools.TransferFinished = false;
if (ShowProgress & !NetworkTransfer.SuppressUploadMessage)
- TextWriterColor.Write();
+ TextWriterRaw.Write();
NetworkTransfer.SuppressUploadMessage = false;
if (NetworkTransfer.IsError)
{
diff --git a/public/Nitrocid/Files/Editors/HexEdit/HexEditInteractive.cs b/public/Nitrocid/Files/Editors/HexEdit/HexEditInteractive.cs
index 324e30f233..d995d8474f 100644
--- a/public/Nitrocid/Files/Editors/HexEdit/HexEditInteractive.cs
+++ b/public/Nitrocid/Files/Editors/HexEdit/HexEditInteractive.cs
@@ -21,8 +21,8 @@
using System.Globalization;
using System.Linq;
using System.Text;
-using Textify.Sequences.Builder.Types;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences.Builder.Types;
+using Terminaux.Sequences;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Shell.Shells.Hex;
using Nitrocid.Files.Operations;
@@ -40,6 +40,8 @@
using Terminaux.Colors;
using Terminaux.Base;
using Terminaux.Inputs;
+using Terminaux.Reader;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Files.Editors.HexEdit
{
@@ -112,7 +114,7 @@ internal static void OpenInteractive(string file, ref byte[] bytes)
// Wait for a keypress
ScreenTools.Render(screen);
- var keypress = Input.DetectKeypress();
+ var keypress = TermReader.ReadKey();
HandleKeypress(keypress, ref bytes);
// Reset, in case selection changed
@@ -155,7 +157,7 @@ private static void RenderKeybindings(ref Screen screen)
$"{InteractiveTuiStatus.OptionForegroundColor.VTSequenceForeground}" +
$"{InteractiveTuiStatus.BackgroundColor.VTSequenceBackground}" +
$" {(binding._localizable ? Translate.DoTranslation(binding.Name) : binding.Name)} " +
- ConsoleExtensions.GetClearLineToRightSequence()
+ ConsoleClearing.GetClearLineToRightSequence()
);
}
else
@@ -167,7 +169,7 @@ private static void RenderKeybindings(ref Screen screen)
$"{InteractiveTuiStatus.KeyBindingOptionColor.VTSequenceForeground}" +
$"{InteractiveTuiStatus.OptionBackgroundColor.VTSequenceBackground}" +
" K " +
- ConsoleExtensions.GetClearLineToRightSequence()
+ ConsoleClearing.GetClearLineToRightSequence()
);
break;
}
@@ -187,7 +189,7 @@ private static void RenderStatus(ref Screen screen)
builder.Append(
$"{InteractiveTuiStatus.ForegroundColor.VTSequenceForeground}" +
$"{InteractiveTuiStatus.BackgroundColor.VTSequenceBackground}" +
- $"{TextWriterWhereColor.RenderWherePlain(status + ConsoleExtensions.GetClearLineToRightSequence(), 0, 0)}"
+ $"{TextWriterWhereColor.RenderWhere(status + ConsoleClearing.GetClearLineToRightSequence(), 0, 0)}"
);
return builder.ToString();
});
@@ -245,7 +247,7 @@ private static void RenderContentsInHexWithSelection(int byteIdx, ref Screen scr
builder.Append(
$"{InteractiveTuiStatus.ForegroundColor.VTSequenceForeground}" +
$"{InteractiveTuiStatus.BackgroundColor.VTSequenceBackground}" +
- $"{TextWriterWhereColor.RenderWherePlain(rendered, 1, 2)}"
+ $"{TextWriterWhereColor.RenderWhere(rendered, 1, 2)}"
);
return builder.ToString();
});
diff --git a/public/Nitrocid/Files/Editors/TextEdit/TextEditInteractive.cs b/public/Nitrocid/Files/Editors/TextEdit/TextEditInteractive.cs
index 41e459930f..b690fa9659 100644
--- a/public/Nitrocid/Files/Editors/TextEdit/TextEditInteractive.cs
+++ b/public/Nitrocid/Files/Editors/TextEdit/TextEditInteractive.cs
@@ -20,8 +20,8 @@
using System;
using System.Linq;
using System.Text;
-using Textify.Sequences.Tools;
-using Textify.Sequences.Builder.Types;
+using Terminaux.Sequences;
+using Terminaux.Sequences.Builder.Types;
using System.Collections.Generic;
using Nitrocid.Shell.Shells.Text;
using Nitrocid.Kernel.Debugging;
@@ -38,6 +38,8 @@
using Terminaux.Colors;
using Terminaux.Base;
using Terminaux.Inputs;
+using Terminaux.Reader;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Files.Editors.TextEdit
{
@@ -115,7 +117,7 @@ internal static void OpenInteractive(string file, ref List lines)
// Wait for a keypress
ScreenTools.Render(screen);
- var keypress = Input.DetectKeypress();
+ var keypress = TermReader.ReadKey();
HandleKeypress(keypress, ref lines);
// Reset, in case selection changed
@@ -159,7 +161,7 @@ private static void RenderKeybindings(ref Screen screen)
$"{InteractiveTuiStatus.OptionForegroundColor.VTSequenceForeground}" +
$"{InteractiveTuiStatus.BackgroundColor.VTSequenceBackground}" +
$" {(binding._localizable ? Translate.DoTranslation(binding.Name) : binding.Name)} " +
- ConsoleExtensions.GetClearLineToRightSequence()
+ ConsoleClearing.GetClearLineToRightSequence()
);
}
else
@@ -171,7 +173,7 @@ private static void RenderKeybindings(ref Screen screen)
$"{InteractiveTuiStatus.KeyBindingOptionColor.VTSequenceForeground}" +
$"{InteractiveTuiStatus.OptionBackgroundColor.VTSequenceBackground}" +
" K " +
- ConsoleExtensions.GetClearLineToRightSequence()
+ ConsoleClearing.GetClearLineToRightSequence()
);
break;
}
@@ -191,7 +193,7 @@ private static void RenderStatus(ref Screen screen)
builder.Append(
$"{InteractiveTuiStatus.ForegroundColor.VTSequenceForeground}" +
$"{InteractiveTuiStatus.BackgroundColor.VTSequenceBackground}" +
- $"{TextWriterWhereColor.RenderWherePlain(status + ConsoleExtensions.GetClearLineToRightSequence(), 0, 0)}"
+ $"{TextWriterWhereColor.RenderWhere(status + ConsoleClearing.GetClearLineToRightSequence(), 0, 0)}"
);
return builder.ToString();
});
diff --git a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/CharSettingsKeyInput.cs b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/CharSettingsKeyInput.cs
index dd1ec47da5..b9a0c0eb8d 100644
--- a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/CharSettingsKeyInput.cs
+++ b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/CharSettingsKeyInput.cs
@@ -26,6 +26,7 @@
using Textify.General;
using Terminaux.Base;
using Terminaux.Inputs;
+using Terminaux.Reader;
namespace Nitrocid.Kernel.Configuration.Settings.KeyInputs
{
@@ -44,7 +45,7 @@ public object PromptForSet(SettingsKey key, object KeyDefaultValue, out bool bai
// Write the prompt
TextWriters.Write($"{Translate.DoTranslation("Press any letter on your keyboard to set it to that character.")}\n", KernelColorType.Tip);
TextWriters.Write("[{0}] ", false, KernelColorType.Input, KeyDefaultValue);
- var keypressTerm = Input.DetectKeypress();
+ var keypressTerm = TermReader.ReadKey();
var keypress = keypressTerm.KeyChar;
keypress =
CharManager.IsControlChar(keypress) ? '\0' :
diff --git a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/ColorSettingsKeyInput.cs b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/ColorSettingsKeyInput.cs
index 58e76cfec8..2f52469f76 100644
--- a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/ColorSettingsKeyInput.cs
+++ b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/ColorSettingsKeyInput.cs
@@ -24,7 +24,7 @@
using System.Linq;
using Terminaux.Colors;
using Terminaux.Colors.Data;
-using Terminaux.Colors.Selector;
+using Terminaux.Inputs.Styles;
namespace Nitrocid.Kernel.Configuration.Settings.KeyInputs
{
diff --git a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/DoubleSettingsKeyInput.cs b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/DoubleSettingsKeyInput.cs
index da9c1d5407..e9643b23d4 100644
--- a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/DoubleSettingsKeyInput.cs
+++ b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/DoubleSettingsKeyInput.cs
@@ -25,6 +25,7 @@
using Terminaux.Base;
using Terminaux.Inputs;
using Terminaux.Inputs.Styles.Infobox;
+using Terminaux.Reader;
namespace Nitrocid.Kernel.Configuration.Settings.KeyInputs
{
@@ -86,7 +87,7 @@ public void SetValue(SettingsKey key, object value, BaseKernelConfig configType)
DebugWriter.WriteDebug(DebugLevel.W, "Negative values are disallowed.");
TextWriters.Write(Translate.DoTranslation("The answer may not be negative."), true, KernelColorType.Error);
TextWriters.Write(Translate.DoTranslation("Press any key to go back."), true, KernelColorType.Error);
- Input.DetectKeypress();
+ TermReader.ReadKey();
}
}
diff --git a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/IntSettingsKeyInput.cs b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/IntSettingsKeyInput.cs
index aa5e08289a..2b792801c6 100644
--- a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/IntSettingsKeyInput.cs
+++ b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/IntSettingsKeyInput.cs
@@ -25,6 +25,7 @@
using Terminaux.Base;
using Terminaux.Inputs;
using Terminaux.Inputs.Styles.Infobox;
+using Terminaux.Reader;
namespace Nitrocid.Kernel.Configuration.Settings.KeyInputs
{
@@ -86,7 +87,7 @@ public void SetValue(SettingsKey key, object value, BaseKernelConfig configType)
DebugWriter.WriteDebug(DebugLevel.W, "Negative values are disallowed.");
TextWriters.Write(Translate.DoTranslation("The answer may not be negative."), true, KernelColorType.Error);
TextWriters.Write(Translate.DoTranslation("Press any key to go back."), true, KernelColorType.Error);
- Input.DetectKeypress();
+ TermReader.ReadKey();
}
}
diff --git a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/IntSliderSettingsKeyInput.cs b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/IntSliderSettingsKeyInput.cs
index ef65af4979..61b0d810a7 100644
--- a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/IntSliderSettingsKeyInput.cs
+++ b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/IntSliderSettingsKeyInput.cs
@@ -26,6 +26,7 @@
using System;
using Terminaux.Base;
using Terminaux.Inputs;
+using Terminaux.Reader;
namespace Nitrocid.Kernel.Configuration.Settings.KeyInputs
{
@@ -50,7 +51,7 @@ public object PromptForSet(SettingsKey key, object KeyDefaultValue, out bool bai
InfoBoxProgressColor.WriteInfoBoxProgress(key.Name, slider, Translate.DoTranslation("Current value:") + " {0} / {1} - {2}", CurrentValue, key.MinimumValue, key.MaximumValue);
// Parse the user input
- PressedKey = Input.DetectKeypress();
+ PressedKey = TermReader.ReadKey();
switch (PressedKey.Key)
{
case ConsoleKey.Home:
diff --git a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/ListSettingsKeyInput.cs b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/ListSettingsKeyInput.cs
index 9448d02f1e..9ede404e9d 100644
--- a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/ListSettingsKeyInput.cs
+++ b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/ListSettingsKeyInput.cs
@@ -66,7 +66,7 @@ public object PromptForSet(SettingsKey key, object KeyDefaultValue, out bool bai
];
// Wait for an answer and handle it
- int selectionAnswer = SelectionStyle.PromptSelection(finalSection, choices, altChoices, true);
+ int selectionAnswer = SelectionStyle.PromptSelection(finalSection, [.. choices], [.. altChoices], true);
if (selectionAnswer == choices.Count + 1)
promptBail = true;
else
diff --git a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/SelectionSettingsKeyInput.cs b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/SelectionSettingsKeyInput.cs
index 777101cd42..2e8bc7b65a 100644
--- a/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/SelectionSettingsKeyInput.cs
+++ b/public/Nitrocid/Kernel/Configuration/Settings/KeyInputs/SelectionSettingsKeyInput.cs
@@ -30,6 +30,7 @@
using System.Linq;
using System.Reflection;
using Terminaux.Inputs;
+using Terminaux.Reader;
namespace Nitrocid.Kernel.Configuration.Settings.KeyInputs
{
@@ -147,7 +148,7 @@ public void SetValue(SettingsKey key, object value, BaseKernelConfig configType)
DebugWriter.WriteDebug(DebugLevel.W, "Answer is not valid.");
TextWriters.Write(Translate.DoTranslation("The answer may not exceed the entries shown."), true, KernelColorType.Error);
TextWriters.Write(Translate.DoTranslation("Press any key to go back."), true, KernelColorType.Error);
- Input.DetectKeypress();
+ TermReader.ReadKey();
}
}
else if (AnswerInt == 0 & !SelectionEnumZeroBased)
@@ -155,14 +156,14 @@ public void SetValue(SettingsKey key, object value, BaseKernelConfig configType)
DebugWriter.WriteDebug(DebugLevel.W, "Zero is not allowed.");
TextWriters.Write(Translate.DoTranslation("The answer may not be zero."), true, KernelColorType.Error);
TextWriters.Write(Translate.DoTranslation("Press any key to go back."), true, KernelColorType.Error);
- Input.DetectKeypress();
+ TermReader.ReadKey();
}
else
{
DebugWriter.WriteDebug(DebugLevel.W, "Negative values are disallowed.");
TextWriters.Write(Translate.DoTranslation("The answer may not be negative."), true, KernelColorType.Error);
TextWriters.Write(Translate.DoTranslation("Press any key to go back."), true, KernelColorType.Error);
- Input.DetectKeypress();
+ TermReader.ReadKey();
}
}
diff --git a/public/Nitrocid/Kernel/Configuration/Settings/SettingsApp.cs b/public/Nitrocid/Kernel/Configuration/Settings/SettingsApp.cs
index 60da20d542..8715e95f71 100644
--- a/public/Nitrocid/Kernel/Configuration/Settings/SettingsApp.cs
+++ b/public/Nitrocid/Kernel/Configuration/Settings/SettingsApp.cs
@@ -33,6 +33,7 @@
using Textify.General;
using Terminaux.Base;
using Terminaux.Inputs;
+using Terminaux.Reader;
namespace Nitrocid.Kernel.Configuration.Settings
{
@@ -209,7 +210,7 @@ public static void OpenSection(string Section, SettingsEntry SettingsSection, Ba
// Prompt user and check for input
string finalSection = SectionTranslateName ? Translate.DoTranslation(SectionDisplayName) : SectionDisplayName;
int Answer = SelectionStyle.PromptSelection(RenderHeader(finalSection, Translate.DoTranslation(SectionDescription), Notes),
- sections, altSections);
+ [.. sections], [.. altSections]);
// We need to check for exit early
if (Answer == -1)
@@ -240,7 +241,7 @@ public static void OpenSection(string Section, SettingsEntry SettingsSection, Ba
DebugWriter.WriteDebug(DebugLevel.W, "Option is not valid. Returning...");
TextWriters.Write(Translate.DoTranslation("Specified option {0} is invalid."), true, KernelColorType.Error, Answer);
TextWriters.Write(Translate.DoTranslation("Press any key to go back."), true, KernelColorType.Error);
- Input.DetectKeypress();
+ TermReader.ReadKey();
}
}
}
@@ -328,7 +329,7 @@ public static void VariableFinder(BaseKernelConfig configType)
while (sel != Results.Count + 1)
{
// Prompt for setting
- sel = SelectionStyle.PromptSelection(Translate.DoTranslation("These settings are found. Please select one."), Results, Back);
+ sel = SelectionStyle.PromptSelection(Translate.DoTranslation("These settings are found. Please select one."), [.. Results], [.. Back]);
// If pressed back, bail
if (sel == Results.Count + 1 || sel == -1)
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliDoublePaneSlowTestData.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliDoublePaneSlowTestData.cs
index 2f0b1b422a..e6e53fc35c 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliDoublePaneSlowTestData.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliDoublePaneSlowTestData.cs
@@ -25,7 +25,7 @@
namespace Nitrocid.Kernel.Debugging.Testing.Facades.FacadeData
{
- internal class CliDoublePaneSlowTestData : BaseInteractiveTui, IInteractiveTui
+ internal class CliDoublePaneSlowTestData : BaseInteractiveTui, IInteractiveTui
{
internal static List strings = [];
internal static List strings2 = [];
@@ -38,11 +38,11 @@ internal class CliDoublePaneSlowTestData : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
strings;
///
- public override IEnumerable SecondaryDataSource =>
+ public override IEnumerable SecondaryDataSource =>
strings2;
///
@@ -54,9 +54,9 @@ internal class CliDoublePaneSlowTestData : BaseInteractiveTui, IInteractiveTui
true;
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(string item)
{
- string selected = (string)item;
+ string selected = item;
// Check to see if we're given the test info
if (string.IsNullOrEmpty(selected))
@@ -66,9 +66,9 @@ public override void RenderStatus(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(string item)
{
- string selected = (string)item;
+ string selected = item;
return selected;
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliDoublePaneTestData.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliDoublePaneTestData.cs
index 739d7e45c7..0dd8461c34 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliDoublePaneTestData.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliDoublePaneTestData.cs
@@ -25,7 +25,7 @@
namespace Nitrocid.Kernel.Debugging.Testing.Facades.FacadeData
{
- internal class CliDoublePaneTestData : BaseInteractiveTui, IInteractiveTui
+ internal class CliDoublePaneTestData : BaseInteractiveTui, IInteractiveTui
{
internal static List strings = [];
internal static List strings2 = [];
@@ -38,11 +38,11 @@ internal class CliDoublePaneTestData : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
strings;
///
- public override IEnumerable SecondaryDataSource =>
+ public override IEnumerable SecondaryDataSource =>
strings2;
public override bool SecondPaneInteractable =>
@@ -53,9 +53,9 @@ internal class CliDoublePaneTestData : BaseInteractiveTui, IInteractiveTui
true;
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(string item)
{
- string selected = (string)item;
+ string selected = item;
// Check to see if we're given the test info
if (string.IsNullOrEmpty(selected))
@@ -65,9 +65,9 @@ public override void RenderStatus(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(string item)
{
- string selected = (string)item;
+ string selected = item;
return selected;
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneSlowTestData.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneSlowTestData.cs
index e978d6fd34..c7205e8121 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneSlowTestData.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneSlowTestData.cs
@@ -25,7 +25,7 @@
namespace Nitrocid.Kernel.Debugging.Testing.Facades.FacadeData
{
- internal class CliInfoPaneSlowTestData : BaseInteractiveTui, IInteractiveTui
+ internal class CliInfoPaneSlowTestData : BaseInteractiveTui, IInteractiveTui
{
internal static List strings = [];
@@ -37,7 +37,7 @@ internal class CliInfoPaneSlowTestData : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
strings;
///
@@ -45,9 +45,9 @@ internal class CliInfoPaneSlowTestData : BaseInteractiveTui, IInteractiveTui
true;
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(string item)
{
- string selected = (string)item;
+ string selected = item;
// Check to see if we're given the test info
if (string.IsNullOrEmpty(selected))
@@ -60,9 +60,9 @@ public override string GetInfoFromItem(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(string item)
{
- string selected = (string)item;
+ string selected = item;
return selected;
}
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneSlowTestRefreshingData.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneSlowTestRefreshingData.cs
index a47d3c5fd3..56a51928b1 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneSlowTestRefreshingData.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneSlowTestRefreshingData.cs
@@ -25,7 +25,7 @@
namespace Nitrocid.Kernel.Debugging.Testing.Facades.FacadeData
{
- internal class CliInfoPaneSlowTestRefreshingData : BaseInteractiveTui, IInteractiveTui
+ internal class CliInfoPaneSlowTestRefreshingData : BaseInteractiveTui, IInteractiveTui
{
internal static List strings = [];
private static int timesRendered = 0;
@@ -42,7 +42,7 @@ internal class CliInfoPaneSlowTestRefreshingData : BaseInteractiveTui, IInteract
3000;
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
strings;
///
@@ -50,10 +50,10 @@ internal class CliInfoPaneSlowTestRefreshingData : BaseInteractiveTui, IInteract
true;
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(string item)
{
// Some variables
- string selected = (string)item;
+ string selected = item;
timesRendered++;
// Check to see if we're given the test info
@@ -67,9 +67,9 @@ public override string GetInfoFromItem(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(string item)
{
- string selected = (string)item;
+ string selected = item;
return selected;
}
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneTestData.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneTestData.cs
index 3c313ab97f..c8e6d8b6f0 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneTestData.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneTestData.cs
@@ -25,7 +25,7 @@
namespace Nitrocid.Kernel.Debugging.Testing.Facades.FacadeData
{
- internal class CliInfoPaneTestData : BaseInteractiveTui, IInteractiveTui
+ internal class CliInfoPaneTestData : BaseInteractiveTui, IInteractiveTui
{
internal static List strings = [];
@@ -37,7 +37,7 @@ internal class CliInfoPaneTestData : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
strings;
///
@@ -45,9 +45,9 @@ internal class CliInfoPaneTestData : BaseInteractiveTui, IInteractiveTui
true;
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(string item)
{
- string selected = (string)item;
+ string selected = item;
// Check to see if we're given the test info
if (string.IsNullOrEmpty(selected))
@@ -60,9 +60,9 @@ public override string GetInfoFromItem(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(string item)
{
- string selected = (string)item;
+ string selected = item;
return selected;
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneTestRefreshingData.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneTestRefreshingData.cs
index 2dc2c40cdf..c566c1fcde 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneTestRefreshingData.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/CliInfoPaneTestRefreshingData.cs
@@ -25,7 +25,7 @@
namespace Nitrocid.Kernel.Debugging.Testing.Facades.FacadeData
{
- internal class CliInfoPaneTestRefreshingData : BaseInteractiveTui, IInteractiveTui
+ internal class CliInfoPaneTestRefreshingData : BaseInteractiveTui, IInteractiveTui
{
internal static List strings = [];
private static int timesRendered = 0;
@@ -42,7 +42,7 @@ internal class CliInfoPaneTestRefreshingData : BaseInteractiveTui, IInteractiveT
3000;
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
strings;
///
@@ -50,10 +50,10 @@ internal class CliInfoPaneTestRefreshingData : BaseInteractiveTui, IInteractiveT
true;
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(string item)
{
// Some variables
- string selected = (string)item;
+ string selected = item;
timesRendered++;
// Check to see if we're given the test info
@@ -67,9 +67,9 @@ public override string GetInfoFromItem(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(string item)
{
- string selected = (string)item;
+ string selected = item;
return selected;
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/PresentationDebugInt.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/PresentationDebugInt.cs
index 6a6b4273bd..16fbafe35b 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/PresentationDebugInt.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/FacadeData/PresentationDebugInt.cs
@@ -63,7 +63,7 @@ internal static class PresentationDebugInt
{
Arguments = [
"Enjoying yet? {0}Color treat!",
- new Color(ConsoleColors.Purple4_5f00af).VTSequenceForeground
+ new Color(ConsoleColors.Purple4Alt).VTSequenceForeground
]
}
]
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputMultiSelection.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputMultiSelection.cs
index cb23e0890c..798165fa5d 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputMultiSelection.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputMultiSelection.cs
@@ -43,7 +43,7 @@ public override void Run(params string[] args)
new("lunar", "23.04 (Lunar Lobster)", "Ubuntu 23.04 Lunar Lobster is an interim release, released 20 April 2023."),
new("mantic", "23.10 (Mantic Minotaur)", "Ubuntu 23.10 Mantic Minotaur is an interim release, scheduled 12 October 2023."),
};
- var answers = SelectionMultipleStyle.PromptMultipleSelection("Which Ubuntu version would you like to run?", choices, altChoices);
+ var answers = SelectionMultipleStyle.PromptMultipleSelection("Which Ubuntu version would you like to run?", [.. choices], [.. altChoices]);
TextWriterColor.Write(string.Join(", ", answers));
}
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelection.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelection.cs
index 24dfd6eb5f..9cc6e3caae 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelection.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelection.cs
@@ -42,7 +42,7 @@ public override void Run(params string[] args)
new("lunar", "23.04 (Lunar Lobster)", "Ubuntu 23.04 Lunar Lobster is an interim release, released 20 April 2023."),
new("mantic", "23.10 (Mantic Minotaur)", "Ubuntu 23.10 Mantic Minotaur is an interim release, scheduled 12 October 2023."),
};
- SelectionStyle.PromptSelection("Which Ubuntu version would you like to run?", choices, altChoices);
+ SelectionStyle.PromptSelection("Which Ubuntu version would you like to run?", [.. choices], [.. altChoices]);
}
}
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelectionLarge.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelectionLarge.cs
index 98fbc3b339..2794bbdd74 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelectionLarge.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelectionLarge.cs
@@ -33,7 +33,7 @@ public override void Run(params string[] args)
var choices = new List();
for (int i = 0; i < 1000; i++)
choices.Add(new InputChoiceInfo($"{i + 1}", $"Number #{i + 1}"));
- SelectionStyle.PromptSelection("Select a choice.", choices);
+ SelectionStyle.PromptSelection("Select a choice.", [.. choices]);
}
}
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelectionLargeMultiple.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelectionLargeMultiple.cs
index f3167dcbf9..7969ccc96a 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelectionLargeMultiple.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestInputSelectionLargeMultiple.cs
@@ -34,7 +34,7 @@ public override void Run(params string[] args)
var choices = new List();
for (int i = 0; i < 1000; i++)
choices.Add(new InputChoiceInfo($"{i + 1}", $"Number #{i + 1}"));
- var answers = SelectionMultipleStyle.PromptMultipleSelection("Select a choice.", choices);
+ var answers = SelectionMultipleStyle.PromptMultipleSelection("Select a choice.", [.. choices]);
TextWriterColor.Write(string.Join(", ", answers));
}
}
diff --git a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestScreen.cs b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestScreen.cs
index f65c3f0eab..a98801d2c0 100644
--- a/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestScreen.cs
+++ b/public/Nitrocid/Kernel/Debugging/Testing/Facades/TestScreen.cs
@@ -24,10 +24,11 @@
using System;
using System.Text;
using Terminaux.Colors;
-using Textify.Sequences.Builder.Types;
+using Terminaux.Sequences.Builder.Types;
using Terminaux.Base;
using Terminaux.Colors.Data;
using Terminaux.Inputs;
+using Terminaux.Reader;
namespace Nitrocid.Kernel.Debugging.Testing.Facades
{
@@ -43,7 +44,7 @@ public override void Run(params string[] args)
{
var stickScreenPart = new ScreenPart();
stickScreenPart.Position(0, 1);
- stickScreenPart.BackgroundColor(new Color(ConsoleColors.Gray));
+ stickScreenPart.BackgroundColor(new Color(ConsoleColors.Silver));
stickScreenPart.AddDynamicText(GenerateWidthStick);
stickScreenPart.AddDynamicText(GenerateHeightStick);
stickScreenPart.AddDynamicText(() => KernelColorTools.GetColor(KernelColorType.NeutralText).VTSequenceForeground);
@@ -51,7 +52,7 @@ public override void Run(params string[] args)
stickScreen.AddBufferedPart("Test", stickScreenPart);
ScreenTools.SetCurrent(stickScreen);
ScreenTools.Render();
- Input.DetectKeypress();
+ TermReader.ReadKey();
}
catch (Exception ex)
{
diff --git a/public/Nitrocid/Kernel/Exceptions/KernelPanic.cs b/public/Nitrocid/Kernel/Exceptions/KernelPanic.cs
index 0e7e18d80e..b7da38f6a3 100644
--- a/public/Nitrocid/Kernel/Exceptions/KernelPanic.cs
+++ b/public/Nitrocid/Kernel/Exceptions/KernelPanic.cs
@@ -41,6 +41,7 @@
using System.Threading;
using Textify.General;
using Terminaux.Inputs;
+using Terminaux.Reader;
namespace Nitrocid.Kernel.Exceptions
{
@@ -152,7 +153,7 @@ internal static void KernelError(KernelErrorLevel ErrorType, bool Reboot, long R
SplashReport.ReportProgressError(Translate.DoTranslation("[{0}] panic: {1} -- Press any key to shutdown."), Exc, ErrorType, Description);
if (ShowStackTraceOnKernelError & Exc is not null)
SplashReport.ReportProgressError(Exc.StackTrace);
- Input.DetectKeypress();
+ TermReader.ReadKey();
PowerManager.PowerManage(PowerMode.Shutdown);
}
}
diff --git a/public/Nitrocid/Kernel/KernelEntry.cs b/public/Nitrocid/Kernel/KernelEntry.cs
index 1a55bf8574..6784c8f0b8 100644
--- a/public/Nitrocid/Kernel/KernelEntry.cs
+++ b/public/Nitrocid/Kernel/KernelEntry.cs
@@ -89,7 +89,7 @@ internal static void EntryPoint(string[] args)
SplashManager.CloseSplash(SplashContext.StartingUp);
SplashReport._KernelBooted = true;
if (!SplashManager.EnableSplash)
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// If this is the first time, run the first run presentation
if (FirstTime)
@@ -150,7 +150,7 @@ private static void MainLoop()
if (TimeDateTools.ShowCurrentTimeBeforeLogin)
{
TimeDateMiscRenderers.ShowCurrentTimes();
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
// Show the tip
diff --git a/public/Nitrocid/Kernel/KernelFirstRun.cs b/public/Nitrocid/Kernel/KernelFirstRun.cs
index 8446d2e197..0aba201fb5 100644
--- a/public/Nitrocid/Kernel/KernelFirstRun.cs
+++ b/public/Nitrocid/Kernel/KernelFirstRun.cs
@@ -30,6 +30,7 @@
using Textify.General;
using Terminaux.Base;
using Terminaux.Inputs;
+using Terminaux.Reader;
namespace Nitrocid.Kernel
{
@@ -354,7 +355,7 @@ internal static void PresentFirstRun()
ConsoleWrapper.Clear();
TextWriterColor.Write(Translate.DoTranslation("We apologize for your inconvenience, but the out-of-box experience has crashed. If you're sure that this is a defect in the experience, please report the crash to us with debugging logs.") + " {0}", ex.Message);
TextWriterColor.Write(Translate.DoTranslation("Press any key to start the shell anyways, but please note that you may have to create your new user manually."));
- Input.DetectKeypress();
+ TermReader.ReadKey();
}
}
diff --git a/public/Nitrocid/Kernel/KernelMain.cs b/public/Nitrocid/Kernel/KernelMain.cs
index 3317cfa48e..10c2d554e0 100644
--- a/public/Nitrocid/Kernel/KernelMain.cs
+++ b/public/Nitrocid/Kernel/KernelMain.cs
@@ -37,6 +37,7 @@
using Nitrocid.Kernel.Power;
using Terminaux.Colors;
using Terminaux.Base;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Kernel
{
@@ -152,7 +153,7 @@ internal static void Main(string[] Args)
// Reset colors and clear the console
if (!PowerManager.hardShutdown)
- ConsoleExtensions.ResetAll();
+ ConsoleClearing.ResetAll();
else
ConsoleTools.ResetColors();
diff --git a/public/Nitrocid/Kernel/Starting/KernelInitializers.cs b/public/Nitrocid/Kernel/Starting/KernelInitializers.cs
index 22cf2446ba..38bf9b6df8 100644
--- a/public/Nitrocid/Kernel/Starting/KernelInitializers.cs
+++ b/public/Nitrocid/Kernel/Starting/KernelInitializers.cs
@@ -60,6 +60,7 @@
using Nitrocid.Network.Types.RPC;
using Nitrocid.Network.SpeedDial;
using Nitrocid.Network.Connections;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Kernel.Starting
{
@@ -75,7 +76,7 @@ internal static void InitializeCritical()
// Initialize crucial things
if (!KernelPlatform.IsOnUnix())
{
- if (!ConsoleExtensions.InitializeSequences())
+ if (!ConsolePositioning.InitializeSequences())
{
TextWriterColor.Write(Translate.DoTranslation("Can not initialize VT sequences for your Windows terminal. Make sure that you're running Windows 10 or later."));
InputTools.DetectKeypress();
@@ -123,7 +124,7 @@ internal static void InitializeEssential()
}
// A title
- ConsoleExtensions.SetTitle(KernelReleaseInfo.ConsoleTitle);
+ ConsoleMisc.SetTitle(KernelReleaseInfo.ConsoleTitle);
// Initialize pre-boot splash (if enabled)
if (KernelEntry.PrebootSplash)
diff --git a/public/Nitrocid/Kernel/Starting/KernelStageTools.cs b/public/Nitrocid/Kernel/Starting/KernelStageTools.cs
index 224659003f..287f196d67 100644
--- a/public/Nitrocid/Kernel/Starting/KernelStageTools.cs
+++ b/public/Nitrocid/Kernel/Starting/KernelStageTools.cs
@@ -97,7 +97,7 @@ internal static void ReportNewStage(int StageNumber, string StageText)
if (StageNumber > Stages.Count)
{
StageTimer.Reset();
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
else
StageTimer.Restart();
@@ -108,7 +108,7 @@ internal static void ReportNewStage(int StageNumber, string StageText)
{
if (!SplashManager.EnableSplash & !KernelEntry.QuietKernel)
{
- TextWriterColor.Write();
+ TextWriterRaw.Write();
TextFancyWriters.WriteSeparator(StageText, false, KernelColorType.Stage);
}
DebugWriter.WriteDebug(DebugLevel.I, $"- Kernel stage {StageNumber} | Text: {StageText}");
diff --git a/public/Nitrocid/Misc/Interactives/FileManagerCli.cs b/public/Nitrocid/Misc/Interactives/FileManagerCli.cs
index 4eff8237e3..8702303309 100644
--- a/public/Nitrocid/Misc/Interactives/FileManagerCli.cs
+++ b/public/Nitrocid/Misc/Interactives/FileManagerCli.cs
@@ -24,7 +24,7 @@
using System.Text;
using System.Collections;
using System.Reflection;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences;
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Files;
@@ -51,7 +51,7 @@ namespace Nitrocid.Misc.Interactives
///
/// File manager class relating to the interactive file manager planned back in 2018
///
- public class FileManagerCli : BaseInteractiveTui, IInteractiveTui
+ public class FileManagerCli : BaseInteractiveTui, IInteractiveTui
{
internal string firstPanePath = PathsManagement.HomePath;
internal string secondPanePath = PathsManagement.HomePath;
@@ -103,7 +103,7 @@ public class FileManagerCli : BaseInteractiveTui, IInteractiveTui
true;
///
- public override IEnumerable PrimaryDataSource
+ public override IEnumerable PrimaryDataSource
{
get
{
@@ -126,7 +126,7 @@ public override IEnumerable PrimaryDataSource
}
///
- public override IEnumerable SecondaryDataSource
+ public override IEnumerable SecondaryDataSource
{
get
{
@@ -153,9 +153,9 @@ public override IEnumerable SecondaryDataSource
true;
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(FileSystemEntry item)
{
- FileSystemEntry FileInfoCurrentPane = (FileSystemEntry)item;
+ FileSystemEntry FileInfoCurrentPane = item;
// Check to see if we're given the file system info
if (FileInfoCurrentPane == null)
@@ -189,11 +189,11 @@ public override void RenderStatus(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(FileSystemEntry item)
{
try
{
- FileSystemEntry file = (FileSystemEntry)item;
+ FileSystemEntry file = item;
bool isDirectory = file.Type == FileSystemEntryType.Directory;
return $" [{(isDirectory ? "/" : "*")}] {file.BaseEntry.Name}";
}
diff --git a/public/Nitrocid/Misc/Interactives/FileSelectorCli.cs b/public/Nitrocid/Misc/Interactives/FileSelectorCli.cs
index 7d32d3451a..37da85a584 100644
--- a/public/Nitrocid/Misc/Interactives/FileSelectorCli.cs
+++ b/public/Nitrocid/Misc/Interactives/FileSelectorCli.cs
@@ -24,7 +24,7 @@
using System.Text;
using System.Collections;
using System.Reflection;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences;
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Files;
@@ -50,7 +50,7 @@ namespace Nitrocid.Misc.Interactives
///
/// File selector class, a descendant of the file manager
///
- public class FileSelectorCli : BaseInteractiveTui, IInteractiveTui
+ public class FileSelectorCli : BaseInteractiveTui, IInteractiveTui
{
internal string selectedFile = "";
internal string firstPanePath = PathsManagement.HomePath;
@@ -90,7 +90,7 @@ public class FileSelectorCli : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource
+ public override IEnumerable PrimaryDataSource
{
get
{
@@ -117,9 +117,9 @@ public override IEnumerable PrimaryDataSource
true;
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(FileSystemEntry item)
{
- FileSystemEntry FileInfoCurrentPane = (FileSystemEntry)item;
+ FileSystemEntry FileInfoCurrentPane = item;
// Check to see if we're given the file system info
if (FileInfoCurrentPane == null)
@@ -155,11 +155,11 @@ public override void RenderStatus(object item)
}
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(FileSystemEntry item)
{
try
{
- FileSystemEntry file = (FileSystemEntry)item;
+ FileSystemEntry file = item;
bool isDirectory = file.Type == FileSystemEntryType.Directory;
bool isSelected = SelectedFile == file.FilePath;
var size = file.FileSize;
@@ -186,11 +186,11 @@ public override string GetInfoFromItem(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(FileSystemEntry item)
{
try
{
- FileSystemEntry file = (FileSystemEntry)item;
+ FileSystemEntry file = item;
bool isDirectory = file.Type == FileSystemEntryType.Directory;
bool isSelected = SelectedFile == file.FilePath;
return $" [{(isDirectory ? "/" : "*")}] [{(isSelected ? "+" : " ")}] {file.BaseEntry.Name}";
diff --git a/public/Nitrocid/Misc/Interactives/FilesSelectorCli.cs b/public/Nitrocid/Misc/Interactives/FilesSelectorCli.cs
index dbf99845e5..9ae583147b 100644
--- a/public/Nitrocid/Misc/Interactives/FilesSelectorCli.cs
+++ b/public/Nitrocid/Misc/Interactives/FilesSelectorCli.cs
@@ -24,7 +24,7 @@
using System.Text;
using System.Collections;
using System.Reflection;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences;
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Files;
@@ -50,7 +50,7 @@ namespace Nitrocid.Misc.Interactives
///
/// Files selector class, a descendant of the file manager
///
- public class FilesSelectorCli : BaseInteractiveTui, IInteractiveTui
+ public class FilesSelectorCli : BaseInteractiveTui, IInteractiveTui
{
internal List selectedFiles = [];
internal string firstPanePath = PathsManagement.HomePath;
@@ -92,7 +92,7 @@ public class FilesSelectorCli : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource
+ public override IEnumerable PrimaryDataSource
{
get
{
@@ -119,9 +119,9 @@ public override IEnumerable PrimaryDataSource
true;
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(FileSystemEntry item)
{
- FileSystemEntry FileInfoCurrentPane = (FileSystemEntry)item;
+ FileSystemEntry FileInfoCurrentPane = item;
// Check to see if we're given the file system info
if (FileInfoCurrentPane == null)
@@ -157,11 +157,11 @@ public override void RenderStatus(object item)
}
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(FileSystemEntry item)
{
try
{
- FileSystemEntry file = (FileSystemEntry)item;
+ FileSystemEntry file = item;
bool isDirectory = file.Type == FileSystemEntryType.Directory;
bool isSelected = SelectedFiles.Contains(file.FilePath);
var size = file.FileSize;
@@ -188,11 +188,11 @@ public override string GetInfoFromItem(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(FileSystemEntry item)
{
try
{
- FileSystemEntry file = (FileSystemEntry)item;
+ FileSystemEntry file = item;
bool isDirectory = file.Type == FileSystemEntryType.Directory;
bool isSelected = SelectedFiles.Contains(file.FilePath);
return $" [{(isDirectory ? "/" : "*")}] [{(isSelected ? "+" : " ")}] {file.BaseEntry.Name}";
diff --git a/public/Nitrocid/Misc/Interactives/FolderSelectorCli.cs b/public/Nitrocid/Misc/Interactives/FolderSelectorCli.cs
index bf16264aac..a290243879 100644
--- a/public/Nitrocid/Misc/Interactives/FolderSelectorCli.cs
+++ b/public/Nitrocid/Misc/Interactives/FolderSelectorCli.cs
@@ -24,7 +24,7 @@
using System.Text;
using System.Collections;
using System.Reflection;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences;
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Files;
@@ -50,7 +50,7 @@ namespace Nitrocid.Misc.Interactives
///
/// Folder selector class, a descendant of the file manager
///
- public class FolderSelectorCli : BaseInteractiveTui, IInteractiveTui
+ public class FolderSelectorCli : BaseInteractiveTui, IInteractiveTui
{
internal string selectedFolder = "";
internal string firstPanePath = PathsManagement.HomePath;
@@ -92,7 +92,7 @@ public class FolderSelectorCli : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource
+ public override IEnumerable PrimaryDataSource
{
get
{
@@ -119,9 +119,9 @@ public override IEnumerable PrimaryDataSource
true;
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(FileSystemEntry item)
{
- FileSystemEntry FileInfoCurrentPane = (FileSystemEntry)item;
+ FileSystemEntry FileInfoCurrentPane = item;
// Check to see if we're given the file system info
if (FileInfoCurrentPane == null)
@@ -156,11 +156,11 @@ public override void RenderStatus(object item)
}
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(FileSystemEntry item)
{
try
{
- FileSystemEntry file = (FileSystemEntry)item;
+ FileSystemEntry file = item;
bool isDirectory = file.Type == FileSystemEntryType.Directory;
bool isSelected = SelectedFolder == file.FilePath;
var size = file.FileSize;
@@ -187,11 +187,11 @@ public override string GetInfoFromItem(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(FileSystemEntry item)
{
try
{
- FileSystemEntry file = (FileSystemEntry)item;
+ FileSystemEntry file = item;
bool isDirectory = file.Type == FileSystemEntryType.Directory;
bool isSelected = SelectedFolder == file.FilePath;
return $" [{(isDirectory ? "/" : "*")}] [{(isSelected ? "+" : " ")}] {file.BaseEntry.Name}";
diff --git a/public/Nitrocid/Misc/Interactives/FoldersSelectorCli.cs b/public/Nitrocid/Misc/Interactives/FoldersSelectorCli.cs
index a3fe6a393d..0a22b6367e 100644
--- a/public/Nitrocid/Misc/Interactives/FoldersSelectorCli.cs
+++ b/public/Nitrocid/Misc/Interactives/FoldersSelectorCli.cs
@@ -24,7 +24,7 @@
using System.Text;
using System.Collections;
using System.Reflection;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences;
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Debugging;
using Nitrocid.Files;
@@ -50,7 +50,7 @@ namespace Nitrocid.Misc.Interactives
///
/// Folders selector class, a descendant of the file manager
///
- public class FoldersSelectorCli : BaseInteractiveTui, IInteractiveTui
+ public class FoldersSelectorCli : BaseInteractiveTui, IInteractiveTui
{
internal List selectedFolders = [];
internal string firstPanePath = PathsManagement.HomePath;
@@ -94,7 +94,7 @@ public class FoldersSelectorCli : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource
+ public override IEnumerable PrimaryDataSource
{
get
{
@@ -121,9 +121,9 @@ public override IEnumerable PrimaryDataSource
true;
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(FileSystemEntry item)
{
- FileSystemEntry FileInfoCurrentPane = (FileSystemEntry)item;
+ FileSystemEntry FileInfoCurrentPane = item;
// Check to see if we're given the file system info
if (FileInfoCurrentPane == null)
@@ -159,11 +159,11 @@ public override void RenderStatus(object item)
}
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(FileSystemEntry item)
{
try
{
- FileSystemEntry file = (FileSystemEntry)item;
+ FileSystemEntry file = item;
bool isDirectory = file.Type == FileSystemEntryType.Directory;
bool isSelected = SelectedFolders.Contains(file.FilePath);
var size = file.FileSize;
@@ -190,11 +190,11 @@ public override string GetInfoFromItem(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(FileSystemEntry item)
{
try
{
- FileSystemEntry file = (FileSystemEntry)item;
+ FileSystemEntry file = item;
bool isDirectory = file.Type == FileSystemEntryType.Directory;
bool isSelected = SelectedFolders.Contains(file.FilePath);
return $" [{(isDirectory ? "/" : "*")}] [{(isSelected ? "+" : " ")}] {file.BaseEntry.Name}";
diff --git a/public/Nitrocid/Misc/Interactives/ManualViewerCli.cs b/public/Nitrocid/Misc/Interactives/ManualViewerCli.cs
index 169e230d8d..0a8e3bebf5 100644
--- a/public/Nitrocid/Misc/Interactives/ManualViewerCli.cs
+++ b/public/Nitrocid/Misc/Interactives/ManualViewerCli.cs
@@ -32,7 +32,7 @@ namespace Nitrocid.Misc.Interactives
///
/// Manual viewer class
///
- public class ManualViewerCli : BaseInteractiveTui, IInteractiveTui
+ public class ManualViewerCli : BaseInteractiveTui, IInteractiveTui
{
internal string modName = "";
@@ -43,18 +43,18 @@ public class ManualViewerCli : BaseInteractiveTui, IInteractiveTui
[
// Operations
new InteractiveTuiBinding("Info", ConsoleKey.F1,
- (manual, _) => ShowManualInfo(manual))
+ (manual, _) => ShowManualInfo((Manual)manual))
];
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
PageManager.ListAllPagesByMod(modName);
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(Manual item)
{
// Get some info from the manual
- Manual selectedManual = (Manual)item;
+ Manual selectedManual = item;
bool hasTitle = !string.IsNullOrEmpty(selectedManual.Title);
bool hasBody = !string.IsNullOrEmpty(selectedManual.Body.ToString());
@@ -76,10 +76,10 @@ public override string GetInfoFromItem(object item)
}
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(Manual item)
{
// Get some info from the manual
- Manual selectedManual = (Manual)item;
+ Manual selectedManual = item;
bool hasTitle = !string.IsNullOrEmpty(selectedManual.Title);
// Generate the rendered text
@@ -92,17 +92,17 @@ public override void RenderStatus(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(Manual item)
{
- Manual manual = (Manual)item;
+ Manual manual = item;
return manual.Name;
}
- private static void ShowManualInfo(object item)
+ private static void ShowManualInfo(Manual item)
{
// Render the final information string
var finalInfoRendered = new StringBuilder();
- Manual manual = (Manual)item;
+ Manual manual = item;
bool hasTitle = !string.IsNullOrEmpty(manual.Title);
bool hasBody = !string.IsNullOrEmpty(manual.Body.ToString());
diff --git a/public/Nitrocid/Misc/Interactives/TaskManagerCli.cs b/public/Nitrocid/Misc/Interactives/TaskManagerCli.cs
index 2b05337251..9a32640c5a 100644
--- a/public/Nitrocid/Misc/Interactives/TaskManagerCli.cs
+++ b/public/Nitrocid/Misc/Interactives/TaskManagerCli.cs
@@ -31,7 +31,7 @@ namespace Nitrocid.Misc.Interactives
///
/// Task manager class
///
- public class TaskManagerCli : BaseInteractiveTui, IInteractiveTui
+ public class TaskManagerCli : BaseInteractiveTui, IInteractiveTui
{
private static string taskStatus = "";
@@ -50,8 +50,17 @@ public class TaskManagerCli : BaseInteractiveTui, IInteractiveTui
];
///
- public override IEnumerable PrimaryDataSource =>
- osThreadMode ? ThreadManager.OperatingSystemThreads : ThreadManager.KernelThreads;
+ public override IEnumerable PrimaryDataSource
+ {
+ get
+ {
+ IEnumerable objects = osThreadMode ? ThreadManager.OperatingSystemThreads : ThreadManager.KernelThreads;
+ List result = [];
+ foreach (object obj in objects)
+ result.Add(obj);
+ return result;
+ }
+ }
///
public override int RefreshInterval =>
diff --git a/public/Nitrocid/Misc/Interactives/TimeZoneShowCli.cs b/public/Nitrocid/Misc/Interactives/TimeZoneShowCli.cs
index 03dee68e12..2ca2f4c3b5 100644
--- a/public/Nitrocid/Misc/Interactives/TimeZoneShowCli.cs
+++ b/public/Nitrocid/Misc/Interactives/TimeZoneShowCli.cs
@@ -29,7 +29,7 @@ namespace Nitrocid.Misc.Interactives
///
/// Time zone showing class
///
- public class TimeZoneShowCli : BaseInteractiveTui, IInteractiveTui
+ public class TimeZoneShowCli : BaseInteractiveTui, IInteractiveTui
{
private static readonly string[] zones = TimeZones.GetTimeZoneNames();
@@ -40,7 +40,7 @@ public class TimeZoneShowCli : BaseInteractiveTui, IInteractiveTui
public override List Bindings { get; set; } = [];
///
- public override IEnumerable PrimaryDataSource =>
+ public override IEnumerable PrimaryDataSource =>
zones;
///
@@ -48,7 +48,7 @@ public class TimeZoneShowCli : BaseInteractiveTui, IInteractiveTui
1000;
///
- public override string GetInfoFromItem(object item)
+ public override string GetInfoFromItem(string item)
{
string selectedZone = (string)item;
var time = TimeZones.GetTimeZoneTimes()[selectedZone];
@@ -61,7 +61,7 @@ public override string GetInfoFromItem(object item)
}
///
- public override void RenderStatus(object item)
+ public override void RenderStatus(string item)
{
string selectedZone = (string)item;
var time = TimeZones.GetTimeZoneTimes()[selectedZone];
@@ -69,7 +69,7 @@ public override void RenderStatus(object item)
}
///
- public override string GetEntryFromItem(object item)
+ public override string GetEntryFromItem(string item)
{
string selectedZone = (string)item;
return selectedZone;
diff --git a/public/Nitrocid/Misc/Notifications/NotificationManager.cs b/public/Nitrocid/Misc/Notifications/NotificationManager.cs
index e1de2a7595..69bf5e6127 100644
--- a/public/Nitrocid/Misc/Notifications/NotificationManager.cs
+++ b/public/Nitrocid/Misc/Notifications/NotificationManager.cs
@@ -42,6 +42,7 @@
using Nitrocid.Kernel.Power;
using Textify.General;
using Terminaux.Base;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Misc.Notifications
{
@@ -295,7 +296,7 @@ private static void NotifListen()
}
// Go to the original position and print
- TextWriterColor.WritePlain(printBuffer.ToString(), false);
+ TextWriterRaw.WritePlain(printBuffer.ToString(), false);
printBuffer.Clear();
ConsoleWrapper.SetCursorPosition(x, y);
@@ -341,7 +342,7 @@ private static void NotifListen()
Thread.Sleep(indeterminate ? 250 : 1);
// Print the buffer
- TextWriterColor.WritePlain(printBuffer.ToString(), false);
+ TextWriterRaw.WritePlain(printBuffer.ToString(), false);
printBuffer.Clear();
ConsoleWrapper.SetCursorPosition(x, y);
}
@@ -353,7 +354,7 @@ private static void NotifListen()
printBuffer.Append(TextWriterWhereColor.RenderWhere(renderedProgressTitleSuccess, notifLeftAgnostic, notifTitleTop, NotifyProgressSuccessColor, background));
// Print the buffer
- TextWriterColor.WritePlain(printBuffer.ToString(), false);
+ TextWriterRaw.WritePlain(printBuffer.ToString(), false);
printBuffer.Clear();
ConsoleWrapper.SetCursorPosition(x, y);
}
@@ -390,7 +391,7 @@ private static void NotifListen()
);
// Render it
- TextWriterColor.WritePlain(printBuffer.ToString(), false);
+ TextWriterRaw.WritePlain(printBuffer.ToString(), false);
printBuffer.Clear();
ConsoleWrapper.SetCursorPosition(x, y);
}
diff --git a/public/Nitrocid/Misc/Screensaver/Displays/MatrixBleed.cs b/public/Nitrocid/Misc/Screensaver/Displays/MatrixBleed.cs
index 4c18abc0c5..55780c4900 100644
--- a/public/Nitrocid/Misc/Screensaver/Displays/MatrixBleed.cs
+++ b/public/Nitrocid/Misc/Screensaver/Displays/MatrixBleed.cs
@@ -26,7 +26,7 @@
using Nitrocid.Kernel.Debugging;
using Nitrocid.Kernel.Threading;
using Terminaux.Colors;
-using Textify.Sequences.Builder.Types;
+using Terminaux.Sequences.Builder.Types;
using Terminaux.Base;
namespace Nitrocid.Misc.Screensaver.Displays
@@ -156,7 +156,7 @@ public override void ScreensaverLogic()
// Draw and clean the buffer
string buffer = MatrixBleedState.bleedBuffer.ToString();
MatrixBleedState.bleedBuffer.Clear();
- TextWriterColor.WritePlain(buffer);
+ TextWriterRaw.WritePlain(buffer);
// Reset resize sync
ConsoleResizeHandler.WasResized();
diff --git a/public/Nitrocid/Misc/Splash/BaseSplash.cs b/public/Nitrocid/Misc/Splash/BaseSplash.cs
index bcb0caeda8..6d66e03623 100644
--- a/public/Nitrocid/Misc/Splash/BaseSplash.cs
+++ b/public/Nitrocid/Misc/Splash/BaseSplash.cs
@@ -23,7 +23,7 @@
using Nitrocid.ConsoleBase.Colors;
using Nitrocid.Kernel.Debugging;
using Terminaux.Colors;
-using Textify.Sequences.Builder.Types;
+using Terminaux.Sequences.Builder.Types;
namespace Nitrocid.Misc.Splash
{
diff --git a/public/Nitrocid/Misc/Splash/SplashManager.cs b/public/Nitrocid/Misc/Splash/SplashManager.cs
index e1afc1495b..27aaf8d03a 100644
--- a/public/Nitrocid/Misc/Splash/SplashManager.cs
+++ b/public/Nitrocid/Misc/Splash/SplashManager.cs
@@ -31,6 +31,7 @@
using Nitrocid.Languages;
using Nitrocid.Misc.Splash.Splashes;
using Terminaux.Base;
+using Terminaux.Colors;
namespace Nitrocid.Misc.Splash
{
@@ -204,7 +205,8 @@ public static void OpenSplash(ISplash splash, SplashContext context)
ScreenTools.SetCurrent(splashScreen);
// Finally, render it
- ScreenTools.Render(true);
+ ColorTools.LoadBack();
+ ScreenTools.Render();
// Render the display
SplashThread.Stop();
diff --git a/public/Nitrocid/Misc/Splash/Splashes/Welcome.cs b/public/Nitrocid/Misc/Splash/Splashes/Welcome.cs
index 90c0e94eee..c6a3500cf7 100644
--- a/public/Nitrocid/Misc/Splash/Splashes/Welcome.cs
+++ b/public/Nitrocid/Misc/Splash/Splashes/Welcome.cs
@@ -19,7 +19,7 @@
using System.Threading;
using Terminaux.Colors;
-using Textify.Sequences.Tools;
+using Terminaux.Sequences;
using Figletize;
using System;
using System.Text;
@@ -33,6 +33,8 @@
using Terminaux.Base;
using Terminaux.Colors.Data;
using Nitrocid.Kernel.Configuration;
+using Terminaux.Colors.Transformation.Contrast;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Misc.Splash.Splashes
{
@@ -121,7 +123,7 @@ public override string Display(SplashContext context)
$"{fifthDotColor.VTSequenceForeground}*";
int dotsPosX = ConsoleWrapper.WindowWidth / 2 - VtSequenceTools.FilterVTSequences(dots).Length / 2;
int dotsPosY = ConsoleWrapper.WindowHeight - 2;
- builder.Append(TextWriterWhereColor.RenderWherePlain(dots, dotsPosX, dotsPosY));
+ builder.Append(TextWriterWhereColor.RenderWhere(dots, dotsPosX, dotsPosY));
if (!noAppend)
{
dotStep++;
@@ -199,7 +201,7 @@ private string ReportProgress(int Progress, string ProgressReport, KernelColorTy
int consoleY = ConsoleWrapper.WindowHeight / 2 - figHeight;
builder.Append(
col.VTSequenceForeground +
- TextWriterWhereColor.RenderWherePlain(ConsoleExtensions.GetClearLineToRightSequence(), 0, consoleY - 2, true, Vars) +
+ TextWriterWhereColor.RenderWhere(ConsoleClearing.GetClearLineToRightSequence(), 0, consoleY - 2, true, Vars) +
CenteredTextColor.RenderCenteredOneLine(consoleY - 2, $"{Progress}% - {ProgressReport}", Vars)
);
return builder.ToString();
diff --git a/public/Nitrocid/Network/Connections/NetworkConnectionSelector.cs b/public/Nitrocid/Network/Connections/NetworkConnectionSelector.cs
index a136c2fab1..2fd347ef93 100644
--- a/public/Nitrocid/Network/Connections/NetworkConnectionSelector.cs
+++ b/public/Nitrocid/Network/Connections/NetworkConnectionSelector.cs
@@ -45,7 +45,7 @@ internal static int ConnectionSelector(string connectionType)
}
return SelectionStyle.PromptSelection(Translate.DoTranslation("Select a connection. If you have no connections, you'll have to create a new connection. Additionally, you can use the speed dial feature to quickly connect to servers."),
- connectionsChoiceList, [
+ [.. connectionsChoiceList], [
new InputChoiceInfo($"{connectionNames.Length + 1}", Translate.DoTranslation("Create a new connection")),
new InputChoiceInfo($"{connectionNames.Length + 2}", Translate.DoTranslation("Use speed dial")),
]
diff --git a/public/Nitrocid/Network/Connections/NetworkConnectionTools.cs b/public/Nitrocid/Network/Connections/NetworkConnectionTools.cs
index ad4f7093a3..abdece9a21 100644
--- a/public/Nitrocid/Network/Connections/NetworkConnectionTools.cs
+++ b/public/Nitrocid/Network/Connections/NetworkConnectionTools.cs
@@ -444,7 +444,7 @@ public static void OpenConnectionForShell(string shellType, Func
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
diff --git a/public/Nitrocid/Shell/ShellBase/Commands/CancellationHandlers.cs b/public/Nitrocid/Shell/ShellBase/Commands/CancellationHandlers.cs
index 5f541826e2..9aeec21ff1 100644
--- a/public/Nitrocid/Shell/ShellBase/Commands/CancellationHandlers.cs
+++ b/public/Nitrocid/Shell/ShellBase/Commands/CancellationHandlers.cs
@@ -78,7 +78,7 @@ internal static void CancelCommand(object sender, ConsoleCancelEventArgs e)
{
DebugWriter.WriteDebug(DebugLevel.I, "Locking to cancel...");
CancelRequested = true;
- TextWriterColor.Write();
+ TextWriterRaw.Write();
DriverHandler.SetDriver("Null");
cts.Cancel();
ProcessStartCommandThread.Stop();
diff --git a/public/Nitrocid/Shell/ShellBase/Shells/ShellManager.cs b/public/Nitrocid/Shell/ShellBase/Shells/ShellManager.cs
index d2667cc626..0890964007 100644
--- a/public/Nitrocid/Shell/ShellBase/Shells/ShellManager.cs
+++ b/public/Nitrocid/Shell/ShellBase/Shells/ShellManager.cs
@@ -63,6 +63,7 @@
using Textify.General;
using Terminaux.Base;
using Nitrocid.ConsoleBase.Inputs;
+using Terminaux.Base.Extensions;
namespace Nitrocid.Shell.ShellBase.Shells
{
@@ -455,7 +456,7 @@ public static void GetLine(string FullCommand, string OutputPath = "", string Sh
{
// Set title
if (Config.MainConfig.SetTitleOnCommandExecution)
- ConsoleExtensions.SetTitle($"{KernelReleaseInfo.ConsoleTitle} - {Command}");
+ ConsoleMisc.SetTitle($"{KernelReleaseInfo.ConsoleTitle} - {Command}");
// Check the command
bool exists = Commands.Any((ci) => ci.Command == commandName || ci.Aliases.Any((ai) => ai.Alias == commandName));
@@ -617,7 +618,7 @@ public static void GetLine(string FullCommand, string OutputPath = "", string Sh
}
// Restore title and cancel possibility state
- ConsoleExtensions.SetTitle(KernelReleaseInfo.ConsoleTitle);
+ ConsoleMisc.SetTitle(KernelReleaseInfo.ConsoleTitle);
CancellationHandlers.InhibitCancel();
lastCommand = FullCommand;
}
@@ -871,7 +872,7 @@ internal static void StartShellInternal(string ShellType, params object[] ShellA
histories.Add(ShellType, []);
// Reset title in case we're going to another shell
- ConsoleExtensions.SetTitle(KernelReleaseInfo.ConsoleTitle);
+ ConsoleMisc.SetTitle(KernelReleaseInfo.ConsoleTitle);
ShellExecute.InitializeShell(ShellArgs);
}
catch (Exception ex)
diff --git a/public/Nitrocid/Shell/Shells/Admin/Commands/UserInfo.cs b/public/Nitrocid/Shell/Shells/Admin/Commands/UserInfo.cs
index b747b72190..7df6e374fe 100644
--- a/public/Nitrocid/Shell/Shells/Admin/Commands/UserInfo.cs
+++ b/public/Nitrocid/Shell/Shells/Admin/Commands/UserInfo.cs
@@ -54,13 +54,13 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriters.Write(user.PreferredLanguage, true, KernelColorType.ListValue);
TextWriters.Write(Translate.DoTranslation("Flags") + ": ", false, KernelColorType.ListEntry);
TextWriters.Write(string.Join(", ", user.Flags), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Now, the permissions.
TextFancyWriters.WriteSeparator(Translate.DoTranslation("Permissions"), true, KernelColorType.ListTitle);
foreach (string perm in user.Permissions)
TextWriters.Write($" - {perm}", true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Now, the groups.
TextFancyWriters.WriteSeparator(Translate.DoTranslation("Groups"), true, KernelColorType.ListTitle);
diff --git a/public/Nitrocid/Shell/Shells/Debug/Commands/KeyInfo.cs b/public/Nitrocid/Shell/Shells/Debug/Commands/KeyInfo.cs
index ac38cc355b..6a8b248412 100644
--- a/public/Nitrocid/Shell/Shells/Debug/Commands/KeyInfo.cs
+++ b/public/Nitrocid/Shell/Shells/Debug/Commands/KeyInfo.cs
@@ -24,6 +24,7 @@
using Nitrocid.ConsoleBase.Colors;
using Terminaux.Writer.ConsoleWriters;
using Terminaux.Inputs;
+using Terminaux.Reader;
namespace Nitrocid.Shell.Shells.Debug.Commands
{
@@ -39,7 +40,7 @@ class KeyInfoCommand : BaseCommand, ICommand
public override int Execute(CommandParameters parameters, ref string variableValue)
{
TextWriterColor.Write(Translate.DoTranslation("Enter a key or a combination of keys to display its information."));
- var KeyPress = Input.DetectKeypress();
+ var KeyPress = TermReader.ReadKey();
// Pressed key
TextWriters.Write("- " + Translate.DoTranslation("Pressed key") + ": ", false, KernelColorType.ListEntry);
diff --git a/public/Nitrocid/Shell/Shells/Text/Commands/QueryChar.cs b/public/Nitrocid/Shell/Shells/Text/Commands/QueryChar.cs
index 2dcfd301e1..8d45d0fbe8 100644
--- a/public/Nitrocid/Shell/Shells/Text/Commands/QueryChar.cs
+++ b/public/Nitrocid/Shell/Shells/Text/Commands/QueryChar.cs
@@ -59,7 +59,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
char Character = text[charIndex];
TextWriters.Write($"{(QueriedChars.Contains(charIndex) ? KernelColorTools.GetColor(KernelColorType.Success).VTSequenceForeground : "")}{Character}", false, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
return 0;
}
else
@@ -84,7 +84,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
char Character = text[charIndex];
TextWriters.Write($"{(queried.Contains(charIndex) ? KernelColorTools.GetColor(KernelColorType.Success).VTSequenceForeground : "")}{Character}", false, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
return 0;
}
@@ -111,7 +111,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
char Character = text[charIndex];
TextWriters.Write($"{(QueriedChars.Contains(charIndex) ? KernelColorTools.GetColor(KernelColorType.Success).VTSequenceForeground : "")}{Character}", false, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
return 0;
}
diff --git a/public/Nitrocid/Shell/Shells/Text/Commands/QueryWord.cs b/public/Nitrocid/Shell/Shells/Text/Commands/QueryWord.cs
index ee091020e2..b9578a840a 100644
--- a/public/Nitrocid/Shell/Shells/Text/Commands/QueryWord.cs
+++ b/public/Nitrocid/Shell/Shells/Text/Commands/QueryWord.cs
@@ -59,7 +59,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
string word = Words[wordIndex];
TextWriters.Write($"{(QueriedChars.Contains(wordIndex) ? KernelColorTools.GetColor(KernelColorType.Success).VTSequenceForeground : "")}{word} ", false, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
return 0;
}
else
@@ -85,7 +85,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
string word = Words[wordIndex];
TextWriters.Write($"{(QueriedChars.Contains(wordIndex) ? KernelColorTools.GetColor(KernelColorType.Success).VTSequenceForeground : "")}{word} ", false, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
return 0;
}
@@ -113,7 +113,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
string word = Words[wordIndex];
TextWriters.Write($"{(QueriedChars.Contains(wordIndex) ? KernelColorTools.GetColor(KernelColorType.Success).VTSequenceForeground : "")}{word} ", false, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
return 0;
}
diff --git a/public/Nitrocid/Shell/Shells/Text/Commands/QueryWordRegex.cs b/public/Nitrocid/Shell/Shells/Text/Commands/QueryWordRegex.cs
index be36eb5763..93491e1619 100644
--- a/public/Nitrocid/Shell/Shells/Text/Commands/QueryWordRegex.cs
+++ b/public/Nitrocid/Shell/Shells/Text/Commands/QueryWordRegex.cs
@@ -59,7 +59,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
string word = Words[wordIndex];
TextWriters.Write($"{(QueriedChars.Contains(wordIndex) ? KernelColorTools.GetColor(KernelColorType.Success).VTSequenceForeground : "")}{word} ", false, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
return 0;
}
else
@@ -85,7 +85,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
string word = Words[wordIndex];
TextWriters.Write($"{(QueriedChars.Contains(wordIndex) ? KernelColorTools.GetColor(KernelColorType.Success).VTSequenceForeground : "")}{word} ", false, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
return 0;
}
@@ -113,7 +113,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
string word = Words[wordIndex];
TextWriters.Write($"{(QueriedChars.Contains(wordIndex) ? KernelColorTools.GetColor(KernelColorType.Success).VTSequenceForeground : "")}{word} ", false, KernelColorType.ListValue);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
return 0;
}
diff --git a/public/Nitrocid/Shell/Shells/UESH/Commands/FileInfo.cs b/public/Nitrocid/Shell/Shells/UESH/Commands/FileInfo.cs
index 68a6faab45..8569193f12 100644
--- a/public/Nitrocid/Shell/Shells/UESH/Commands/FileInfo.cs
+++ b/public/Nitrocid/Shell/Shells/UESH/Commands/FileInfo.cs
@@ -71,7 +71,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
var Style = LineEndingsTools.GetLineEndingFromFile(FilePath);
TextWriterColor.Write(Translate.DoTranslation("Newline style:") + " {0}", Style.ToString());
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// .NET managed info
SeparatorWriterColor.WriteSeparator(Translate.DoTranslation(".NET assembly info"), true);
@@ -87,7 +87,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
{
TextWriterColor.Write(Translate.DoTranslation("File is not a valid .NET assembly."));
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Other info handled by the extension handler
SeparatorWriterColor.WriteSeparator(Translate.DoTranslation("Extra info"), true);
diff --git a/public/Nitrocid/Shell/Shells/UESH/Commands/Input.cs b/public/Nitrocid/Shell/Shells/UESH/Commands/Input.cs
index 69964bef08..d0440576ed 100644
--- a/public/Nitrocid/Shell/Shells/UESH/Commands/Input.cs
+++ b/public/Nitrocid/Shell/Shells/UESH/Commands/Input.cs
@@ -19,6 +19,7 @@
using Terminaux.Inputs.Styles;
using Nitrocid.Shell.ShellBase.Commands;
+using Terminaux.Reader;
namespace Nitrocid.Shell.Shells.UESH.Commands
{
@@ -33,7 +34,7 @@ class InputCommand : BaseCommand, ICommand
public override int Execute(CommandParameters parameters, ref string variableValue)
{
- string Answer = InputStyle.PromptInput(parameters.ArgumentsList[0]);
+ string Answer = TermReader.Read(parameters.ArgumentsList[0]);
variableValue = Answer;
return 0;
}
diff --git a/public/Nitrocid/Shell/Shells/UESH/Commands/InputPass.cs b/public/Nitrocid/Shell/Shells/UESH/Commands/InputPass.cs
index d08aa82db7..e5faed680d 100644
--- a/public/Nitrocid/Shell/Shells/UESH/Commands/InputPass.cs
+++ b/public/Nitrocid/Shell/Shells/UESH/Commands/InputPass.cs
@@ -19,6 +19,7 @@
using Terminaux.Inputs.Styles;
using Nitrocid.Shell.ShellBase.Commands;
+using Terminaux.Reader;
namespace Nitrocid.Shell.Shells.UESH.Commands
{
@@ -33,7 +34,7 @@ class InputPassCommand : BaseCommand, ICommand
public override int Execute(CommandParameters parameters, ref string variableValue)
{
- string Answer = InputStyle.PromptInputPassword(parameters.ArgumentsList[0]);
+ string Answer = TermReader.ReadPassword(parameters.ArgumentsList[0]);
variableValue = Answer;
return 0;
}
diff --git a/public/Nitrocid/Shell/Shells/UESH/Commands/SaveScreen.cs b/public/Nitrocid/Shell/Shells/UESH/Commands/SaveScreen.cs
index abc6353458..c22aa4fb11 100644
--- a/public/Nitrocid/Shell/Shells/UESH/Commands/SaveScreen.cs
+++ b/public/Nitrocid/Shell/Shells/UESH/Commands/SaveScreen.cs
@@ -25,6 +25,7 @@
using Nitrocid.Shell.ShellBase.Switches;
using System.Linq;
using Terminaux.Inputs;
+using Terminaux.Reader;
namespace Nitrocid.Shell.Shells.UESH.Commands
{
@@ -86,7 +87,7 @@ private void PressAndBailHelper()
{
if (ScreensaverManager.inSaver)
{
- Input.DetectKeypress();
+ TermReader.ReadKey();
ScreensaverDisplayer.BailFromScreensaver();
}
}
diff --git a/public/Nitrocid/Shell/Shells/UESH/Commands/ShowNotifs.cs b/public/Nitrocid/Shell/Shells/UESH/Commands/ShowNotifs.cs
index 7afde79bf0..aacee29196 100644
--- a/public/Nitrocid/Shell/Shells/UESH/Commands/ShowNotifs.cs
+++ b/public/Nitrocid/Shell/Shells/UESH/Commands/ShowNotifs.cs
@@ -48,7 +48,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
{
TextWriters.Write($" ({Notif.Progress}%)", false, Notif.ProgressState == NotificationProgressState.Failure ? KernelColorType.Error : KernelColorType.Success);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
Count += 1;
}
}
diff --git a/public/Nitrocid/Shell/Shells/UESH/Commands/SumFiles.cs b/public/Nitrocid/Shell/Shells/UESH/Commands/SumFiles.cs
index 43c7e2b2ff..52ad4377f9 100644
--- a/public/Nitrocid/Shell/Shells/UESH/Commands/SumFiles.cs
+++ b/public/Nitrocid/Shell/Shells/UESH/Commands/SumFiles.cs
@@ -105,7 +105,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriters.Write(Translate.DoTranslation("Invalid encryption algorithm."), true, KernelColorType.Error);
return KernelExceptionTools.GetErrorCode(KernelExceptionType.Encryption);
}
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
if (!string.IsNullOrEmpty(@out))
{
diff --git a/public/Nitrocid/Shell/Shells/UESH/Commands/SysInfo.cs b/public/Nitrocid/Shell/Shells/UESH/Commands/SysInfo.cs
index d36e521402..67f362e52a 100644
--- a/public/Nitrocid/Shell/Shells/UESH/Commands/SysInfo.cs
+++ b/public/Nitrocid/Shell/Shells/UESH/Commands/SysInfo.cs
@@ -79,7 +79,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriters.Write(KernelPlatform.IsOnUsualEnvironment().ToString(), true, KernelColorType.ListValue);
TextWriters.Write(Translate.DoTranslation("Safe Mode:") + " ", false, KernelColorType.ListEntry);
TextWriters.Write(KernelEntry.SafeMode.ToString(), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
if (ShowHardwareInfo)
@@ -92,7 +92,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriters.Write(Translate.DoTranslation("You'll need to restart the kernel as elevated in order to be able to show hardware information."), true, KernelColorType.Error);
else
TextWriters.Write(Translate.DoTranslation("Use \"hwinfo\" for extended information about hardware."), true, KernelColorType.Tip);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
if (ShowUserInfo)
@@ -105,7 +105,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
TextWriters.Write(NetworkTools.HostName, true, KernelColorType.ListValue);
TextWriters.Write(Translate.DoTranslation("Available usernames:") + " ", false, KernelColorType.ListEntry);
TextWriters.Write(string.Join(", ", UserManagement.ListAllUsers()), true, KernelColorType.ListValue);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
if (ShowMessageOfTheDay)
@@ -113,7 +113,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
// Show MOTD
TextFancyWriters.WriteSeparator("MOTD", true, KernelColorType.Separator);
TextWriters.Write(PlaceParse.ProbePlaces(MotdParse.MotdMessage), true, KernelColorType.NeutralText);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
}
if (ShowMal)
diff --git a/public/Nitrocid/Shell/Shells/UESH/Commands/ThemePrev.cs b/public/Nitrocid/Shell/Shells/UESH/Commands/ThemePrev.cs
index c0afa8629d..aa4100461e 100644
--- a/public/Nitrocid/Shell/Shells/UESH/Commands/ThemePrev.cs
+++ b/public/Nitrocid/Shell/Shells/UESH/Commands/ThemePrev.cs
@@ -67,7 +67,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
);
themeCategoryChoices.Add(ici);
}
- int categoryIndex = SelectionStyle.PromptSelection(Translate.DoTranslation("Select a category"), themeCategoryChoices, themeCategoryAltChoices) - 1;
+ int categoryIndex = SelectionStyle.PromptSelection(Translate.DoTranslation("Select a category"), [.. themeCategoryChoices], [.. themeCategoryAltChoices]) - 1;
// If the color index is -2, exit. PromptSelection returns -1 if ESC is pressed to cancel selecting. However, the index just decreases to -2
// even if that PromptSelection returned the abovementioned value, so bail if index is -2
@@ -96,7 +96,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
);
themeChoices.Add(ici);
}
- int colorIndex = SelectionStyle.PromptSelection(Translate.DoTranslation("Select a theme"), themeChoices, themeAltChoices) - 1;
+ int colorIndex = SelectionStyle.PromptSelection(Translate.DoTranslation("Select a theme"), [.. themeChoices], [.. themeAltChoices]) - 1;
// If the color index is -2, exit. PromptSelection returns -1 if ESC is pressed to cancel selecting. However, the index just decreases to -2
// even if that PromptSelection returned the abovementioned value, so bail if index is -2
diff --git a/public/Nitrocid/Shell/Shells/UESH/Commands/ThemeSet.cs b/public/Nitrocid/Shell/Shells/UESH/Commands/ThemeSet.cs
index 41c7a62ba1..54dd5d4a79 100644
--- a/public/Nitrocid/Shell/Shells/UESH/Commands/ThemeSet.cs
+++ b/public/Nitrocid/Shell/Shells/UESH/Commands/ThemeSet.cs
@@ -75,7 +75,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
);
themeCategoryChoices.Add(ici);
}
- int categoryIndex = SelectionStyle.PromptSelection(Translate.DoTranslation("Select a category"), themeCategoryChoices, themeCategoryAltChoices) - 1;
+ int categoryIndex = SelectionStyle.PromptSelection(Translate.DoTranslation("Select a category"), [.. themeCategoryChoices], [.. themeCategoryAltChoices]) - 1;
// If the color index is -2, exit. PromptSelection returns -1 if ESC is pressed to cancel selecting. However, the index just decreases to -2
// even if that PromptSelection returned the abovementioned value, so bail if index is -2
@@ -104,7 +104,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
);
themeChoices.Add(ici);
}
- int colorIndex = SelectionStyle.PromptSelection(Translate.DoTranslation("Select a theme"), themeChoices, themeAltChoices) - 1;
+ int colorIndex = SelectionStyle.PromptSelection(Translate.DoTranslation("Select a theme"), [.. themeChoices], [.. themeAltChoices]) - 1;
// If the color index is -2, exit. PromptSelection returns -1 if ESC is pressed to cancel selecting. However, the index just decreases to -2
// even if that PromptSelection returned the abovementioned value, so bail if index is -2
@@ -136,7 +136,7 @@ public override int Execute(CommandParameters parameters, ref string variableVal
// Now, preview the theme
ThemePreviewTools.PreviewThemeSimple(Theme);
- TextWriterColor.Write();
+ TextWriterRaw.Write();
// Pause until a key is pressed
answer = ChoiceStyle.PromptChoice(
diff --git a/public/Nitrocid/Users/Login/Handlers/Logins/ModernLogin.cs b/public/Nitrocid/Users/Login/Handlers/Logins/ModernLogin.cs
index 87a2d25066..2fcf9bf253 100644
--- a/public/Nitrocid/Users/Login/Handlers/Logins/ModernLogin.cs
+++ b/public/Nitrocid/Users/Login/Handlers/Logins/ModernLogin.cs
@@ -31,6 +31,7 @@
using Terminaux.Inputs;
using System;
using Nitrocid.Kernel.Power;
+using Terminaux.Reader;
namespace Nitrocid.Users.Login.Handlers.Logins
{
@@ -50,7 +51,7 @@ public override bool LoginScreen()
DebugWriter.WriteDebug(DebugLevel.I, "Rendering...");
SpinWait.SpinUntil(() => ModernLogonScreen.renderedFully);
DebugWriter.WriteDebug(DebugLevel.I, "Rendered fully!");
- var key = Input.DetectKeypress().Key;
+ var key = TermReader.ReadKey().Key;
// Stop the thread
ModernLogonScreen.DateTimeUpdateThread.Stop();
diff --git a/public/Nitrocid/Users/Login/ModernLogonScreen.cs b/public/Nitrocid/Users/Login/ModernLogonScreen.cs
index 6cde0506b9..db1745cd4d 100644
--- a/public/Nitrocid/Users/Login/ModernLogonScreen.cs
+++ b/public/Nitrocid/Users/Login/ModernLogonScreen.cs
@@ -21,7 +21,7 @@
using System;
using Figletize;
using System.Text;
-using Textify.Sequences.Builder.Types;
+using Terminaux.Sequences.Builder.Types;
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Time;
using Nitrocid.Kernel.Debugging;