Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DialogResult result = openFileDialog1.ShowDialog();

            if (result == DialogResult.OK)
            {
                string file = openFileDialog1.FileName;
                //byte[] fileData = File.ReadAllBytes(file);
                //string fileString = Convert.ToBase64String(fileData);


                try
                {
                    _sensorLog = _sensorService.GetSensorLog(file);
                    GenerateChart(_sensorLog);
                    chart1.Visible = true;
                    chart1.ChartAreas[0].AxisY.ScaleView.ZoomReset();
                    chart1.ChartAreas[0].AxisX.ScaleView.ZoomReset();

                    RunStats stats = new RunStats(_sensorLog);
                    label1.Text = stats.ToString();
                }
                catch (IOException)
                {
                }
            }
        }