Example #1
0
 private void DrawCurveFamily(CurveFamily curveFamily)
 {
     if (curveFamily != null)
     {
         foreach (Curve curve in curveFamily.Curves)
         {
             this.DrawCurve(curveFamily.Pen, curve);
         }
     }
 }
Example #2
0
 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);
         }
     }
 }
Example #3
0
 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);
         }
     }
 }
Example #4
0
        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);
        }
Example #5
0
        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();
        }
Example #6
0
 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);
         }
     }
 }