24 lines
879 B
C#
24 lines
879 B
C#
using KssSmaPlaLib.AutoTest.Command.Definition;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace KssSmaPlaLib.AutoTest.Command.Translator
|
|
{
|
|
public static class CommandTranslatorUxer
|
|
{
|
|
private static readonly Dictionary<string, CommandEnumUxer.Command> _reverseMap = new Dictionary<string, CommandEnumUxer.Command>()
|
|
{
|
|
{ "寝る", CommandEnumUxer.Command.Sleep },
|
|
{ "あああをセット", CommandEnumUxer.Command.SetText },
|
|
{ "ボタン押す", CommandEnumUxer.Command.PushButton },
|
|
{ "もしもしDB", CommandEnumUxer.Command.TryDbMoshimoshi }
|
|
};
|
|
|
|
public static bool TryTranslate(string userCommand, out CommandEnumUxer.Command command)
|
|
=> _reverseMap.TryGetValue(userCommand, out command);
|
|
}
|
|
}
|