void AddDiplayGroup(string paramGroup, IList <KnownUOM> uoms, int group, int ptPopularity, string paramName, ParamType pt, ref int order) { List <ParamType> pTypes = null; if (pt != null) { pTypes = new List <ParamType>(); _paramDisplayGroups.Add(pTypes); pTypes.Add(pt); } foreach (var uom in uoms) { order++; ChooseUomRowInfo rowInfo = new ChooseUomRowInfo() { Parent = this, Group = $"{group:000}", //-{ptPopularity} Order = $"{order:000000}", Parameter = $"{paramName}", Unit = uom.Name, ParamGroup = paramGroup, Uom = uom, ParamTypes = pTypes, }; RowInfoCollection.Add(rowInfo); } }
void AddUnspecifiedItem(int group, ref int order) { RowInfoCollection.Add(new ChooseUomRowInfo() { Parent = this, Group = $"{group:000}", //-{ptPopularity} Order = $"{order:000000}", Parameter = "_Unspecified", Unit = null, ParamGroup = null, Uom = null, }); }
public RowInfoCollectoinHiddenRowCoordinator(RowInfoCollection rows) : base(rows) { // when rows are removed, check if some of them were hidden // if yes, inform hidden row coordinator that they were removed rows.RowsRemoving += delegate(object sender, IndexRangeEventArgs e) { for (int i = 0 ; i < e.Count; i ++) { var index = i + e.StartIndex; if (rows.IsRowVisible(index) == false) base.m_totalHiddenRows -= 1; } var range = new Range(e.StartIndex, 0, e.StartIndex + e.Count, 1); base.m_rowMerger.RemoveRange(range); }; }