Commit 107d8129 authored by 潘栩锋's avatar 潘栩锋 🚴

修改, MainWindow 忘记了添加mSysParam_PropertyChanged

parent 7d4961bb
...@@ -16,7 +16,15 @@ namespace FLY.OBJComponents.Common ...@@ -16,7 +16,15 @@ namespace FLY.OBJComponents.Common
/// <param name="val">属性值</param> /// <param name="val">属性值</param>
public static void SetValue(object obj, string propertyName, object v) public static void SetValue(object obj, string propertyName, object v)
{ {
PropertyInfo property = obj.GetType().GetProperties().First(p => { return p.Name == propertyName; }); PropertyInfo property;
try
{
property = obj.GetType().GetProperty(propertyName);
}
catch(Exception e)
{
throw new Exception("PropertiesManager_JSON 类型="+obj.GetType().ToString()+" 不能找到 属性名=" + propertyName, e);
}
if (property != null) if (property != null)
{ {
if (v.GetType() == property.PropertyType) if (v.GetType() == property.PropertyType)
......
...@@ -63,56 +63,22 @@ namespace ThickTcpUiInWindow ...@@ -63,56 +63,22 @@ namespace ThickTcpUiInWindow
} }
} }
} }
string warningTipPath;
/// <summary> /// <summary>
/// 报警音乐路径 /// 报警音乐路径
/// </summary> /// </summary>
public string WarningTipPath public string WarningTipPath { get; set; }
{
get { return warningTipPath; }
set
{
if (warningTipPath != value)
{
warningTipPath = value;
NotifyPropertyChanged("WarningTipPath");
}
}
}
bool haveosk = false;
/// <summary> /// <summary>
/// 使用虚拟键盘 /// 使用虚拟键盘
/// </summary> /// </summary>
public virtual bool HaveOSK public bool HaveOSK { get; set; }
{
get { return haveosk; }
set
{
if (haveosk != value)
{
haveosk = value;
NotifyPropertyChanged("HaveOSK");
}
}
}
bool haveosk_mouse = false;
/// <summary> /// <summary>
/// 虚拟键盘支持鼠标 /// 虚拟键盘支持鼠标
/// </summary> /// </summary>
public virtual bool HaveOSK_mouse public virtual bool HaveOSK_mouse { get; set; }
{
get { return haveosk_mouse; }
set
{
if (haveosk_mouse != value)
{
haveosk_mouse = value;
NotifyPropertyChanged("HaveOSK_mouse");
}
}
}
#endregion #endregion
/// <summary> /// <summary>
/// ///
......
...@@ -132,9 +132,10 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -132,9 +132,10 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
{ {
gage = new TDGage(); gage = new TDGage();
gage.mSysParam.Load(); gage.mSysParam.Load();
//gage.mSysParam.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(mSysParam_PropertyChanged); gage.mSysParam.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(mSysParam_PropertyChanged);
FLY.UI.OSK.KeyboardBehavior.Enable = gage.mSysParam.HaveOSK; FLY.UI.OSK.KeyboardBehavior.Enable = gage.mSysParam.HaveOSK;
FLY.UI.OSK.KeyboardBehavior.EnableMouseDown = gage.mSysParam.HaveOSK_mouse; FLY.UI.OSK.KeyboardBehavior.EnableMouseDown = gage.mSysParam.HaveOSK_mouse;
UpdateCulture(); UpdateCulture();
......
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