private void _init(List <WarnVo> lstWarnVo) { var iCount = lstWarnVo.Count; this.Width = (WIDTH + SPLIT) * iCount; var iX = SPLIT; var iY = SPLIT; this.Controls.Clear(); for (int i = 0; i < iCount; i++) { var oWarnVo = lstWarnVo[i]; var oWarnItemControl = WarnItemControl.genWarmFromItem(oWarnVo); iX = (WIDTH + SPLIT) * i + SPLIT; oWarnItemControl.Location = new Point(iX, iY); this.Controls.Add(oWarnItemControl); m_oDicWarnItem.Add(oWarnVo.devType, oWarnItemControl); } }
public static WarnItemControl genWarmFromItem(WarnVo oWarnVo) { var oWarnItemControl = new WarnItemControl(oWarnVo); return(oWarnItemControl); }