HLSF use long as aloloc size

This commit is contained in:
Nitload
2026-02-23 12:32:15 +08:00
parent 4bd88ccbca
commit c155cab510
552 changed files with 154266 additions and 154330 deletions
+105 -105
View File
@@ -1,105 +1,105 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terminal.Gui;
namespace StgSharpTerminalDialogue
{
internal class DialogueView:Window
{
TextView tittle = new TextView()
{
Text = """"
███████╗████████╗ ██████╗ ███████╗██╗ ██╗ █████╗ ██████╗ ██████╗
██╔════╝╚══██╔══╝██╔════╝ ██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗
███████╗ ██║ ██║ ███╗███████╗███████║███████║██████╔╝██████╔╝
╚════██║ ██║ ██║ ██║╚════██║██╔══██║██╔══██║██╔══██╗██╔═══╝
███████║ ██║ ╚██████╔╝███████║██║ ██║██║ ██║██║ ██║██║
╚══════╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝
"""",
//generate from site: https://www.asciiart.eu/text-to-ascii-art
//font: ANSI shadow
TextAlignment = Alignment.Start,
Width = 8 * 9,
Height = 1 * 8,
X = 0,
Y = 0,
ColorScheme = common
};
static readonly Terminal.Gui.Attribute
commonColor = Application.Driver!.MakeColor(
new Color(92, 180, 225), Color.Cyan),
errorColor = Application.Driver!.MakeColor(
Color.White, Color.BrightRed);
static ColorScheme common = new ColorScheme(){
Focus = commonColor,
Normal = commonColor
},
error = new ColorScheme()
{
Focus = errorColor,
Normal = errorColor
};
public static DialogueView Single
{
get => new DialogueView();
}
private DialogueView()
{
Init();
}
private void Init()
{
ColorScheme = common;
this.Width = Dim.Fill(0);
this.Height = Dim.Fill(0);
this.X = 0;
this.Y = 0;
this.Title = "StgSharp Framework Dialogue";
this.Add(this.tittle);
}
public void ShowError(string message)
{
this.Remove(this.tittle);
this.ColorScheme = error;
this.Text =
"""
██╗ ███████╗██████╗ ██████╗ ██████╗ ██████╗
██╗ ██╔╝ ██╔════╝██╔══██╗██╔══██╗██╔═══██╗██╔══██╗
╚═╝ ██║ █████╗ ██████╔╝██████╔╝██║ ██║██████╔╝
██╗ ██║ ██╔══╝ ██╔══██╗██╔══██╗██║ ██║██╔══██╗
╚═╝ ╚██╗ ███████╗██║ ██║██║ ██║╚██████╔╝██║ ██║
╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
""" + "\n"+
message;
Button button = new Button()
{
Text = "Click to quit."
};
button.Accept += (sender,e) => {
Application.RequestStop();
};
this.Add(button);
this.SetNeedsDisplay();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terminal.Gui;
namespace StgSharpTerminalDialogue
{
internal class DialogueView:Window
{
TextView tittle = new TextView()
{
Text = """"
███████╗████████╗ ██████╗ ███████╗██╗ ██╗ █████╗ ██████╗ ██████╗
██╔════╝╚══██╔══╝██╔════╝ ██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗
███████╗ ██║ ██║ ███╗███████╗███████║███████║██████╔╝██████╔╝
╚════██║ ██║ ██║ ██║╚════██║██╔══██║██╔══██║██╔══██╗██╔═══╝
███████║ ██║ ╚██████╔╝███████║██║ ██║██║ ██║██║ ██║██║
╚══════╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝
"""",
//generate from site: https://www.asciiart.eu/text-to-ascii-art
//font: ANSI shadow
TextAlignment = Alignment.Start,
Width = 8 * 9,
Height = 1 * 8,
X = 0,
Y = 0,
ColorScheme = common
};
static readonly Terminal.Gui.Attribute
commonColor = Application.Driver!.MakeColor(
new Color(92, 180, 225), Color.Cyan),
errorColor = Application.Driver!.MakeColor(
Color.White, Color.BrightRed);
static ColorScheme common = new ColorScheme(){
Focus = commonColor,
Normal = commonColor
},
error = new ColorScheme()
{
Focus = errorColor,
Normal = errorColor
};
public static DialogueView Single
{
get => new DialogueView();
}
private DialogueView()
{
Init();
}
private void Init()
{
ColorScheme = common;
this.Width = Dim.Fill(0);
this.Height = Dim.Fill(0);
this.X = 0;
this.Y = 0;
this.Title = "StgSharp Framework Dialogue";
this.Add(this.tittle);
}
public void ShowError(string message)
{
this.Remove(this.tittle);
this.ColorScheme = error;
this.Text =
"""
██╗ ███████╗██████╗ ██████╗ ██████╗ ██████╗
██╗ ██╔╝ ██╔════╝██╔══██╗██╔══██╗██╔═══██╗██╔══██╗
╚═╝ ██║ █████╗ ██████╔╝██████╔╝██║ ██║██████╔╝
██╗ ██║ ██╔══╝ ██╔══██╗██╔══██╗██║ ██║██╔══██╗
╚═╝ ╚██╗ ███████╗██║ ██║██║ ██║╚██████╔╝██║ ██║
╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
""" + "\n"+
message;
Button button = new Button()
{
Text = "Click to quit."
};
button.Accept += (sender,e) => {
Application.RequestStop();
};
this.Add(button);
this.SetNeedsDisplay();
}
}
}
+62 -62
View File
@@ -1,62 +1,62 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="PostOpration.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and
// this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terminal.Gui;
namespace StgSharpTerminalDialogue
{
internal static partial class Program
{
private static DialogueView _dv;
internal static void PostOperation( string instruction, string operand )
{
switch( instruction ) {
case "posterror":
_dv.ShowError( operand );
using( StreamWriter sw = new StreamWriter(
_callerServerPipe ) ) {
sw.WriteLine( "ERRORGET" );
}
break;
default:
break;
}
}
}
}
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="PostOpration.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and
// this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terminal.Gui;
namespace StgSharpTerminalDialogue
{
internal static partial class Program
{
private static DialogueView _dv;
internal static void PostOperation( string instruction, string operand )
{
switch( instruction ) {
case "posterror":
_dv.ShowError( operand );
using( StreamWriter sw = new StreamWriter(
_callerServerPipe ) ) {
sw.WriteLine( "ERRORGET" );
}
break;
default:
break;
}
}
}
}
+101 -101
View File
@@ -1,101 +1,101 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="Program.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and
// this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using System;
using System.Globalization;
using System.IO.Pipes;
using Terminal.Gui;
namespace StgSharpTerminalDialogue
{
internal static partial class Program
{
private static AnonymousPipeClientStream _callerClientPipe, _callerServerPipe;
private static void Main( string[] args )
{
Application.Init();
Console.CancelKeyPress += ( sender, e ) => {
e.Cancel = true;
Application.RequestStop();
};
Task renderTask = Task.Factory
.StartNew(
() => {
_dv = DialogueView.Single;
Application.Run( view: _dv );
} );
/**/
if( args.Length != 2 ) {
Console.ReadLine();
Application.RequestStop();
}
/**/
_callerClientPipe = new AnonymousPipeClientStream(
PipeDirection.In, args[ 0 ] );
_callerServerPipe = new AnonymousPipeClientStream(
PipeDirection.Out, args[ 1 ] );
using( StreamReader clientReader = new StreamReader(
_callerClientPipe ) ) {
using( StreamWriter clientSender = new StreamWriter(
_callerServerPipe ) ) {
clientSender.AutoFlush = true;
string temp = string.Empty;
while( !temp!.Contains( "exit " ) && !renderTask.IsCompleted ) {
temp = clientReader.ReadLine()!;
temp = temp ?? string.Empty;
if( string.IsNullOrEmpty( temp ) ) {
continue;
}
int index = temp.IndexOf( ' ' );
if( index == -1 ) {
continue;
}
string command = temp.Substring( 0, index );
string operand = temp.Substring( index + 1 );
PostOperation( command, operand );
}
}
}
}
}
}
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="Program.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and
// this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using System;
using System.Globalization;
using System.IO.Pipes;
using Terminal.Gui;
namespace StgSharpTerminalDialogue
{
internal static partial class Program
{
private static AnonymousPipeClientStream _callerClientPipe, _callerServerPipe;
private static void Main( string[] args )
{
Application.Init();
Console.CancelKeyPress += ( sender, e ) => {
e.Cancel = true;
Application.RequestStop();
};
Task renderTask = Task.Factory
.StartNew(
() => {
_dv = DialogueView.Single;
Application.Run( view: _dv );
} );
/**/
if( args.Length != 2 ) {
Console.ReadLine();
Application.RequestStop();
}
/**/
_callerClientPipe = new AnonymousPipeClientStream(
PipeDirection.In, args[ 0 ] );
_callerServerPipe = new AnonymousPipeClientStream(
PipeDirection.Out, args[ 1 ] );
using( StreamReader clientReader = new StreamReader(
_callerClientPipe ) ) {
using( StreamWriter clientSender = new StreamWriter(
_callerServerPipe ) ) {
clientSender.AutoFlush = true;
string temp = string.Empty;
while( !temp!.Contains( "exit " ) && !renderTask.IsCompleted ) {
temp = clientReader.ReadLine()!;
temp = temp ?? string.Empty;
if( string.IsNullOrEmpty( temp ) ) {
continue;
}
int index = temp.IndexOf( ' ' );
if( index == -1 ) {
continue;
}
string command = temp.Substring( 0, index );
string operand = temp.Substring( index + 1 );
PostOperation( command, operand );
}
}
}
}
}
}
@@ -1,54 +1,54 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>build\StgSharpTerminalDialogue</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
<SatelliteResourceLanguages>none</SatelliteResourceLanguages>
<Platforms>x64</Platforms>
<Configurations>Debug;Release;PerformanceDebug</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|x64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|ARM64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Terminal.Gui" Version="2.0.0-v2-develop.2329" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy /E /I /Y $(OutputPath) $(SolutionDir)build\StgSharp.TerminalDialogue" />
</Target>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>build\StgSharpTerminalDialogue</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
<SatelliteResourceLanguages>none</SatelliteResourceLanguages>
<Platforms>x64</Platforms>
<Configurations>Debug;Release;PerformanceDebug</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|x64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|ARM64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Terminal.Gui" Version="2.0.0-v2-develop.2329" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy /E /I /Y $(OutputPath) $(SolutionDir)build\StgSharp.TerminalDialogue" />
</Target>
</Project>