/// <summary> /// 绑定命令类型下拉列表 /// </summary> public void BindCommandTypeItem() { CommandTypeList.Clear(); CommandTypeList.Add(new CommandTypeItem() { TypeItem = AdvertManage.Model.Enum.CommandType.None, Text = "全部" }); CommandTypeList.Add(new CommandTypeItem() { TypeItem = AdvertManage.Model.Enum.CommandType.Playlist, Text = "播放列表" }); CommandTypeList.Add(new CommandTypeItem() { TypeItem = AdvertManage.Model.Enum.CommandType.SlipCustomer, Text = "优惠券" }); CommandTypeList.Add(new CommandTypeItem() { TypeItem = AdvertManage.Model.Enum.CommandType.ProgramUpgrade, Text = "程序更新" }); CommandTypeList.Add(new CommandTypeItem() { TypeItem = AdvertManage.Model.Enum.CommandType.HardAd, Text = "硬广" }); CommandTypeList.Add(new CommandTypeItem() { TypeItem = AdvertManage.Model.Enum.CommandType.PrintTemplate, Text = "凭条模板" }); CommandTypeList.Add(new CommandTypeItem() { TypeItem = AdvertManage.Model.Enum.CommandType.TitleAd, Text = "标题广告" }); }
public void ParseCommandData(IList <String> lines, Byte commandId) { if (CommandTimeList.ContainsKey(commandId)) { return; } IList <Single> eventTimeList = new List <Single>(); IList <String> eventTypeList = new List <String>(); IList <String> eventArgsList = new List <String>(); UInt16 count = (UInt16)(lines.Count); for (UInt16 index = 0; index < count; ++index) { String line = lines[index]; String[] items = line.Split(Constants.Delim0); Single time = Convert.ToSingle(items[0], CultureInfo.InvariantCulture) * ratio; eventTimeList.Add(time); eventTypeList.Add(items[1]); eventArgsList.Add(items[2]); } CommandTimeList.Add(commandId, eventTimeList); CommandTypeList.Add(commandId, eventTypeList); CommandArgsList.Add(commandId, eventArgsList); }