12345678910111213141516171819202122232425262728 |
- using Avalonia.Controls;
- using CalculatorSuperNew.Views;
- using ReactiveUI;
- namespace CalculatorSuperNew.ViewModels
- {
- public class MainWindowViewModel : ViewModelBase
- {
- UserControl us = new LoginPage();
- public UserControl US { get => us; set => this.RaiseAndSetIfChanged(ref us, value); }
- public LoginPageViewModel loginPage = new LoginPageViewModel();
- public LoginPageViewModel LP { get => loginPage; set => loginPage = value; }
- public CalculatorViewModel calculator = new CalculatorViewModel();
- public CalculatorViewModel CP { get => calculator; set => calculator = value; }
- public void toCalculator()
- {
- if(LP.LogIn())
- {
- US = new Calculator();
- }
- }
- }
- }
|