Ejemplo n.º 1
0
        public void lineTimer_tick1(object sender, EventArgs e)
        {
            try
            {
                MeasureModel mmd = new MeasureModel();



                mmd.DateTime = System.DateTime.Now;
                mmd.Value    = mRandomValues[0, mRandomFunc.Next(0, 49)];
                mChartValues1.Add(mmd);
                if (mChartValues1.Count > 50)
                {
                    mChartValues1.RemoveAt(0);
                }

                cartesianChart_1.AxisX[0].Separator.StrokeThickness = 0;
                cartesianChart_1.AxisY[0].Separator.StrokeThickness = 0;

                setAxisLimits1(System.DateTime.Now);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Tick1" + ex.ToString());
            }
        }
Ejemplo n.º 2
0
        public void lineTimer_tick7(object sender, EventArgs e)
        {
            try
            {
                MeasureModel mmd = new MeasureModel();
                mmd.DateTime = System.DateTime.Now;
                mmd.Value    = mRandomValues[6, mRandomFunc.Next(0, 49)];
                mChartValues7.Add(mmd);
                if (mChartValues7.Count > 50)
                {
                    mChartValues7.RemoveAt(0);
                }

                setAxisLimits7(System.DateTime.Now);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Tick1" + ex.ToString());
            }
        }
Ejemplo n.º 3
0
        public void lineTimer_tick(object sender, EventArgs e)
        {
            try
            {
                /*
                 * MeasureModel[] mmd = new MeasureModel[8];
                 * for (int i = 0 ; i < 8; i++)
                 * {
                 *  mmd[i].DateTime = System.DateTime.Now;
                 *  mmd[i].Value = mRandomValues[i, mRandomFunc.Next(0, 49)];
                 *  mChartValues[i].Add(mmd[i]);
                 *
                 *  if (mChartValues[i].Count > 50) mChartValues[i].RemoveAt(0);
                 * }
                 * setAxisLimits(System.DateTime.Now);
                 */

                MeasureModel mmd1 = new MeasureModel();
                MeasureModel mmd2 = new MeasureModel();
                MeasureModel mmd3 = new MeasureModel();
                MeasureModel mmd4 = new MeasureModel();
                MeasureModel mmd5 = new MeasureModel();
                MeasureModel mmd6 = new MeasureModel();
                MeasureModel mmd7 = new MeasureModel();
                MeasureModel mmd8 = new MeasureModel();
                mmd1.DateTime = System.DateTime.Now;
                mmd2.DateTime = System.DateTime.Now;
                mmd3.DateTime = System.DateTime.Now;
                mmd4.DateTime = System.DateTime.Now;
                mmd5.DateTime = System.DateTime.Now;
                mmd6.DateTime = System.DateTime.Now;
                mmd7.DateTime = System.DateTime.Now;
                mmd8.DateTime = System.DateTime.Now;
                mmd1.Value    = mRandomValues[0, mRandomFunc.Next(0, 49)];
                mmd2.Value    = mRandomValues[1, mRandomFunc.Next(0, 49)];
                mmd3.Value    = mRandomValues[2, mRandomFunc.Next(0, 49)];
                mmd4.Value    = mRandomValues[3, mRandomFunc.Next(0, 49)];
                mmd5.Value    = mRandomValues[4, mRandomFunc.Next(0, 49)];
                mmd6.Value    = mRandomValues[5, mRandomFunc.Next(0, 49)];
                mmd7.Value    = mRandomValues[6, mRandomFunc.Next(0, 49)];
                mmd8.Value    = mRandomValues[7, mRandomFunc.Next(0, 49)];
                mChartValues1.Add(mmd1);
                mChartValues2.Add(mmd2);
                mChartValues3.Add(mmd3);
                mChartValues4.Add(mmd4);
                mChartValues5.Add(mmd5);
                mChartValues6.Add(mmd6);
                mChartValues7.Add(mmd7);
                mChartValues8.Add(mmd8);
                if (mChartValues1.Count > 50)
                {
                    mChartValues1.RemoveAt(0);
                }
                if (mChartValues2.Count > 50)
                {
                    mChartValues2.RemoveAt(0);
                }
                if (mChartValues3.Count > 50)
                {
                    mChartValues3.RemoveAt(0);
                }
                if (mChartValues4.Count > 50)
                {
                    mChartValues4.RemoveAt(0);
                }
                if (mChartValues5.Count > 50)
                {
                    mChartValues5.RemoveAt(0);
                }
                if (mChartValues6.Count > 50)
                {
                    mChartValues6.RemoveAt(0);
                }
                if (mChartValues7.Count > 50)
                {
                    mChartValues7.RemoveAt(0);
                }
                if (mChartValues8.Count > 50)
                {
                    mChartValues8.RemoveAt(0);
                }

                setAxisLimits(System.DateTime.Now);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Tick1" + ex.ToString());
            }
        }