private void btnDeleteStep_Click(object sender, EventArgs e) { if (_presentation != null && selectPointIndex != -1) { _presentation.DeleteStep(indexInPresentation); //更新表格 dt.Rows.RemoveAt(selectPointIndex); for (int i = selectPointIndex; i < dt.Rows.Count; i++) { DataRow dr = dt.Rows[i]; int oldValue = int.Parse(dr[0].ToString()); dr[0] = oldValue - 1; } } }