AboutViewModel.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. using Shaker.Models;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Reflection;
  6. using System.Runtime.InteropServices;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace ShakerApp.ViewModels
  10. {
  11. internal class AboutViewModel:DisplayViewModelBase<IModel>
  12. {
  13. private AboutViewModel()
  14. {
  15. Content = typeof(Views.AboutView);
  16. ButtonVisibily = false;
  17. }
  18. static AboutViewModel()
  19. {
  20. }
  21. public override double Width => 600;
  22. public override double Height => 460;
  23. public override bool CanResize => false;
  24. public string OSVersion => RuntimeInformation.OSDescription;
  25. public string FrameworkVersion => RuntimeInformation.FrameworkDescription;
  26. public string MachineName => Environment.MachineName;
  27. public string Version => Assembly.GetEntryAssembly()?.GetName()?.Version?.ToString() ?? "Unknown";
  28. public static AboutViewModel Instance { get; } = new AboutViewModel();
  29. }
  30. }