| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using SWRIS.Dtos;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.ComponentModel;
- namespace SWRIS.Models.ViewModel
- {
- public class MainViewModel : INotifyPropertyChanged
- {
- private string appName;
- private string version;
- private string copyright;
- private string currentPage = "Home";
- private DebugMessageModel debugMessage = new DebugMessageModel(string.Empty);
- public MainViewModel()
- {
- AppName = App.Config.AppName;
- Version = App.Config.Version;
- Copyright = App.Config.Copyright;
- SwitchInstances = App.Config.SwitchInstances;
-
- }
- public string AppName
- {
- get => appName;
- set { appName = value; OnPropertyChanged("AppName"); }
- }
- public string Version
- {
- get => version;
- set { version = value; OnPropertyChanged("Version"); }
- }
- public string Copyright
- {
- get => copyright;
- set { copyright = value; OnPropertyChanged("Copyright"); }
- }
- public string CurrentPage
- {
- get => currentPage;
- set { currentPage = value; OnPropertyChanged("CurrentPage"); }
- }
- public DebugMessageModel DebugMessage
- {
- get => debugMessage;
- set { debugMessage = value; OnPropertyChanged("DebugMessage"); }
- }
-
- public DateTimeModel SystemTime { set; get; } = new DateTimeModel();
- public List<SwitchInstance> SwitchInstances { get; set; } = new List<SwitchInstance>();
- public event PropertyChangedEventHandler PropertyChanged;
- protected internal virtual void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
- }
- }
|