49 lines
1.1 KiB
C#
49 lines
1.1 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace MisDataFunDll
|
|
{
|
|
public partial class MisDataFun
|
|
{
|
|
/// <summary>
|
|
/// Source|Cmd|OpName|TagValue
|
|
/// </summary>
|
|
/// <param name="cmd"></param>
|
|
/// <returns></returns>
|
|
public static List<string> GetCmdStringList(string cmd)
|
|
{
|
|
List<string> list = new List<string>();
|
|
string item;
|
|
int index;
|
|
try
|
|
{
|
|
index = cmd.IndexOf('|');
|
|
item = cmd.Substring(0, index);
|
|
list.Add(item);
|
|
|
|
cmd = cmd.Substring(index + 1);
|
|
index = cmd.IndexOf('|');
|
|
item = cmd.Substring(0, index);
|
|
list.Add(item);
|
|
|
|
cmd = cmd.Substring(index + 1);
|
|
index = cmd.IndexOf('|');
|
|
item = cmd.Substring(0, index);
|
|
list.Add(item);
|
|
|
|
item = cmd.Substring(index + 1);
|
|
|
|
list.Add(item);
|
|
|
|
}
|
|
catch { }
|
|
|
|
|
|
return list;
|
|
}
|
|
|
|
|
|
}
|
|
} |