Moved MewExplorer to a new repo

This commit is contained in:
Felix Weiß
2023-07-10 11:00:34 +02:00
parent 88cdc1a36c
commit d8c18bbf34
58 changed files with 239 additions and 1608 deletions

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using CommandLine;
using MewtocolNet;
using MewtocolNet.ComCassette;
using MewtocolNet.Logging;
using Spectre.Console;
namespace MewTerminal.Commands;
[Verb("support-list", HelpText = "Lists all supported PLC types")]
internal class ListSupportCommand : CommandLineExcecuteable {
public override void Run () {
var plcs = Enum.GetValues<PlcType>().Cast<PlcType>();
var lst = new List<ParsedPlcName>();
foreach (var plcT in plcs) {
var decomp = plcT.ToNameDecompose();
foreach (var name in decomp)
lst.Add(name);
}
AnsiConsole.Write(lst.ToTable());
}
}