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(); UserControl canic = new AuthPas(); public UserControl Canic { get => canic; set => this.RaiseAndSetIfChanged(ref canic, value); } MeRoomViewModel _meRoom = new MeRoomViewModel(1); UserControl _root = new MeRoom(); 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 NaxtPage() { USE = new MeRoom(); } public void PsssNext() { int id = 0; if (AuthPage.PiklsPerson(ref id)) { _meRoom = new MeRoomViewModel(id); USE = new MeRoom(); } else USE = new MeRoom(); } public void EndintRoom() { MeRoom.UserisChanged = true; } } }