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

1. 修改 property 的 {get;set;}

parent 4032422a
...@@ -7,6 +7,7 @@ using System.Collections.ObjectModel; ...@@ -7,6 +7,7 @@ using System.Collections.ObjectModel;
using System.ComponentModel; using System.ComponentModel;
using FLY.FeedbackRenZiJia.Common; using FLY.FeedbackRenZiJia.Common;
using FLY.FeedbackRenZiJia.IService; using FLY.FeedbackRenZiJia.IService;
using PropertyChanged;
namespace FLY.FeedbackRenZiJia.Server namespace FLY.FeedbackRenZiJia.Server
{ {
...@@ -62,77 +63,41 @@ namespace FLY.FeedbackRenZiJia.Server ...@@ -62,77 +63,41 @@ namespace FLY.FeedbackRenZiJia.Server
#endregion #endregion
#region 状态 #region 状态
int[] thickpercents;
/// <summary> /// <summary>
/// 对应的100% 数据,单位是% 数量是BoltCnt, 数据肯定是完整的!!!!! /// 对应的100% 数据,单位是% 数量是BoltCnt, 数据肯定是完整的!!!!!
/// </summary> /// </summary>
public int[] ThickPercents [DoNotCheckEquality]
{ public int[] ThickPercents { get; set; }
get
{
return thickpercents;
}
set
{
thickpercents = value;
NotifyPropertyChanged("ThickPercents");
}
}
int[] heats;
/// <summary> /// <summary>
/// 当前方向的加热策略,必须保证 0~100 /// 当前方向的加热策略,必须保证 0~100
/// </summary> /// </summary>
public int[] Heats [DoNotCheckEquality]
{ public int[] Heats { get; protected set; }
get
{
return heats;
}
protected set
{
heats = value;
NotifyPropertyChanged("Heats");
}
}
private int Base { get; set; } = 0; private int Base { get; set; } = 0;
int[] offsets;
/// <summary> /// <summary>
/// 加热偏移量 /// 加热偏移量
/// </summary> /// </summary>
public int[] Offsets [DoNotCheckEquality]
{ public int[] Offsets { get; protected set; }
get
{
return offsets;
}
protected set
{
offsets = value;
NotifyPropertyChanged("Offsets");
}
}
int[] preheats;
/// <summary> /// <summary>
/// Heats+Offsets+Base /// Heats+Offsets+Base
/// </summary> /// </summary>
public int[] PreHeats [DoNotCheckEquality]
{ public int[] PreHeats { get; protected set; }
get
{
return preheats;
}
protected set
{
preheats = value;
NotifyPropertyChanged("PreHeats");
}
}
/// <summary> /// <summary>
/// 加热量 每3个计算的sigma,最大值 /// 加热量 每3个计算的sigma,最大值
......
...@@ -26,18 +26,8 @@ namespace FLY.FeedbackRenZiJia.Server ...@@ -26,18 +26,8 @@ namespace FLY.FeedbackRenZiJia.Server
public int[] Heats;//加热 public int[] Heats;//加热
} }
DateTime last = DateTime.MinValue;
public DateTime Last public DateTime Last { get; set; } = DateTime.MinValue;
{
get { return last; }
set {
if (last != value)
{
last = value;
NotifyPropertyChanged("Last");
}
}
}
/// <summary> /// <summary>
...@@ -120,13 +110,7 @@ namespace FLY.FeedbackRenZiJia.Server ...@@ -120,13 +110,7 @@ namespace FLY.FeedbackRenZiJia.Server
#region INotifyPropertyChanged 成员 #region INotifyPropertyChanged 成员
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
protected void NotifyPropertyChanged(string propertyname)
{
if (PropertyChanged != null)
{
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyname));
}
}
#endregion #endregion
} }
} }
...@@ -6,6 +6,7 @@ using System.Collections.ObjectModel; ...@@ -6,6 +6,7 @@ using System.Collections.ObjectModel;
using System.ComponentModel; using System.ComponentModel;
using FLY.FeedbackRenZiJia.IService; using FLY.FeedbackRenZiJia.IService;
using FLY.FeedbackRenZiJia.Common; using FLY.FeedbackRenZiJia.Common;
using PropertyChanged;
namespace FLY.FeedbackRenZiJia.Server namespace FLY.FeedbackRenZiJia.Server
{ {
...@@ -75,6 +76,7 @@ namespace FLY.FeedbackRenZiJia.Server ...@@ -75,6 +76,7 @@ namespace FLY.FeedbackRenZiJia.Server
/// <summary> /// <summary>
/// 坏的加热棒 /// 坏的加热棒
/// </summary> /// </summary>
[DoNotCheckEquality]
public bool[] Bads { get; set; } public bool[] Bads { get; set; }
......
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