123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using Avalonia.Controls;
- using ReactiveUI;
- using scool.Models;
- using scool.Views;
- namespace scool.ViewModels
- {
- public class MainWindowViewModel : ViewModelBase
- {
- public static _43pErmolinContext connect = new _43pErmolinContext();
- UserControl us = new DataTeachers();
- public UserControl US
- {
- get => us;
- set => this.RaiseAndSetIfChanged(ref us, value);
- }
- DataTeachersViewModel dataTeachersViewModel = new DataTeachersViewModel();
- AddTeacherViewModel addTeacherViewModel = new AddTeacherViewModel();
- public DataTeachersViewModel DataTeachersVM
- {
- get => dataTeachersViewModel;
- set => dataTeachersViewModel = value;
- }
- public AddTeacherViewModel AddTeacherVM
- {
- get => addTeacherViewModel;
- set => addTeacherViewModel = value;
- }
- public void ToAdd()
- {
- US = new AddTeacher();
- }
- public void ToData()
- {
- US = new DataTeachers();
- }
- }
- }
|