1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using Avalonia.Controls;
- using Avalonia.Media;
- using LoginGenerator.Models;
- using ReactiveUI;
- using System;
- using System.IO;
- namespace LoginGenerator.ViewModels
- {
- public class MainWindowViewModel : ViewModelBase
- {
- UserControl us = new GeneratePage();
- public UserControl US
- {
- get => us;
- set => this.RaiseAndSetIfChanged(ref us, value);
- }
- DataOutputViewModel dataOutput = new DataOutputViewModel();
- public DataOutputViewModel DataOutputVM
- {
- get => dataOutput;
- set => dataOutput = value;
- }
- GeneratePageViewModel generatePage = new GeneratePageViewModel();
- public GeneratePageViewModel GeneratePageVM
- {
- get => generatePage;
- set => generatePage = value;
- }
- public void ViewUsersData()
- {
- US = new DataOutput();
- DataOutputVM.FillingUsersList();
- if(GeneratePageVM.Theme == true)
- {
- DataOutputVM.Background = new SolidColorBrush(Color.FromRgb(80, 80, 80));
- DataOutputVM.Background2 = new SolidColorBrush(Color.FromRgb(128, 128, 128));
- }
- else
- {
- DataOutputVM.Background = new SolidColorBrush(Color.FromRgb(248, 244, 255));
- DataOutputVM.Background2 = new SolidColorBrush(Color.FromRgb(236, 233, 255));
- }
- }
- public void ViewGeneratePage()
- {
- US = new GeneratePage();
- }
-
- }
- }
|