public void LoadData(FormDraw2D owner, IList <EMperformance> list) { _owner = owner; _synch = true; _list = list; _data = new DataTable("EMPS"); _data.Columns.Add("FDTD", typeof(string)); _data.Columns.Add("ErrorMagnitude", typeof(double)); _data.Columns.Add("TimeUsed", typeof(double)); _data.Columns.Add("DisplayScale", typeof(double)); for (int i = 0; i < list.Count; i++) { _data.Rows.Add(list[i].Description, list[i].Precision, list[i].TimeUsed, 1.0); } dataGridView1.DataSource = _data; dataGridView1.Columns[0].ReadOnly = true; dataGridView1.Columns[1].ReadOnly = true; dataGridView1.Columns[2].ReadOnly = true; dataGridView1.Columns[3].ReadOnly = false; dataGridView1.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; dataGridView1.AllowUserToAddRows = false; dataGridView1.AllowUserToDeleteRows = false; dataGridView1.AllowUserToOrderColumns = false; dataGridView1.AllowUserToResizeRows = false; _synch = false; }
public void SetDrawingOwner(FormDraw2D o) { _synching = true; double v; _owner = o; nudTime.Minimum = 0; nudTime.Maximum = _owner.GetMaxTimeIndex(); nudTime.Value = 0; v = _owner.Scale1; txtScale1.Text = v.ToString(CultureInfo.InvariantCulture); vs1.Value = scaleToVs(v); v = _owner.Scale2; txtScale2.Text = v.ToString(CultureInfo.InvariantCulture); vs2.Value = scaleToVs(v); _synching = false; }
public void InitOwner(FormDraw2D o) { _owner = o; }