public TopicsCreation(Diction_Master___Library.ContentManager manager) { _contentManager = manager; _topics = new ObservableCollection <Component>(); InitializeComponent(); _topics = _contentManager.GetAllTopics(); listBox.ItemsSource = _topics; listBox.DisplayMemberPath = "Title"; for (int i = 0; i < 100; i++) { comboBox.Items.Add(i); } comboBox.Text = 1.ToString(); }
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(); }