ba si mais quand je veu afficher, il me met une grosse croix rouge en plein milieu et me sort un message d'erreur : Le format de la chaine d'entré est incorrect.
public void DrawCurvePoint(PaintEventArgs e) {
string sqlstr = "Select conso100km from Conso;"; DataSet ds = connexionModDeco(sqlstr);
int x = 80; int k =1; foreach (DataRow dr in ds.Tables[0].Rows) {
Pen redPen =
new Pen(Color.Red, 2); x = 80 + 5;
int y = Convert.ToInt32(ds.Tables[0].Rows[k].ToString()); Point point5 =
new Point(x, y); Point[] curvePoints5 = {point5};
k++;
e.Graphics.DrawLines(redPen, curvePoints5);
}
Pen BluePen =
new Pen(Color.Blue, 1); Point point1 =
new Point(75, 350); Point point2 =
new Point(750, 350); Point[] curvePoints = {point1, point2};
e.Graphics.DrawLines(BluePen, curvePoints);
Point point3 =
new Point(75, 100); Point[] curvePoints2 = {point1, point3};
e.Graphics.DrawLines(BluePen, curvePoints2);
}