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

可以修改数据库地址

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