public static string ComName = "";
public static List<string> value = new List<string>();
public static string CommandM(string command)
{
try
{
ComName = command.Substring(0, command.IndexOf(" "));
command = command.Substring(command.IndexOf(" ") + 1);
for (int i = 0; i <= command.Length; i++)
{
if (command.Substring(i, i + 1) == "-")
{
i++;
i++;
value.Add(command.Substring(i, command.IndexOf(" -")));
command = command.Substring(i + command.IndexOf(" -"));
}
}
return Command(ComName, value);
}
catch (Exception e)
{
return "Error" + e.Message;
}
}