Skip to content

Commit

Permalink
fix: updated dotnet version to 8.0, supressed warning in editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
sargeantPig committed Jan 2, 2024
1 parent 678835e commit 8e26bdc
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 35 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ dotnet_diagnostic.CA1310.severity = suggestion
# IDE0220: Add explicit cast in foreach
dotnet_diagnostic.IDE0220.severity = suggestion

csharp_style_prefer_top_level_statements = false

##########################################
# Language Rules
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules
Expand Down
2 changes: 1 addition & 1 deletion RTWLibPlus/RTWLibPlus.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp7.0</TargetFramework>
<TargetFramework>netcoreapp8.0</TargetFramework>
<DebugType Condition="'$(Configuration)' == 'Debug'">portable</DebugType>
<DebugType Condition="'$(Configuration)' != 'Debug'">none</DebugType>
</PropertyGroup>
Expand Down
61 changes: 30 additions & 31 deletions RTWLib_CLI/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using RTWLib_CLI;
namespace RTWLIB_CLI;
using RTWLib_CLI;
using RTWLib_CLI.cmd;
using RTWLib_CLI.cmd.modules;
using RTWLib_CLI.draw;
Expand All @@ -7,43 +8,41 @@
using RTWLibPlus.helpers;
using System;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;

namespace RTWLIB_CLI
internal class Program
{
class Program
{
private static string title = "Welcome to the RTWLib CLI\n By Sargeant Pig\n---\ntype 'help' for commands and usage";
private static string configTitle = string.Format("Please select a config from below using the number{0}{1}",
"\n", CMDProcess.configs.DictToString());
private static readonly string Title = "Welcome to the RTWLib CLI\n By Sargeant Pig\n---\ntype 'help' for commands and usage";
private static readonly string ConfigTitle = string.Format("Please select a config from below using the number{0}{1}",
"\n", CMDProcess.configs.DictToString());

static void Main(string[] args)
{
string wdir = AppDomain.CurrentDomain.BaseDirectory;
Directory.SetCurrentDirectory(wdir);
private static void Main(string[] args)
{
string wdir = AppDomain.CurrentDomain.BaseDirectory;
Directory.SetCurrentDirectory(wdir);

Console.WriteLine(CMDProcess.LoadTemplates());
Console.WriteLine(CMDProcess.LoadConfigs());
Console.WriteLine(CMDProcess.LoadTemplates());
Console.WriteLine(CMDProcess.LoadConfigs());

if (CMDProcess.configs.Count == 0)
Environment.Exit(1);
if (CMDProcess.configs.Count == 0)
{
Environment.Exit(1);
}

CLIHelper.ScreenChange(title.ApplyBorder('#', 2, 1));
int input = Input.GetIntInput(configTitle, x => x >= 0 && x < CMDProcess.configs.Count);
TWConfig config = TWConfig.LoadConfig(CMDProcess.configs[input]);
RandCMD rand = new RandCMD(config);
Console.WriteLine("Config Loaded".ApplyBorder('#', 1, 1));
CMDProcess.modules.RegisterModule(rand);
//Rand.InitialSetup();
while (true)
{
string ret = CMDProcess.ReadCMD(Console.ReadLine());
CLIHelper.ScreenChange(Title.ApplyBorder('#', 2, 1));
int input = Input.GetIntInput(ConfigTitle, x => x >= 0 && x < CMDProcess.configs.Count);
TWConfig config = TWConfig.LoadConfig(CMDProcess.configs[input]);
RandCMD rand = new(config);
Console.WriteLine("Config Loaded".ApplyBorder('#', 1, 1));
CMDProcess.modules.RegisterModule(rand);
//Rand.InitialSetup();
while (true)
{
string ret = CMDProcess.ReadCMD(Console.ReadLine());

if (ret != KW.back) { Console.WriteLine(ret.ApplyBorder('=', 1, 1)); continue; }
CLIHelper.ScreenChange(title);
}
if (ret != KW.back)
{ Console.WriteLine(ret.ApplyBorder('=', 1, 1)); continue; }
CLIHelper.ScreenChange(Title);
}

}

}
4 changes: 2 additions & 2 deletions RTWLib_CLI/RTWLib_CLI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp7.0</TargetFramework>
<TargetFramework>netcoreapp8.0</TargetFramework>
<AssemblyName>RTW-CLI-Randomiser</AssemblyName>
<Copyright>Copyright © 2023</Copyright>
<!-- x-release-please-start-version -->
Expand All @@ -18,4 +18,4 @@
<ProjectReference Include="..\RTWLibPlus\RTWLibPlus.csproj" />
</ItemGroup>

</Project>
</Project>
2 changes: 1 addition & 1 deletion RTWLib_Tests/RTWLib_Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp7.0</TargetFramework>
<TargetFramework>netcoreapp8.0</TargetFramework>

<IsPackable>false</IsPackable>

Expand Down

0 comments on commit 8e26bdc

Please sign in to comment.