Skip to content

Commit

Permalink
upd - Updated libraries
Browse files Browse the repository at this point in the history
---

Type: upd
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 1, 2024
1 parent 1643294 commit 30924e7
Show file tree
Hide file tree
Showing 20 changed files with 57 additions and 35 deletions.
2 changes: 1 addition & 1 deletion private/Nitrocid.LocaleCheck/Nitrocid.LocaleCheck.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Terminaux" Version="2.6.2" />
<PackageReference Include="Terminaux" Version="2.7.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Nitrocid.LocaleTools\Nitrocid.LocaleTools.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion private/Nitrocid.LocaleClean/Nitrocid.LocaleClean.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Terminaux" Version="2.6.2" />
<PackageReference Include="Terminaux" Version="2.7.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Nitrocid.LocaleTools\Nitrocid.LocaleTools.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion private/Nitrocid.LocaleTrim/Nitrocid.LocaleTrim.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Terminaux" Version="2.6.2" />
<PackageReference Include="Terminaux" Version="2.7.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Nitrocid.LocaleTools\Nitrocid.LocaleTools.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion private/Nitrocid.Tests/Nitrocid.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<ItemGroup>
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="MSTest" Version="3.2.0" />
<PackageReference Include="Terminaux" Version="2.6.2" />
<PackageReference Include="Terminaux" Version="2.7.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\public\Nitrocid\Nitrocid.csproj">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@ public static void InitializeSpeedPress(SpeedPressDifficulty Difficulty, int Cus
SelectedChar = Convert.ToChar(RandomEngine.Next(97, 122));

// Prompt user for character
try
{
TextWriterColor.Write(Translate.DoTranslation("Current character:") + " {0}", SelectedChar);
TextWriters.Write("> ", false, KernelColorType.Input);
WrittenChar = Input.ReadKeyTimeout(false, TimeSpan.FromMilliseconds(SpeedTimeout));
TextWriterColor.Write();
TextWriterColor.Write(Translate.DoTranslation("Current character:") + " {0}", SelectedChar);
TextWriters.Write("> ", false, KernelColorType.Input);
var (result, provided) = Input.ReadKeyTimeout(false, TimeSpan.FromMilliseconds(SpeedTimeout));
WrittenChar = result;
TextWriterColor.Write();

// Check to see if the user has pressed the correct character
// Check to see if the user has pressed the correct character
if (provided)
{
if (WrittenChar.KeyChar == SelectedChar)
{
TextWriters.Write(Translate.DoTranslation("You've pressed the right character!"), true, KernelColorType.Success);
Expand All @@ -156,7 +157,7 @@ public static void InitializeSpeedPress(SpeedPressDifficulty Difficulty, int Cus
TextWriters.Write(Translate.DoTranslation("You've pressed the wrong character."), true, KernelColorType.Warning);
}
}
catch (KernelException kex) when (kex.ExceptionType == KernelExceptionType.ConsoleReadTimeout)
else
{
TextWriterColor.Write();
TextWriters.Write(Translate.DoTranslation("Character not pressed on time."), true, KernelColorType.Warning);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
using Nitrocid.Misc.Splash;
using Nitrocid.Modifications;
using System.Linq;
using Textify.Data;

namespace Nitrocid.Extras.Amusements
{
Expand Down Expand Up @@ -172,6 +173,10 @@ void IAddon.FinalizeAddon()

void IAddon.StartAddon()
{
// Initialize data
DataInitializer.Initialize();

// Initialize everything
CommandManager.RegisterAddonCommands(ShellType.Shell, [.. addonCommands]);
ScreensaverManager.AddonSavers.Add("meteor", new MeteorDisplay());
ScreensaverManager.AddonSavers.Add("meteordodge", new MeteorDodgeDisplay());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Textify.Offline.Data" Version="1.3.1" />
</ItemGroup>
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<!-- Extras.Diagnostics addon Platform Information End -->

<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="3.1.456101" />
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="3.1.506101" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions public/Nitrocid.Addons/Nitrocid.Extras.NameGen/NameGenInit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
using Nitrocid.Misc.Screensaver;
using Nitrocid.Modifications;
using System.Linq;
using Textify.Data;

namespace Nitrocid.Extras.NameGen
{
Expand Down Expand Up @@ -134,6 +135,10 @@ internal class NameGenInit : IAddon

void IAddon.StartAddon()
{
// Initialize data
DataInitializer.Initialize();

// Initialize everything
CommandManager.RegisterAddonCommands(ShellType.Shell, [.. addonCommands]);
ScreensaverManager.AddonSavers.Add("personlookup", new PersonLookupDisplay());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Textify.Offline.Data" Version="1.3.1" />
</ItemGroup>
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Textify.Offline.Data" Version="1.3.1" />
</ItemGroup>
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using Textify.Data;

namespace Nitrocid.ScreensaverPacks
{
Expand Down Expand Up @@ -142,6 +143,9 @@ internal class ScreensaverPackInit : IAddon

void IAddon.StartAddon()
{
// Initialize data
DataInitializer.Initialize();

// First, initialize screensavers
foreach (var saver in Screensavers.Keys)
ScreensaverManager.AddonSavers.Add(saver, Screensavers[saver]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.8.0" />
<PackageReference Include="Terminaux" Version="2.6.2" />
<PackageReference Include="Terminaux" Version="2.7.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion public/Nitrocid.LocaleGen/Nitrocid.LocaleGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<!-- LocaleGen Translations End -->

<ItemGroup>
<PackageReference Include="Terminaux" Version="2.6.2" />
<PackageReference Include="Terminaux" Version="2.7.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
using Nitrocid.Misc.Text.Probers.Placeholder;
using Textify.General;
using Terminaux.Base;
using Terminaux.Inputs;

namespace Nitrocid.ConsoleBase.Writers.MiscWriters
{
Expand Down Expand Up @@ -159,9 +160,9 @@ internal static void ShowDevelopmentDisclaimer()
// Show development disclaimer
if (SplashManager.EnableSplash)
{
string[] answers = [
Translate.DoTranslation("OK"),
Translate.DoTranslation("Acknowledged")
InputChoiceInfo[] answers = [
new InputChoiceInfo("ok", Translate.DoTranslation("OK")),
new InputChoiceInfo("acknowledged", Translate.DoTranslation("Acknowledged")),
];
int answer = InfoBoxButtonsColor.WriteInfoBoxButtonsColor(
Translate.DoTranslation("Development notice"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ public object PromptForSet(SettingsKey key, object KeyDefaultValue, out bool bai
int selectedItemIdx = selectionAnswer - 1;
int result = InfoBoxButtonsColor.WriteInfoBoxButtons(
[
Translate.DoTranslation("Keep it"),
Translate.DoTranslation("Remove it"),
Translate.DoTranslation("Add new item"),
new InputChoiceInfo("keep", Translate.DoTranslation("Keep it")),
new InputChoiceInfo("remove", Translate.DoTranslation("Remove it")),
new InputChoiceInfo("add", Translate.DoTranslation("Add new item")),
],
Translate.DoTranslation("What do you want to do with this item?")
) + 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Terminaux.Inputs.Styles.Infobox;
using Terminaux.Writer.ConsoleWriters;
using Nitrocid.Languages;
using Terminaux.Inputs;

namespace Nitrocid.Kernel.Debugging.Testing.Facades
{
Expand All @@ -30,11 +31,11 @@ internal class TestInputInfoBoxButtons : TestFacade
public override void Run(params string[] args)
{
// Taken from https://en.wikipedia.org/wiki/Ubuntu_version_history
var choices = new string[]
var choices = new InputChoiceInfo[]
{
"20.04 (Focal Fossa)",
"22.04 (Jammy Jellyfish)",
"24.04 (Noble Numbat)",
new("focal", "20.04 (Focal Fossa)", "Ubuntu 20.04 LTS, codenamed Focal Fossa, is a long-term support release and was released on 23 April 2020."),
new("jammy", "22.04 (Jammy Jellyfish)", "Ubuntu 22.04 LTS, codenamed Jammy Jellyfish, was released on 21 April 2022, and is a long-term support release, supported for five years, until April 2027."),
new("noble", "24.04 (Noble Numbat)", "Ubuntu 24.04 LTS, codenamed Noble Numbat, is planned to be released on April 2024, and is a long-term support release, supported for five years, until April 2029."),
};
int selected = InfoBoxButtonsColor.WriteInfoBoxButtons(choices, "Which Ubuntu version would you like to run?");
TextWriterWhereColor.WriteWhere($"{selected}", 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Terminaux.Inputs.Styles.Infobox;
using Terminaux.Writer.ConsoleWriters;
using Nitrocid.Languages;
using Terminaux.Inputs;

namespace Nitrocid.Kernel.Debugging.Testing.Facades
{
Expand All @@ -30,11 +31,11 @@ internal class TestInputInfoBoxButtonsTitled : TestFacade
public override void Run(params string[] args)
{
// Taken from https://en.wikipedia.org/wiki/Ubuntu_version_history
var choices = new string[]
var choices = new InputChoiceInfo[]
{
"20.04 (Focal Fossa)",
"22.04 (Jammy Jellyfish)",
"24.04 (Noble Numbat)",
new("focal", "20.04 (Focal Fossa)", "Ubuntu 20.04 LTS, codenamed Focal Fossa, is a long-term support release and was released on 23 April 2020."),
new("jammy", "22.04 (Jammy Jellyfish)", "Ubuntu 22.04 LTS, codenamed Jammy Jellyfish, was released on 21 April 2022, and is a long-term support release, supported for five years, until April 2027."),
new("noble", "24.04 (Noble Numbat)", "Ubuntu 24.04 LTS, codenamed Noble Numbat, is planned to be released on April 2024, and is a long-term support release, supported for five years, until April 2029."),
};
int selected = InfoBoxButtonsColor.WriteInfoBoxButtons(nameof(TestInputInfoBoxButtonsTitled), choices, "Which Ubuntu version would you like to run?");
TextWriterWhereColor.WriteWhere($"{selected}", 0, 0);
Expand Down
7 changes: 4 additions & 3 deletions public/Nitrocid/Kernel/Debugging/Testing/TestInteractive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
using System.Collections.Generic;
using System.Linq;
using Terminaux.Base;
using Terminaux.Inputs;

namespace Nitrocid.Kernel.Debugging.Testing
{
Expand Down Expand Up @@ -297,9 +298,9 @@ internal static void RunFacade(TestFacade facade)
// Prompt the user to check to see if the test ran as expected
int answer = InfoBoxButtonsColor.WriteInfoBoxButtons(
[
Translate.DoTranslation("Yes!"),
Translate.DoTranslation("No"),
Translate.DoTranslation("Retry"),
new InputChoiceInfo("yes", Translate.DoTranslation("Yes!")),
new InputChoiceInfo("no", Translate.DoTranslation("No")),
new InputChoiceInfo("retry", Translate.DoTranslation("Retry")),
],
Translate.DoTranslation("Did the test run as expected?")
);
Expand Down
6 changes: 3 additions & 3 deletions public/Nitrocid/Nitrocid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@

<!-- KS Non-private Dependencies Information -->
<ItemGroup>
<PackageReference Include="Terminaux" Version="2.6.2" PrivateAssets="contentfiles;analyzers;build;runtime" />
<PackageReference Include="Terminaux.ResizeListener" Version="2.6.2" PrivateAssets="contentfiles;analyzers;build;runtime" />
<PackageReference Include="Textify.Offline" Version="1.2.0" PrivateAssets="contentfiles;analyzers;build;runtime" />
<PackageReference Include="Terminaux" Version="2.7.1" PrivateAssets="contentfiles;analyzers;build;runtime" />
<PackageReference Include="Terminaux.ResizeListener" Version="2.7.1" PrivateAssets="contentfiles;analyzers;build;runtime" />
<PackageReference Include="Textify.Offline" Version="1.3.1" PrivateAssets="contentfiles;analyzers;build;runtime" />
<PackageReference Include="Nettify" Version="1.1.0" PrivateAssets="contentfiles;analyzers;build;runtime" />
</ItemGroup>
<!-- KS Non-private Dependencies Information End -->
Expand Down

0 comments on commit 30924e7

Please sign in to comment.