Commit 24f8f507 authored by 潘栩锋's avatar 潘栩锋 🚴

删掉NotifyPropertyChanged()

parent fc6802d9
......@@ -13,80 +13,27 @@ namespace FLY.Thick.Blowing.Client
{
#region IRenZiJiaService 成员
#region 膜长 计算
private double flrange;
/// <summary>
/// 膜长查找范围, 以FilmLength为目标值,两边查找,单位m
/// </summary>
public double FLRange
{
get { return flrange; }
set
{
if (flrange != value)
{
flrange = value;
NotifyPropertyChanged("FLRange");
}
}
}
private string calstate;
public double FLRange { get; set; }
/// <summary>
/// 计算的状态,因为是一个很漫长的过程!!!
/// </summary>
public string CalState
{
get { return calstate; }
protected set
{
if (calstate != value)
{
calstate = value;
NotifyPropertyChanged("CalState");
}
}
}
public string CalState { get; set; }
#region 计算结果
private double maxr;
/// <summary>
/// 最大相识度
/// </summary>
public double MaxR
{
get
{
return maxr;
}
set
{
if (maxr != value)
{
maxr = value;
NotifyPropertyChanged("MaxR");
}
}
}
public double MaxR { get; set; }
private double maxrfilmlength;
/// <summary>
/// 最大相识度对应速度
/// </summary>
public double MaxRFilmLength
{
get
{
return maxrfilmlength;
}
set
{
if (maxrfilmlength != value)
{
maxrfilmlength = value;
NotifyPropertyChanged("MaxRFilmLength");
}
}
}
public double MaxRFilmLength { get; set; }
#endregion
#endregion
......@@ -95,153 +42,45 @@ namespace FLY.Thick.Blowing.Client
/// <summary>
/// 追边开始按钮自锁
/// </summary>
public bool IsBtnSelfHold
{
get
{
return isBtnSelfHold;
}
set
{
if (isBtnSelfHold != value)
{
isBtnSelfHold = value;
NotifyPropertyChanged("IsBtnSelfHold");
}
}
}
public bool IsBtnSelfHold { get; set; }
RenZiJiaFixEPCType epctype = RenZiJiaFixEPCType.Null;
public RenZiJiaFixEPCType EPCType
{
get
{
return epctype;
}
set
{
if (epctype != value)
{
epctype = value;
NotifyPropertyChanged("EPCType");
}
}
}
TimeSpan sampleconsume = TimeSpan.FromSeconds(2);
public RenZiJiaFixEPCType EPCType { get; set; }
/// <summary>
/// 采样时间, 默认2s
/// </summary>
public TimeSpan SampleConsume
{
get { return sampleconsume; }
set
{
if (sampleconsume != value)
{
sampleconsume = value;
NotifyPropertyChanged("SampleConsume");
}
}
}
public TimeSpan SampleConsume { get; set; } = TimeSpan.FromSeconds(2);
TimeSpan sampleinterval = TimeSpan.FromMinutes(45);
/// <summary>
/// 温修间隔,默认45分钟
/// </summary>
public TimeSpan SampleInterval
{
get { return sampleinterval; }
set
{
if (sampleinterval != value)
{
sampleinterval = value;
NotifyPropertyChanged("SampleInterval");
}
}
}
TimeSpan sampletimer = TimeSpan.Zero;
public TimeSpan SampleInterval { get; set; } = TimeSpan.FromMinutes(45);
/// <summary>
/// 当前温修计时,大于温修间隔就会去温修
/// </summary>
public TimeSpan SampleTimer
{
get
{
return sampletimer;
}
protected set
{
if (sampletimer != value)
{
sampletimer = value;
NotifyPropertyChanged("SampleTimer");
}
}
}
public TimeSpan SampleTimer { get; protected set; } = TimeSpan.Zero;
TimeSpan backedgewait = TimeSpan.FromSeconds(5);
/// <summary>
/// 回到边界后,再等待一段时间,那就肯定找到边界了。 默认5s
/// </summary>
public TimeSpan BackEdgeWait
{
get
{
return backedgewait;
}
set
{
if (backedgewait != value)
{
backedgewait = value;
NotifyPropertyChanged("BackEdgeWait");
}
}
}
public TimeSpan BackEdgeWait { get; set; } = TimeSpan.FromSeconds(5);
private int samplead = -1;
/// <summary>
/// 采样得到的样品AD
/// </summary>
public int SampleAD
{
get
{
return samplead;
}
protected set
{
if (samplead != value)
{
samplead = value;
NotifyPropertyChanged("SampleAD");
}
}
}
public int SampleAD { get; protected set; } = -1;
bool epcisrunning = false;
/// <summary>
/// 追边运行中!
/// </summary>
public bool EPCIsRunning
{
get
{
return epcisrunning;
}
protected set
{
if (epcisrunning != value)
{
epcisrunning = value;
NotifyPropertyChanged("EPCIsRunning");
}
}
}
public bool EPCIsRunning { get; set; }
#endregion
#endregion
......
......@@ -13,64 +13,21 @@ namespace FLY.Thick.Blowing.Client
{
protected IFConn mConn;
protected UInt32 mServerID;
private bool isconnected = false;
public bool IsConnected
{
get { return isconnected; }
set
{
if (isconnected != value)
{
isconnected = value;
NotifyPropertyChanged("IsConnected");
}
}
}
public bool IsConnected { get; set; }
#region IBlowing 成员变量
#region 分区设定
private int channelcnt = 44;
/// <summary>
/// 加热通道数
/// </summary>
public int ChannelCnt
{
get
{
return channelcnt;
}
set
{
if (channelcnt != value)
{
channelcnt = value;
NotifyPropertyChanged("ChannelCnt");
NotifyPropertyChanged("NBolts");
}
}
}
public int ChannelCnt { get; set; } = 44;
private int bpc = 2;
/// <summary>
/// 分区数/加热通道数
/// </summary>
public int BPC
{
get
{
return bpc;
}
set
{
if (bpc != value)
{
bpc = value;
NotifyPropertyChanged("BPC");
NotifyPropertyChanged("NBolts");
}
}
}
public int BPC { get; set; } = 2;
/// <summary>
......@@ -82,53 +39,20 @@ namespace FLY.Thick.Blowing.Client
}
public int OrgBoltNo { get; set; } = 1;
private int orgboltno = 1;
public int OrgBoltNo
{
get
{
return orgboltno;
}
set
{
if (orgboltno != value)
{
orgboltno = value;
NotifyPropertyChanged("OrgBoltNo");
}
}
}
private bool isUsedMap = false;
/// <summary>
/// 使用分区表
/// </summary>
public bool IsUsedMap
{
get { return isUsedMap; }
set {
if (isUsedMap != value)
{
isUsedMap = value;
NotifyPropertyChanged("IsUsedMap");
}
}
}
public bool IsUsedMap { get; set; }
private List<BoltMapCell> map = new List<BoltMapCell>();
/// <summary>
/// 分区表
/// </summary>
public List<BoltMapCell> Map
{
get { return map; }
set {
map = value;
NotifyPropertyChanged("Map");
}
}
public List<BoltMapCell> Map { get; set; } = new List<BoltMapCell>();
#endregion
......@@ -171,11 +95,7 @@ namespace FLY.Thick.Blowing.Client
#region INotifyPropertyChanged 成员
protected void NotifyPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public event PropertyChangedEventHandler PropertyChanged;
#endregion
......
......@@ -166,7 +166,7 @@ namespace FLY.Weight.Server
RollMixBuffer.Add(w, new BufferStorage<FlyData_Mix>(w.Number + "_rollmixbuffer.csv", 1, 400));
}
//--------------------------------------------------------------------------------
//Test();
Test();
plcos.Init();
......
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