public void AddVariable(ICheckElem classVar) { vars_dgv.Rows.Add(); DataGridViewRow row = vars_dgv.Rows[vars_dgv.Rows.Count - 1]; row.Tag = classVar; row.Cells[0].Value = classVar.exists; row.Cells[1].Value = classVar.uniqueName; row.Cells[2].Value = classVar.type; }
private void ok_btn_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in vars_dgv.Rows) { ICheckElem _elem = (ICheckElem)row.Tag; _elem.Toggle((bool)row.Cells[0].Value); } status = EExitStatus.Ok; this.Close(); }
public bool SyncChartPoint(ICheckElem checkElem) { if (checkElem.exists) { IChartPoint chartPnt = null; AddChartPoint(checkElem.uniqueName, codeClassMethod.GetClass(), out chartPnt, false); } else { IChartPoint cp = chartPoints.FirstOrDefault((lp) => (lp.data.uniqueName == checkElem.uniqueName)); if (cp != null) { RemoveChartPoint(cp); } } return(false); }