Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.progressTableAdapter.Fill(this.progressGraphDataSet.Progress);
- DataSet ds = new System.Data.DataSet();
- DataTable dt = new DataTable();
- dt.Columns.Add("X");
- dt.Columns.Add("Y");
- string connection = @"Data Source=../../Database1.sdf";
- SqlCeConnection cn = new SqlCeConnection(connection);
- try
- {
- cn.Open();
- }
- catch (SqlCeException ex)
- {
- MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
- Application.ExitThread();
- }
- SqlCeDataAdapter adt = new SqlCeDataAdapter("SELECT * FROM Progress WHERE User_ID ='" + ClassGlobal.userID + "' AND Difficulty = 1", cn);
- SqlCeCommandBuilder commBuilder = new SqlCeCommandBuilder(adt);
- adt.MissingSchemaAction = MissingSchemaAction.AddWithKey;
- adt.Fill(dt);
- this.progressChart.DataSource = dt;
- ds.Tables.Add(dt);
- progressChart.DataSource = ds;
- progressChart.Series["Score"].ChartType = SeriesChartType.Line;
- progressChart.Series["Score"].BorderDashStyle = ChartDashStyle.Solid;
- progressChart.Series["Score"].BorderWidth = 2;
- progressChart.Series["Score"].Color = Color.Blue;
- progressChart.Series["Score"].MarkerStyle = MarkerStyle.Circle;
- progressChart.Series["Score"].MarkerSize = 6;
- progressChart.Series["Score"].MarkerColor = Color.Black;
- progressChart.Series["Score"].XValueMember = "X";
- progressChart.Series["Score"].YValueMembers = "Y";
- progressChart.DataBind();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement