Ejemplo n.º 1
0
        public void NewData(string strData)
        {
            string line_data;

            line_data = strData.Replace(" ", "");
            string[] data = line_data.Split(',');

            if (data.Count() != 9)
            {
                return;
            }

            MData oneData = new MData();

            for (int i = 0; i < 8; i++)
            {
                oneData.data[i] = Int32.Parse(data[i]);
            }
            oneData.strTime = data[8];

            strInsertDB = line_data;

            if (dispData.Count() > 0)
            {
                dispData.RemoveAt(0);
            }
            dispData.Add(oneData);

            for (int j = 0; j < NumGraphs; j++)
            {
                CalcSinusFunction(display.DataSources[j], j);
            }

            this.Invoke(new MethodInvoker(RefreshGraph));
        }
Ejemplo n.º 2
0
        private void displayWatingStatus()
        {
            dispData.Clear();
            // DEBUGGING
            for (int k = 0; k < 115; k++)
            {
                MData oneData = new MData();
                oneData.strTime = k.ToString();
                for (int i = 0; i < 8; i++)
                {
                    oneData.data[i] = 0;
                }
                dispData.Add(oneData);
            }

            // DEBUGGING END
            //mTimer = new PrecisionTimer.Timer();
            //mTimer.Period = 160;                         // 20 fps
            //mTimer.Tick += new EventHandler(OnTimerTick);
            //lastTimerTick = DateTime.Now;
            //    //dispData = mData;
            //curPos = 0;
            CalcDataGraphs();
            //mTimer.Start();
        }