123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using Avalonia.Controls;
- using MPrakt.ViewModels;
- 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;
- }
- TourViewModel _toursVM = new TourViewModel();
- public TourViewModel ToursVM
- {
- get => _toursVM;
- set => _toursVM = value;
- }
- OtelsViewModel _hotelsVM = new OtelsViewModel();
- public OtelsViewModel 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();
- }
- }
- }
|