private void Form1_Load(object sender, EventArgs e)
        {
            KeyPreview = true;
            Dictionary <string, string> dbConnInfo = LoadDBInfo();

            InitializeConnection(dbConnInfo["host"], dbConnInfo["uid"], dbConnInfo["password"], dbConnInfo["database"]);
            plotTemp   = new PointControl(cTemp.Series[0]);
            plotPress  = new PointControl(cPress.Series[0]);
            plotSpeed  = new PointControl(cSpeed.Series[0]);
            plotHeight = new PointControl(cHeight.Series[0]);
            plotVolt   = new PointControl(cVoltage.Series[0]);
            plotHum    = new PointControl(cHum.Series[0]);
            plotCO     = new PointControl(cGas.Series[0]);
            plotNH     = new PointControl(cGas.Series[2]);
            plotNO     = new PointControl(cGas.Series[1]);

            getFlyID(out flyIDCurrent, out flyName, out flyStart);

            tbFlyID.Text    = flyIDCurrent.ToString();
            tbFlyName.Text  = flyName;
            tbFlyStart.Text = flyStart;

            lastTime        = 0;
            flyTime         = 0;
            receivedPackets = new ConcurrentBag <Packet>();
            allPackets      = new List <Packet>();
            ListeningInitAndStart();
            UpdateInfo();
            mapWindow        = new wfMap();
            flyIDLastChecked = flyIDCurrent;
        }
 public void CopyTo(PointControl target)
 {
     foreach (DataPoint dp in this.curve.Points.ToArray())
     {
         target.curve.Points.AddXY(dp.XValue, dp.YValues[0]);
     }
     ChartType = target.ChartType;
 }
Beispiel #3
0
        private void ShowGraph(PointControl plot)
        {
            GraphicViewer graphic = new GraphicViewer();

            graphic.Name  = plot.Name;
            graphic.Plots = new PointControl[] { plot };
            graphic.Show(this);
        }
Beispiel #4
0
 private void Form1_Load(object sender, EventArgs e)
 {
     KeyPreview = true;
     LoadInfo();
     InitializeConnection();
     plotTemp     = new PointControl(chart1.Series[0]);
     plotPress    = new PointControl(chart1.Series[1]);
     plotSpeed    = new PointControl(chart1.Series[2]);
     plotHeight   = new PointControl(chart1.Series[3]);
     plotVolt     = new PointControl(chart1.Series[4]);
     plotCharge   = new PointControl(chart1.Series[5]);
     plotHum      = new PointControl(chart1.Series[6]);
     plotCO       = new PointControl(chart1.Series[7]);
     plotNH       = new PointControl(chart1.Series[8]);
     plotNO       = new PointControl(chart1.Series[9]);
     plotSelected = new PointControl(chart2.Series[0]);
     viewSelected = new ViewControlUnit(chart2.ChartAreas[0]);
     getFlyID();
     lastTime    = 0;
     pocketCount = 0;
     UpdateInfo();
 }
Beispiel #5
0
        private void Form1_Load(object sender, EventArgs e)
        {
            KeyPreview = true;
            Dictionary <string, string> dbConnInfo = LoadInfo();

            InitializeConnection(dbConnInfo["host"], dbConnInfo["uid"], dbConnInfo["password"], dbConnInfo["database"]);
            plotTemp   = new PointControl(cTemp.Series[0]);
            plotPress  = new PointControl(cPress.Series[0]);
            plotSpeed  = new PointControl(cSpeed.Series[0]);
            plotHeight = new PointControl(cHeight.Series[0]);
            plotVolt   = new PointControl(cVoltage.Series[0]);
            plotCharge = new PointControl(cCharge.Series[0]);
            plotHum    = new PointControl(cHum.Series[0]);
            plotCO     = new PointControl(cGas.Series[0]);
            plotNH     = new PointControl(cGas.Series[2]);
            plotNO     = new PointControl(cGas.Series[1]);
            getFlyID(out flyID, out flyName);
            tbFlyID.Text    = flyID.ToString();
            tbFlyName.Text  = flyName;
            lastTime        = 0;
            receivedPackets = new List <Packet>();
            UpdateInfo();
        }
 public void CopyFrom(PointControl source)
 {
     source.CopyTo(this);
 }