Upgrade to .NET 8 and code cleanup

This commit is contained in:
Stone_Red
2024-08-07 19:48:03 +02:00
parent 84afe70c96
commit 7078ed5637
33 changed files with 960 additions and 1008 deletions
+5 -11
View File
@@ -11,12 +11,12 @@ internal class TextEditor
{
private readonly InputHandler inputHandler;
private readonly SyntaxHighlighter syntaxHighlighter;
private readonly List<string> debugOutput = new();
private readonly List<string> debugOutput = [];
private readonly Point oldSize = new Point(0, 0);
public YesNtInterpreter YesNtInterpreter { get; } = new();
public int LineOffset { get; set; } = 0;
public List<string> Lines { get; } = new();
public List<string> Lines { get; } = [];
public Point CursorPosition { get; } = new(0, 0);
public Mode EditMode { get; set; } = Mode.Command;
public string CurrentPath { get; set; } = string.Empty;
@@ -263,16 +263,10 @@ internal class TextEditor
}
}
internal class Point
internal class Point(int x, int y)
{
public int X { get; set; }
public int Y { get; set; }
public Point(int x, int y)
{
X = x;
Y = y;
}
public int X { get; set; } = x;
public int Y { get; set; } = y;
}
internal enum Mode