private void DrawCurveFamily(CurveFamily curveFamily) { if (curveFamily != null) { foreach (Curve curve in curveFamily.Curves) { this.DrawCurve(curveFamily.Pen, curve); } } }
private void DrawOtherCurveFamily(CurveFamily curveFamily) { if (curveFamily != null) { curveFamily.Pen = new Pen(Color.Black, 1.0f); foreach (Curve curve in curveFamily.Curves) { this.DrawOtherCurve(curveFamily.Pen, curve); } } }
private void DrawCurveFamily(CurveFamily curveFamily) { if (curveFamily != null) { Pen pen = new Pen(Color.Red, 1.0f); curveFamily.Pen = pen; // change the color of curves foreach (Curve curve in curveFamily.Curves) { this.DrawCurve(curveFamily.Pen, curve); } } }
public CurveFamily GetCurveFamily(string name) { CurveFamily curveFamily = null; for (int i = 0; i < curveFamilies.Length; i++) { curveFamily = curveFamilies[i]; if (curveFamily.Name.Equals(name)) { break; } } return(curveFamily); }
private void checkedListBoxFamilies_ItemCheck(object sender, System.Windows.Forms.ItemCheckEventArgs e) { bool isChecked = false; if (e.NewValue.Equals(CheckState.Checked)) { isChecked = true; } int idx = e.Index; string s = (string)this.checkedListBoxFamilies.Items[idx]; CurveFamily curveFamily = this.plotGraph.PlotData.GetCurveFamily(s); if (curveFamily != null) { curveFamily.IsShownOnPlot = isChecked; } this.RefreshPlot(); }
private void UpdateFamiliesList(PlotData plotData) { this.checkedListBoxFamilies.Items.Clear(); if (plotData != null) { IList list = plotData.CurveFamilies; IEnumerator e = list.GetEnumerator(); while (e.MoveNext()) { CurveFamily family = (CurveFamily)e.Current; string s = family.Name; if (family.Unit != null && !family.Unit.Trim().Equals("")) { s += " [" + family.Unit + "]"; } this.checkedListBoxFamilies.Items.Add(s); int i = this.checkedListBoxFamilies.Items.IndexOf(s); this.checkedListBoxFamilies.SetItemChecked(i, family.IsShownOnPlot); } } }