public async Task SetListDataAsync(String xivlog, ControlPanel panel) { List <Label> lbllist = panel.GetAllControls <Label>(panel); List <ListView> lvlist = panel.GetAllControls <ListView>(panel); string[] args = ParseLog(xivlog); var lv_container = new LotListViewContainer() { ITEM = args[ITEM].RemoveUnicode(), LOT = args[LOT], //WHO = GetUserFromLogName(args[WHO]) WHO = args[WHO].SubstrALine(0, " ") }; string lblName; if (string.IsNullOrEmpty((lblName = GetListViewName(lv_container, lbllist)))) { return; } ListView lv; (lv = panel.GetListViewObject(lblName)).Items.Add(new ListViewItem(lv_container.toArray())); lv.ListViewItemSorter = new ListViewItemComparer(1); lv.Sort(); // 最大のLOTを出したユーザーを取得する SetTopUserName(lv, panel); }
private string GetListViewName(LotListViewContainer container, List <Label> lbllist) { foreach (Label lbl in lbllist) { if (lbl.Text.Equals(container.ITEM)) { return(lbl.Name); } } return(string.Empty); }