MainWindowViewModel.cs 845 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Avalonia.Controls;
  2. using LoginGenerator.Models;
  3. using ReactiveUI;
  4. using System;
  5. using System.IO;
  6. namespace LoginGenerator.ViewModels
  7. {
  8. public class MainWindowViewModel : ViewModelBase
  9. {
  10. UserControl us = new GeneratePage();
  11. public UserControl US
  12. {
  13. get => us;
  14. set => this.RaiseAndSetIfChanged(ref us, value);
  15. }
  16. DataOutputViewModel dataOutput = new DataOutputViewModel();
  17. public DataOutputViewModel DataOutputVM
  18. {
  19. get => dataOutput;
  20. set => dataOutput = value;
  21. }
  22. public void ViewUsersData()
  23. {
  24. US = new DataOutput();
  25. DataOutputVM.FillingUsersList();
  26. }
  27. public void ViewGeneratePage()
  28. {
  29. US = new GeneratePage();
  30. }
  31. }
  32. }