daily update on 20241129 by nitload youmu, frameworkDialogue added
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO.Pipes;
|
||||
|
||||
using Terminal.Gui;
|
||||
|
||||
namespace StgSharpTerminalDialogue
|
||||
{
|
||||
internal partial class Program
|
||||
{
|
||||
private static AnonymousPipeClientStream _callerClientPipe, _callerServerPipe;
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (args.Length != 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
ConfigurationManager.RuntimeConfig = """{ "Theme": "Light" }""";
|
||||
|
||||
_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 "))
|
||||
{
|
||||
temp = clientReader.ReadLine()!;
|
||||
temp = temp??string.Empty;
|
||||
if (temp == null) continue;
|
||||
|
||||
int index = temp.IndexOf(' ');
|
||||
if (index == -1) continue;
|
||||
|
||||
string command = temp.Substring(0, index);
|
||||
string operand = temp.Substring(index + 1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user