private void BtnSaveCourse_Click(object sender, RoutedEventArgs e)
 {
     if (txtCourse.Text != "Please select a course first." && txtCourse.Text != "")
     {
         CourseInfo item = iliasHandling.lCourseInfos.SingleOrDefault(x => x.CourseName == txtCourse.Text);
         item.CourseOwnName = txtOwnName.Text;
         config.SetCourseName(item.CourseId, item.CourseOwnName);
     }
 }
 private void BtnEditCourse_Click(object sender, RoutedEventArgs e)
 {
     if (listviewCourse.SelectedItems.Count > 0)
     {
         CourseInfo item = (CourseInfo)listviewCourse.SelectedItems[0];
         txtCourse.Text  = item.CourseName;
         txtOwnName.Text = item.CourseOwnName;
     }
     else
     {
         txtCourse.Text = "Please select a course first.";
     }
 }