Files
GeekDesk/ViewModel/AppConfig.cs

97 lines
2.3 KiB
C#
Raw Normal View History

2021-04-13 15:26:19 +08:00

2021-04-12 13:46:05 +08:00
using GeekDesk.Constant;
2021-04-13 15:26:19 +08:00
using System;
using System.ComponentModel;
2021-04-12 13:46:05 +08:00
namespace GeekDesk.ViewModel
{
2021-04-13 15:26:19 +08:00
2021-04-12 13:46:05 +08:00
[Serializable]
2021-04-13 15:26:19 +08:00
public class AppConfig : System.ComponentModel.INotifyPropertyChanged
2021-04-12 13:46:05 +08:00
{
private int menuSortType = (int)SortType.CUSTOM; //菜单排序类型
private int iconSortType = (int)SortType.CUSTOM; //图表排序类型
private double windowWidth = (double)DefaultConstant.WINDOW_WIDTH; //窗口宽度
private double windowHeight = (double)DefaultConstant.WINDOW_HEIGHT; //窗口高度
private double menuCardWidth = (double)DefaultConstant.MENU_CARD_WIDHT;//菜单栏宽度
2021-04-13 15:26:19 +08:00
2021-04-12 13:46:05 +08:00
#region GetSet
2021-04-13 15:26:19 +08:00
public int MenuSortType
{
2021-04-12 13:46:05 +08:00
get
{
return menuSortType;
}
set
{
menuSortType = value;
2021-04-13 15:26:19 +08:00
OnPropertyChanged("MenuSortType");
2021-04-12 13:46:05 +08:00
}
}
public int IconSortType
{
get
{
return iconSortType;
}
set
{
iconSortType = value;
2021-04-13 15:26:19 +08:00
OnPropertyChanged("IconSortType");
2021-04-12 13:46:05 +08:00
}
}
public double WindowWidth
{
get
{
return windowWidth;
}
set
{
windowWidth = value;
2021-04-13 15:26:19 +08:00
OnPropertyChanged("WindowWidth");
2021-04-12 13:46:05 +08:00
}
}
public double WindowHeight
{
get
{
return windowHeight;
}
set
{
windowHeight = value;
2021-04-13 15:26:19 +08:00
OnPropertyChanged("WindowHeight");
2021-04-12 13:46:05 +08:00
}
}
public double MenuCardWidth
{
get
{
return menuCardWidth;
}
set
{
menuCardWidth = value;
2021-04-13 15:26:19 +08:00
OnPropertyChanged("MenuCardWidth");
2021-04-12 13:46:05 +08:00
}
}
2021-04-13 15:26:19 +08:00
[field: NonSerializedAttribute()]
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
2021-04-12 13:46:05 +08:00
#endregion
}
}