12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using Avalonia.Controls;
- using Practikaoy.Models;
- using Practikaoy.Views;
- using ReactiveUI;
- using System.Net;
- namespace Practikaoy.ViewModels
- {
- public class MainWindowViewModel : ViewModelBase
- {
- Sazonova2Context ConnectBD = new Sazonova2Context();
- AuthPageViewModel _authPage = new AuthPageViewModel();
- MeRoomViewModel _meRoom = new MeRoomViewModel(1);
- UserControl canic = new AuthPas();
- public UserControl Canic
- {
- get => canic;
- set => this.RaiseAndSetIfChanged(ref canic, value);
- }
- // UserControl _uthP = new MeRoomViewModel();
- public MeRoomViewModel MeRoom { get => _meRoom; set => _meRoom = value; }
- public AuthPageViewModel AuthPage { get => _authPage; set => _authPage = value; }
- public UserControl USE { get => canic; set => this.RaiseAndSetIfChanged(ref canic, value); }
- public void NextPage()
- {
- int ex = 0;
- if (AuthPage.PiklsPerson(ref ex))
- {
- _meRoom = new MeRoomViewModel(ex);
- USE = new MeRoom();
- }
- else { USE = new AuthPas(); }
- }
- public void PreviousPage()
- {
- MeRoom.IsEnableEdit = true;
- }
- }
- }
|