This commit is contained in:
liufei
2021-04-13 15:26:19 +08:00
parent cc399e2ef7
commit 5f38782623
26 changed files with 1778 additions and 1787 deletions

61
ViewModel/AppData.cs Normal file
View File

@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace GeekDesk.ViewModel
{
[Serializable]
class AppData : INotifyPropertyChanged
{
private List<string> menuList = new List<string>();
private Dictionary<string, List<IconInfo>> iconMap = new Dictionary<string, List<IconInfo>>();
private AppConfig appConfig = new AppConfig();
public List<string> MenuList
{
get
{
return menuList;
}
set
{
menuList = value;
OnPropertyChanged("MenuList");
}
}
public Dictionary<string, List<IconInfo>> IconMap
{
get
{
return iconMap;
}
set
{
iconMap = value;
OnPropertyChanged("IconMap");
}
}
public AppConfig AppConfig
{
get
{
return appConfig;
}
set
{
appConfig = value;
OnPropertyChanged("AppConfig");
}
}
[field: NonSerializedAttribute()]
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}