Standalone update fix (#1596)

* Updating nuget package and fixing nonworking code.

* Adding some more improvements and launch for UseSystemConsole.

* Fixes layout issue.

* Also added a launch for UseSystemConsole for the Example project.

* Fixing unit tests.

* Trying fixing timeouts duplicate keys.
This commit is contained in:
BDisp
2022-02-18 15:23:46 +00:00
committed by GitHub
parent acaa7aa7b6
commit b185722ab6
9 changed files with 285 additions and 194 deletions

View File

@@ -0,0 +1,11 @@
{
"profiles": {
"Example": {
"commandName": "Project"
},
"Example:-usc": {
"commandName": "Project",
"commandLineArgs": "-usc"
}
}
}

View File

@@ -564,8 +564,13 @@ static class Demo {
#endregion
public static Action running = MainApp;
static void Main ()
static void Main(string[] args)
{
if (args.Length > 0 && args.Contains("-usc"))
{
Application.UseSystemConsole = true;
}
Console.OutputEncoding = System.Text.Encoding.Default;
while (running != null) {
@@ -583,8 +588,6 @@ static class Demo {
if (Debugger.IsAttached)
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.GetCultureInfo ("en-US");
Application.UseSystemConsole = true;
Application.Init();
Application.HeightAsBuffer = true;
//ConsoleDriver.Diagnostics = ConsoleDriver.DiagnosticFlags.FramePadding | ConsoleDriver.DiagnosticFlags.FrameRuler;
@@ -685,7 +688,8 @@ static class Demo {
new StatusItem(Key.F1, "~F1~ Help", () => Help()),
new StatusItem(Key.F2, "~F2~ Load", Load),
new StatusItem(Key.F3, "~F3~ Save", Save),
new StatusItem(Key.CtrlMask | Key.Q, "~^Q~ Quit", () => { if (Quit ()) { running = null; top.Running = false; } })
new StatusItem(Key.CtrlMask | Key.Q, "~^Q~ Quit", () => { if (Quit ()) { running = null; top.Running = false; } }),
new StatusItem(Key.Null, Application.Driver.GetType().Name, null)
});
win.Add (drag, dragText);