/// <summary> /// 新增MatchItem /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAddMatch_Click(object sender, EventArgs e) { MatchItemCount++; var newMatchItem = new CtlMatchItem(); newMatchItem.Location = CurrentPos; newMatchItem.Name = "MatchItem" + MatchItemCount; Controls.Add(newMatchItem); CurrentPos.Y += newMatchItem.Height; }
/// <summary> /// 增加MatchItem /// </summary> public void AddMatchItem() { _conditionCount++; var newMatchItem = new CtlMatchItem(); newMatchItem.Location = _conditionPos; newMatchItem.Name = "MatchItem" + _conditionCount; Controls.Add(newMatchItem); _conditionPos.Y += newMatchItem.Height; }