41 lines
777 B
C#
41 lines
777 B
C#
using AllBase.Model.Config;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using WPFCommon.Models;
|
|
|
|
namespace _29WxOrderWpf.ViewModels;
|
|
|
|
public class SettingViewModel : BindableBaseEx
|
|
{
|
|
public const string SettingFileName = "setting";
|
|
public SettingViewModel()
|
|
{
|
|
}
|
|
/// <summary>版本号</summary>
|
|
public string Version
|
|
{
|
|
get => GetValue<string>();
|
|
private set => SetValue(value);
|
|
}
|
|
|
|
public bool AutoSwitchGiftType
|
|
{
|
|
get => GetValue<bool>();
|
|
set => SetValue(value);
|
|
}
|
|
public void Assign(SettingConfig config)
|
|
{
|
|
AutoSwitchGiftType = config.AutoSwitchGiftType;
|
|
}
|
|
public SettingConfig ToConfig()
|
|
{
|
|
return new SettingConfig
|
|
{
|
|
AutoSwitchGiftType = AutoSwitchGiftType
|
|
};
|
|
}
|
|
}
|