Example #1
0
        private void sel_pattern_Click(object sender, EventArgs e)
        {
            //Graphique graph = new Graphique(loaded_data);
            testgraph = new graph_form(loaded_data, min_data_value, max_data_value);

            stat            = new statistiques(testgraph);
            stat.Visible    = true;
            button6.Enabled = true;
        }
Example #2
0
        private void load_data_live_Click(object sender, EventArgs e)
        {
            //sel_pattern.Enabled = true;
            OpenFileDialog hist = new OpenFileDialog();

            hist.ShowDialog();
            name_file = hist.SafeFileName;

            file_name.Text      = "Selected file : \n" + name_file;
            file_name.ForeColor = System.Drawing.Color.Green;

            DateTime starttime = DateTime.Now;

            xlApp         = new Excel.Application();
            xlWorkbook    = xlApp.Workbooks.Open(hist.FileName);
            xlSheet       = (Excel.Worksheet)xlWorkbook.Sheets[1]; // get first sheet
            xlRange       = xlSheet.UsedRange;                     // get the entire used range
            ifopenedexcel = true;

            int numberOfRows = xlRange.Rows.Count;
            int numberOfCols = xlRange.Columns.Count;

            Double closevaluez  = Double.Parse((String)(xlRange.Cells[17, 2] as Excel.Range).Value.ToString(), System.Globalization.CultureInfo.InvariantCulture.NumberFormat);
            Double closevalue2z = Double.Parse((String)(xlRange.Cells[17, 3] as Excel.Range).Value.ToString(), System.Globalization.CultureInfo.InvariantCulture.NumberFormat);

            loaded_data.Add(new Data(closevaluez, DateTime.Now));

            graph_live   = new graph_form(loaded_data, 1.35, 1.4);
            stat         = new statistiques(graph_live);
            stat.Visible = true;

            DateTime tempsecoule;

            tempsecoule = DateTime.Now;

            myTimer.Tick += new EventHandler(TimerEventProcessor);
            myTimer.Tick += this.timer_Tick;


            // Sets the timer interval to x ms.
            myTimer.Interval = 60000;
            myTimer.Start();
            //this.xlWorkbook.AutoUpdateSaveChanges = false;
            // Runs the timer, and raises the event.
            while (exitFlag == false)
            {
                // Processes all the events in the queue.
                Application.DoEvents();
            }
        }
Example #3
0
        private void sel_pattern_Click(object sender, EventArgs e)
        {
            //Graphique graph = new Graphique(loaded_data);
            testgraph = new graph_form(loaded_data, min_data_value, max_data_value);

            stat = new statistiques(testgraph);
            stat.Visible = true;
            button6.Enabled = true;
        }
Example #4
0
        private void load_data_live_Click(object sender, EventArgs e)
        {
            //sel_pattern.Enabled = true;
            OpenFileDialog hist = new OpenFileDialog();
            hist.ShowDialog();
            name_file = hist.SafeFileName;

            file_name.Text = "Selected file : \n" + name_file;
            file_name.ForeColor = System.Drawing.Color.Green;

            DateTime starttime = DateTime.Now;

            xlApp = new Excel.Application();
            xlWorkbook = xlApp.Workbooks.Open(hist.FileName);
            xlSheet = (Excel.Worksheet)xlWorkbook.Sheets[1]; // get first sheet
            xlRange = xlSheet.UsedRange; // get the entire used range
            ifopenedexcel = true;

            int numberOfRows = xlRange.Rows.Count;
            int numberOfCols = xlRange.Columns.Count;

            Double closevaluez = Double.Parse((String)(xlRange.Cells[17, 2] as Excel.Range).Value.ToString(), System.Globalization.CultureInfo.InvariantCulture.NumberFormat);
            Double closevalue2z = Double.Parse((String)(xlRange.Cells[17, 3] as Excel.Range).Value.ToString(), System.Globalization.CultureInfo.InvariantCulture.NumberFormat);

            loaded_data.Add(new Data(closevaluez, DateTime.Now));

            graph_live = new graph_form(loaded_data, 1.35, 1.4);
            stat = new statistiques(graph_live);
            stat.Visible = true;

            DateTime tempsecoule;

            tempsecoule = DateTime.Now;

            myTimer.Tick += new EventHandler(TimerEventProcessor);
            myTimer.Tick += this.timer_Tick;

            // Sets the timer interval to x ms.
            myTimer.Interval = 60000;
            myTimer.Start();
            //this.xlWorkbook.AutoUpdateSaveChanges = false;
            // Runs the timer, and raises the event.
            while (exitFlag == false)
            {
                // Processes all the events in the queue.
                Application.DoEvents();
            }
        }