1,451
社区成员
发帖
与我相关
我的任务
分享
/// <summary>
/// 获取过滤器列表
/// </summary>
/// <param name="category">过滤器类型</param>
/// <returns></returns>
public static string[] GetFilterNameList(Guid category)
{
DsDevice[] ds = DsDevice.GetDevicesOfCat(category);
string strDeviceList = "";
if (ds.Length > 0)
for (int i = 0; i < ds.Length; i++)
{
if (i == 0)
{
strDeviceList = ds[i].Name;
}
else
{
strDeviceList = String.Format("{0},{1}", strDeviceList, ds[i].Name);
}
}
if (strDeviceList.Split(',').Length > 0)
{
return strDeviceList.Split(',');
}
else
{
return null;
}
}