/// <summary> /// /// </summary> /// <param name="image"></param> private void ImageGrade_Click(Image image) { if (_selectedGrade != null) { _selectedGrade.Opacity = 0.5; } image.Opacity = 1; _selectedGrade = image; long id = _gradesDictionary[image.Name]; int num = _contentManager.GetNoOfWeeks(id); NoOfWeeks.Text = num.ToString(); num = _contentManager.GetNoOfLessons(id); NoOfLessons.Text = num.ToString(); if (num > 0) { EditLessons.IsEnabled = true; } num = _contentManager.GetNoOfFiles(id); NoOfFiles.Text = num.ToString(); if (num > 0) { EditFiles.IsEnabled = true; } EditGrade.IsEnabled = true; DeleteGrade.IsEnabled = true; EditWeeks.IsEnabled = true; }
public void LoadParentComponents() { if (_topics) { parentComponents = _contentManager.GetAllTopics(); numOfLessons = _contentManager.GetNoOfTopicsLessons(); } else { parentComponents = _contentManager.GetAllWeeks(_contentManager.GetComponent(_selectedGrade)); numOfLessons = _contentManager.GetNoOfLessons(_selectedGrade); } listBox.ItemsSource = parentComponents; listBox.DisplayMemberPath = "Title"; listBox.Items.Refresh(); for (int i = 0; i < 100; i++) { comboBox.Items.Add((i + 1).ToString()); } comboBox.Text = 1.ToString(); }