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

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

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