/// <summary> /// 自动分段 按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_AutoSegment_Click(object sender, EventArgs e) { string detText = tb_Signs.Text; List <CellSegment> tmpList = new List <CellSegment>(); foreach (CellSegment cs in this.DataList) { tmpList.AddRange(CellSegment.SegmentSplitBySigns(cs, detText)); } this.DataList.Clear(); this.DataList = CellSegment.ListClone(tmpList); tmpList.Clear(); LoadDataList(); }
private void btn_RegxSegment_Click(object sender, EventArgs e) { string ptn = tb_RegExpText.Text; if (string.IsNullOrEmpty(ptn.Trim())) { return; } List <CellSegment> tmpList = new List <CellSegment>(); foreach (CellSegment cs in this.DataList) { List <CellSegment> splittedList = CellSegment.SegmentSplitByRegExp(cs, ptn); tmpList.AddRange(splittedList); } this.DataList.Clear(); this.DataList = CellSegment.ListClone(tmpList); tmpList.Clear(); LoadDataList(); }