123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using Avalonia.Controls;
- using ReactiveUI;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using travel.Models;
- using travel.ViewModels;
- using travel.Views;
- namespace travel.ViewModels
- {
- public class MainWindowViewModel : ViewModelBase
- {
- public static UpShechkovaContext myConnection = new UpShechkovaContext();
- UserControl us = new ToursPage();
- public UserControl US { get => us; set => this.RaiseAndSetIfChanged(ref us, value); }
- ToursPageViewModel tPVMl1VM = new();
- public ToursPageViewModel TP_VM { get => tPVMl1VM; set => tPVMl1VM = value; }
- HotelPageViewModel hpVM = new HotelPageViewModel();
- public HotelPageViewModel hp_VM { get => hpVM; set => hpVM = value; }
- HotelCardViewModel hcVM = new HotelCardViewModel();
- public HotelCardViewModel hc_VM { get => hcVM; set => hcVM = value; }
- public void GoPageHotel()
- {
- hp_VM = new HotelPageViewModel();
- US = new HotelPage();
- }
- public void GoPageTour()
- {
- TP_VM = new ToursPageViewModel();
- US = new ToursPage();
- }
- public void GoHotelCard()
- {
- hc_VM = new HotelCardViewModel();
- US = new HotelCard();
- }
- public void GoHotelCardChange(int ID)
- {
- hc_VM = new HotelCardViewModel(ID);
- US = new HotelCard();
- }
- }
- }
|