/// <summary> /// Установить фото /// </summary> /// <param name="fileName"></param> public void SetPhoto(string fileName) { IProfileModel model = LecturerProvider.SetPhoto(fileName); this.Photo = model.Photo; Updated?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Получить предметы /// </summary> private void GetSubjects() { Subjects = LecturerProvider.GetSubjects(); for (int i = 0; i < Subjects.Count; i++) { subjectComboBox.Items.Add(Subjects[i].Name); } if (Subjects.Count > 0) { subjectComboBox.SelectedIndex = 0; } }
private void InitializeProfile() { var profileModel = LecturerProvider.GetMe(); ProfilePresenter presenter = new ProfilePresenter(profileModel); var profileView = new ProfileView(); compContainer.AttachView(profileView); profileView.AttachToPresenter(presenter, true); profileButton.Tag = profileView; }
/// <summary> /// Получить предметы /// </summary> private void GetSubjects() { Subjects = LecturerProvider.GetSubjects(); if (Subjects.Count == 0) { return; } for (int i = 0; i < Subjects.Count; i++) { subjectComboBox.Items.Add(Subjects[i].Name); } if (Subjects.Count > 0) { subjectComboBox.SelectedIndex = 0; Presenter.SetSubject(Subjects[subjectComboBox.SelectedIndex]); } }