protected bool DrawGraph(string path) { int res = record.ValidateRecord(path); int res2 = record.ValidateRecordWindows7(path); if (res == 1) { flag_record = true; flag_graph = true; record.ReadRecord(path); } else if (res2 == 1) { flag_record = true; flag_graph = true; record.ReadRecordWindows7(path); } else { flag_record = false; return(false); } string[] names = new string[4]; names[0] = "канал 1"; names[1] = "канал 2"; names[2] = "канал 3"; names[3] = "канал 4"; int[] m = new int[4]; m[0] = m[1] = m[2] = m[3] = record.KadrsNumber; int i, j; cl2d.DrawGraphick(record.time, "t, секунды", record.ch, "U, В", m, names, record.NumberOfChannels, OpenGlControlGraph.Width, OpenGlControlGraph.Height); if (old_pos > -1) { dataGridViewFiles.Rows[old_pos].DefaultCellStyle.BackColor = System.Drawing.Color.White; } old_pos = dataGridViewFiles.CurrentRow.Index; dataGridViewFiles.Rows[old_pos].DefaultCellStyle.BackColor = System.Drawing.Color.Green; OpenGlControlGraph.Invalidate(); return(true); }