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

修改, MainWindow 忘记了添加mSysParam_PropertyChanged

parent 7d4961bb
......@@ -16,7 +16,15 @@ namespace FLY.OBJComponents.Common
/// <param name="val">属性值</param>
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 (v.GetType() == property.PropertyType)
......
......@@ -63,56 +63,22 @@ namespace ThickTcpUiInWindow
}
}
}
string warningTipPath;
/// <summary>
/// 报警音乐路径
/// </summary>
public string WarningTipPath
{
get { return warningTipPath; }
set
{
if (warningTipPath != value)
{
warningTipPath = value;
NotifyPropertyChanged("WarningTipPath");
}
}
}
public string WarningTipPath { get; set; }
bool haveosk = false;
/// <summary>
/// 使用虚拟键盘
/// </summary>
public virtual bool HaveOSK
{
get { return haveosk; }
set
{
if (haveosk != value)
{
haveosk = value;
NotifyPropertyChanged("HaveOSK");
}
}
}
bool haveosk_mouse = false;
public bool HaveOSK { get; set; }
/// <summary>
/// 虚拟键盘支持鼠标
/// </summary>
public virtual bool HaveOSK_mouse
{
get { return haveosk_mouse; }
set
{
if (haveosk_mouse != value)
{
haveosk_mouse = value;
NotifyPropertyChanged("HaveOSK_mouse");
}
}
}
public virtual bool HaveOSK_mouse { get; set; }
#endregion
/// <summary>
///
......
......@@ -132,9 +132,10 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
{
gage = new TDGage();
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.EnableMouseDown = gage.mSysParam.HaveOSK_mouse;
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