public void OcenyUczniaTest() { Dictionary <int, int> test_pair = new Dictionary <int, int>(); test_pair.Add(3, 1); Dictionary <int, int> actual_pair = DBhelp.OcenyUcznia(2); Assert.IsTrue(actual_pair.TryGetValue(3, out int val) == test_pair.TryGetValue(3, out int val1)); }
void wykres1() { List <KeyValuePair <int, int> > valueList = new List <KeyValuePair <int, int> >(); Dictionary <int, int> db = DBhelp.OcenyUcznia(MainWindow.user.id); foreach (KeyValuePair <int, int> temp in db) { valueList.Add(temp); } //Setting data for line chart mcChart.Visibility = Visibility.Hidden; mcCharobec.Visibility = Visibility.Hidden; mcChartpie.Visibility = Visibility.Visible; ((PieSeries)mcChartpie.Series[0]).ItemsSource = valueList; }