private bool P_PopulateTable(List <BookItem> input) { TableItemType = input[0].GetType(); for (int i = 0; i < input.Count; i++) { tempRow0 = CreateNewRow(input[i]); tempRow0.name = input[i].Name; tempRow0.AddNewDisplayItem(input[i].Name, Columns[0]); tempRow0.AddNewItem(input[i].System, Columns[1]); tempRow0.AddNewItem(input[i].Key, Columns[2]); Rows.Add(tempRow0); } return(true); }
private bool P_PopulateTable(List <GearItem> input) { TableItemType = input[0].GetType(); for (int i = 0; i < input.Count; i++) { tempRow0 = CreateNewRow(input[i]); tempRow0.name = input[i].Name; tempRow0.AddNewDisplayItem(input[i].Name, Columns[0]); tempRow0.AddNewItem(input[i].Category, Columns[1]); tempRow0.AddNewItem(input[i].Price.ToString(), Columns[2]); tempRow0.AddNewItem(input[i].Rarity.ToString(), Columns[3]); tempRow0.AddNewItem(input[i].Encumbrance.ToString(), Columns[4]); tempRow0.AddNewItem(input[i].Notes, Columns[5]); string nav = Overlord.dControl.BookFromIndex(input[i].Index); tempRow0.AddNewItem(nav, Columns[6]); tempRow0.SetNavString(nav); Rows.Add(tempRow0); } ResizeAllRows(); return(true); }