You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
3.6 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using SlnMesnac.RfidUpload.Business;
using SlnMesnac.RfidUpload.Model;
using SlnMesnac.RfidUpload.Model.apiParam;
using SlnMesnac.RfidUpload.Model.config;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* 版权所有 (c) 2024 WenJY 保留所有权利。
* CLR版本4.0.30319.42000
* 机器名称T14-GEN3-7895
* 命名空间SlnMesnac.RfidUpload.UI.viewModel
* 唯一标识a65ccfd9-c493-46c4-9905-7a7d55ef1508
*
* 创建者WenJY
* 电子邮箱:
* 创建时间2024-12-06 16:31:16
* 版本V1.0.0
* 描述:
*
*--------------------------------------------------------------------
* 修改人:
* 时间:
* 修改说明:
*
* 版本V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace SlnMesnac.RfidUpload.UI.viewModel
{
public partial class systemSetWindowViewModel : ObservableObject
{
private AppConfig appConfig = AppConfig.Instance;
public systemSetWindowViewModel()
{
Init();
}
#region << 属性 >>
public string _requestURL = string.Empty;
public string requestURL
{
get => _requestURL;
set => SetProperty(ref _requestURL, value);
}
public string _sysCode = string.Empty;
public string sysCode
{
get => _sysCode;
set => SetProperty(ref _sysCode, value);
}
public string _password = string.Empty;
public string password
{
get => _password;
set => SetProperty(ref _password, value);
}
public string _ak = string.Empty;
public string ak
{
get => _ak;
set => SetProperty(ref _ak, value);
}
public string _sk = string.Empty;
public string sk
{
get => _sk;
set => SetProperty(ref _sk, value);
}
public string _opOrgCode = string.Empty;
public string opOrgCode
{
get => _opOrgCode;
set => SetProperty(ref _opOrgCode, value);
}
public string _devicedId = string.Empty;
public string devicedId
{
get => _devicedId;
set => SetProperty(ref _devicedId, value);
}
public string _localUrl = string.Empty;
public string localUrl
{
get => _localUrl;
set => SetProperty(ref _localUrl, value);
}
#endregion
/// <summary>
/// 初始化参数
/// </summary>
private void Init()
{
requestURL = appConfig.requestURL;
sysCode = appConfig.sysCode;
password = appConfig.password;
ak = appConfig.ak;
sk = appConfig.sk;
opOrgCode = appConfig.opOrgCode;
devicedId = appConfig.devicedId;
localUrl = appConfig.localUrl;
}
[RelayCommand]
private void Submit()
{
appConfig.requestURL = requestURL;
appConfig.sysCode = sysCode;
appConfig.password = password;
appConfig.ak = ak;
appConfig.sk = sk;
appConfig.opOrgCode = opOrgCode;
appConfig.devicedId = devicedId;
appConfig.localUrl = localUrl;
MessageBox.Show("系统参数修改成功!");
}
}
}