Merge branch 'main' of github.com:KJD2025/29WxOrder
This commit is contained in:
commit
26f2fb9fd2
12 files changed
+646
-47
No files matched your search
@@ -0,0 +1,40 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user