public statistiques(graph_form f) { InitializeComponent(); f.TopLevel = false; f.Visible = true; f.FormBorderStyle = FormBorderStyle.None; this.MinimumSize = f.MaximumSize; this.MaximumSize = new Size(1200, 640); this.WindowState = FormWindowState.Maximized; //this.tabControl1.Size = f.Size; tabControl1.TabPages[0].Controls.Add(f); f.Anchor = (AnchorStyles.Left | AnchorStyles.Top); //f.Dock = DockStyle.Fill; // //f.Size = new Size(500, 400); //this.tabPage1.Dock = DockStyle.Fill; this.tabPage1.Size = f.Size; //.Size = new Size(800, 500); //tabControl1.TabPages[0].Size = new Size(800, 500); this.listView1.Columns.Add("Sum"); }
public statistiques(graph_form f) { InitializeComponent(); f.TopLevel = false; f.Visible = true; f.FormBorderStyle = FormBorderStyle.None; this.MinimumSize = f.MaximumSize; this.MaximumSize = new Size(1200, 640); this.WindowState = FormWindowState.Maximized; //this.tabControl1.Size = f.Size; tabControl1.TabPages[0].Controls.Add(f); f.Anchor = (AnchorStyles.Left | AnchorStyles.Top ); //f.Dock = DockStyle.Fill; // //f.Size = new Size(500, 400); //this.tabPage1.Dock = DockStyle.Fill; this.tabPage1.Size = f.Size; //.Size = new Size(800, 500); //tabControl1.TabPages[0].Size = new Size(800, 500); this.listView1.Columns.Add("Sum"); }
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; }
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(); } }
public detection(graph_form graph,List<Data> datalist) { PatternArray = new double[10,10]{ {-1.2234, -1.49996, -1.4136, -1.49996, 1, 1, -1.49996, -1.4136, -1.49996, -1.2234}, {-0.9456, -1.0833, -1.0688, -1.0833, 1, 1, -1.0833, -1.0688, -1.0833, -0.9456}, {-0.6678, -0.66664, -0.724, -0.6664, 0.7222, 0.7222, -0.6664, -0.724, -0.66664, -0.6678}, {-0.389, -0.24998, -0.3792, -0.24998, 0.4444, 0.4444, -0.24998, -0.3792, -0.24998, -0.389}, {-0.112, 0.16668, -0.0344, 0.16668, 0.1666, 0.1666, 0.16668, -0.0344, 0.16668, -0.112}, {0.1666, 0.58334, 0.3104, 0.58334, -0.112, -0.112, 0.58334, 0.3104, 0.58334, 0.1666}, {0.444, 1, 0.6552, 1, -0.389, -0.389, 1, 0.6552, 1, 0.4444}, {0.7222, 1, 1, 1, -0.6678, -0.6678, 1, 1, 1, 0.7222}, {1, 0.58334, 1, 0.58334, -0.9456, -0.9456, 0.58334, 1, 0.58334, 1}, {1, 0.16668, 0.6552, 0.16668, -1.2234, -1.2234, 0.16668, 0.6552, 0.16668, 1}}; listOfDatas = datalist; this.graph = graph; }
public detection(graph_form graph, List <Data> datalist) { PatternArray = new double[10, 10] { { -1.2234, -1.49996, -1.4136, -1.49996, 1, 1, -1.49996, -1.4136, -1.49996, -1.2234 }, { -0.9456, -1.0833, -1.0688, -1.0833, 1, 1, -1.0833, -1.0688, -1.0833, -0.9456 }, { -0.6678, -0.66664, -0.724, -0.6664, 0.7222, 0.7222, -0.6664, -0.724, -0.66664, -0.6678 }, { -0.389, -0.24998, -0.3792, -0.24998, 0.4444, 0.4444, -0.24998, -0.3792, -0.24998, -0.389 }, { -0.112, 0.16668, -0.0344, 0.16668, 0.1666, 0.1666, 0.16668, -0.0344, 0.16668, -0.112 }, { 0.1666, 0.58334, 0.3104, 0.58334, -0.112, -0.112, 0.58334, 0.3104, 0.58334, 0.1666 }, { 0.444, 1, 0.6552, 1, -0.389, -0.389, 1, 0.6552, 1, 0.4444 }, { 0.7222, 1, 1, 1, -0.6678, -0.6678, 1, 1, 1, 0.7222 }, { 1, 0.58334, 1, 0.58334, -0.9456, -0.9456, 0.58334, 1, 0.58334, 1 }, { 1, 0.16668, 0.6552, 0.16668, -1.2234, -1.2234, 0.16668, 0.6552, 0.16668, 1 } }; listOfDatas = datalist; this.graph = graph; }
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; }
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(); } }