Commit c56a1e00 authored by 潘栩锋's avatar 潘栩锋 🚴

可以修改数据库地址

parent b42aa275
......@@ -15,70 +15,33 @@ namespace FLY.Thick.Base.Server
public class SysParam : INotifyPropertyChanged, ISaveToXml
{
#region 属性,成员变量的代理
private IPEndPoint m_IPEP_server = Misc.StringConverter.ToIPEndPoint("127.0.0.1:20006");
public IPEndPoint LocalEP
{
get
{
return m_IPEP_server;
}
set
{
m_IPEP_server = value;
NotifyPropertyChanged("LocalEP");
}
}
private IPEndPoint m_IPEP_flyad7_device = Misc.StringConverter.ToIPEndPoint("192.168.250.10:20006");
public IPEndPoint FLYAD7EP
{
get
{
return m_IPEP_flyad7_device;
}
set
{
if (value == null)
return;
if (!m_IPEP_flyad7_device.Equals(value))
{
m_IPEP_flyad7_device = new IPEndPoint(value.Address, value.Port);
NotifyPropertyChanged("FLYAD7EP");
//Save();
}
}
}
/// <summary>
/// 本机obj服务地址
/// </summary>
[PropertyChanged.DoNotCheckEquality]
public IPEndPoint LocalEP { get; set; } = Misc.StringConverter.ToIPEndPoint("127.0.0.1:20006");
private bool flyad7_hascrc = false;
public bool FLYAD7_HasCRC
{
get { return flyad7_hascrc; }
set {
if (flyad7_hascrc != value)
{
flyad7_hascrc = value;
NotifyPropertyChanged("FLYAD7_HasCRC");
}
}
}
/// <summary>
/// AD盒地址
/// </summary>
[PropertyChanged.DoNotCheckEquality]
public IPEndPoint FLYAD7EP { get; set; } = Misc.StringConverter.ToIPEndPoint("192.168.250.10:20006");
private int flyad7_grid_smooth = 0;
/// <summary>
/// AD盒通讯使用 CRC校验
/// </summary>
public bool FLYAD7_HasCRC { get; set; } = false;
/// <summary>
/// grid 平滑
/// </summary>
public int FLYAD7_GridSmooth
{
get { return flyad7_grid_smooth; }
set
{
if (flyad7_grid_smooth != value)
{
flyad7_grid_smooth = value;
NotifyPropertyChanged("FLYAD7_GridSmooth");
}
}
}
public int FLYAD7_GridSmooth { get; set; } = 0;
/// <summary>
/// 数据库地址,只读,界面没法修改
/// </summary>
public string DBPath { get; set; } = @"D:\flydata\thick_history.sqlite3";
#endregion
private string param_path = "sysparam.xml";
......@@ -122,11 +85,7 @@ namespace FLY.Thick.Base.Server
#region INotifyPropertyChanged 成员
public event PropertyChangedEventHandler PropertyChanged;
protected void NotifyPropertyChanged(string propertyName)
{
if (this.PropertyChanged != null)
this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#endregion
public string[] GetSavePropertyNames()
......@@ -135,7 +94,8 @@ namespace FLY.Thick.Base.Server
"LocalEP",
"FLYAD7EP",
"FLYAD7_HasCRC",
"FLYAD7_GridSmooth"
"FLYAD7_GridSmooth",
"DBPath"
};
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment