1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using Avalonia.Controls;
- using ReactiveUI;
- using System.Net;
- using TourAgent.Models;
- using TourAgent.Views;
- namespace TourAgent.ViewModels
- {
- public class MainWindowViewModel : ViewModelBase
- {
- public static UP_SmirnovContext DB = new UP_SmirnovContext();
- UserControl us = new Views.Menu();
- public UserControl US
- {
- get => us;
- set => this.RaiseAndSetIfChanged(ref us, value);
- }
- MenuViewModel menuVM = new MenuViewModel();
- public MenuViewModel MenuVM
- {
- get => menuVM;
- set => menuVM = value;
- }
- ToursViewModel _toursVM = new ToursViewModel();
- public ToursViewModel ToursVM
- {
- get => _toursVM;
- set => _toursVM = value;
- }
- HotelsViewModel _hotelsVM = new HotelsViewModel();
- public HotelsViewModel HotelsVM
- {
- get => _hotelsVM;
- set => _hotelsVM = value;
- }
- public void ChangePageToHotels()
- {
- US = new Hotels();
- }
- public void ChangePageToTours()
- {
- US = new Tours();
- }
- public void ToMenu()
- {
- US = new Views.Menu();
- }
- }
- }
|