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

1

parent 48f37511
...@@ -65,7 +65,7 @@ namespace Misc ...@@ -65,7 +65,7 @@ namespace Misc
{ {
get get
{ {
if (Misc.MyBase.ISVALIDATA(Begin)) if (Misc.MyBase.ISVALIDATA(Begin) && Misc.MyBase.ISVALIDATA(End))
return true; return true;
else else
return false; return false;
......
...@@ -161,143 +161,49 @@ namespace ThickTcpUiInWindow.UIModule ...@@ -161,143 +161,49 @@ namespace ThickTcpUiInWindow.UIModule
gage.mBulkDataClient.Add(bulkdata_client); gage.mBulkDataClient.Add(bulkdata_client);
} }
} }
/// <summary> /// <summary>
/// 扫描图的参数 /// 扫描图的参数
/// </summary> /// </summary>
public class ScanGraphItemParam : UIModuleParam public class ScanGraphItemParam : UIModuleParam
{ {
private string _charttype = "Column";
/// <summary> /// <summary>
/// 曲线类型 /// 曲线类型
/// </summary> /// </summary>
public string ChartType public string ChartType { get; set; } = "Column";
{
get
{
return _charttype;
}
set
{
_charttype = value;
NotifyPropertyChanged("ChartType");
}
}
private int bm = 0;
/// <summary> /// <summary>
/// 记录点 /// 记录点
/// </summary> /// </summary>
public int BM public int BM { get; set; } = 0;
{
get
{
return bm;
}
set
{
if (bm != value)
{
bm = value;
NotifyPropertyChanged("BM");
}
}
}
private double _yrangepercent = 3;
/// <summary> /// <summary>
/// Y轴比例 /// Y轴比例
/// </summary> /// </summary>
public double YRangePercent public double YRangePercent { get; set; } = 3;
{
get
{
return _yrangepercent;
}
set
{
_yrangepercent = value;
NotifyPropertyChanged("YRangePercent");
}
}
private string title = "扫描图";
/// <summary> /// <summary>
/// 标题 /// 标题
/// </summary> /// </summary>
public string Title public string Title { get; set; } = "扫描图";
{
get { return title; }
set
{
if (title != value)
{
title = value;
NotifyPropertyChanged("Title");
}
}
}
private int mix = 1;
/// <summary> /// <summary>
/// 混合图 /// 混合图
/// </summary> /// </summary>
public int Mix public int Mix { get; set; } = 1;
{
get
{
return mix;
}
set
{
if (mix != value)
{
mix = value;
NotifyPropertyChanged("Mix");
}
}
}
private bool isautotarget = false;
/// <summary> /// <summary>
/// 自动目标值 /// 自动目标值
/// </summary> /// </summary>
public bool IsAutoTarget public bool IsAutoTarget { get; set; } = false;
{
get
{
return isautotarget;
}
set
{
if (isautotarget != value)
{
isautotarget = value;
NotifyPropertyChanged("IsAutoTarget");
}
}
}
private bool ispercent = false;
/// <summary> /// <summary>
/// % 显示 /// % 显示
/// </summary> /// </summary>
public bool IsPercent public bool IsPercent { get; set; } = false;
{
get
{
return ispercent;
}
set
{
if (ispercent != value)
{
ispercent = value;
NotifyPropertyChanged("IsPercent");
}
}
}
/// <summary> /// <summary>
...@@ -319,82 +225,35 @@ namespace ThickTcpUiInWindow.UIModule ...@@ -319,82 +225,35 @@ namespace ThickTcpUiInWindow.UIModule
return names.ToArray(); return names.ToArray();
} }
} }
/// <summary> /// <summary>
/// 全部扫描图的参数 /// 全部扫描图的参数
/// </summary> /// </summary>
public class ScanGraphParams : UIModuleParams<ScanGraphItemParam> public class ScanGraphParams : UIModuleParams<ScanGraphItemParam>
{ {
bool isreverserd = false;
/// <summary> /// <summary>
/// 主界面反向 /// 主界面反向
/// </summary> /// </summary>
public bool IsReversed public bool IsReversed { get; set; }
{
get { return isreverserd; }
set
{
if (isreverserd != value)
{
isreverserd = value;
NotifyPropertyChanged("IsReversed");
}
}
}
bool lrisvisable = false;
/// <summary> /// <summary>
/// 显示 左右标示 /// 显示 左右标示
/// </summary> /// </summary>
public bool LRIsVisable public bool LRIsVisable { get; set; } = false;
{
get { return lrisvisable; }
set
{
if (lrisvisable != value)
{
lrisvisable = value;
NotifyPropertyChanged("LRIsVisable");
}
}
}
bool lrisreverserd = false;
/// <summary> /// <summary>
/// 左右标示 反向 /// 左右标示 反向
/// </summary> /// </summary>
public bool LRIsReversed public bool LRIsReversed { get; set; } = false;
{
get { return lrisreverserd; }
set
{
if (lrisreverserd != value)
{
lrisreverserd = value;
NotifyPropertyChanged("LRIsReversed");
}
}
}
private int xInterval = 10;
/// <summary> /// <summary>
/// 扫描图轴间隔 ,单位分区 /// 扫描图轴间隔 ,单位分区
/// </summary> /// </summary>
public int XInterval public int XInterval { get; set; } = 10;
{
get { return xInterval; }
set
{
if (xInterval != value)
{
xInterval = value;
NotifyPropertyChanged("XInterval");
}
}
}
static ScanGraphParams() static ScanGraphParams()
{ {
Misc.SaveToXmlHepler.Regist(typeof(ScanGraphParams)); Misc.SaveToXmlHepler.Regist(typeof(ScanGraphParams));
...@@ -432,8 +291,7 @@ namespace ThickTcpUiInWindow.UIModule ...@@ -432,8 +291,7 @@ namespace ThickTcpUiInWindow.UIModule
return names.ToArray(); return names.ToArray();
} }
} }
/// <summary> /// <summary>
/// 扫描图控件模块 /// 扫描图控件模块
/// </summary> /// </summary>
......
<flyctrllib:WindowBigClose x:Class="ThickTcpUiInWindow.UIModule.ScanGraphConfig" <flyctrllib:WindowBigClose x:Class="ThickTcpUiInWindow.UIModule.ScanGraphConfig"
xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary" xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
......
...@@ -36,214 +36,83 @@ namespace FLY.Thick.Base.Common ...@@ -36,214 +36,83 @@ namespace FLY.Thick.Base.Common
#region BASE #region BASE
private int thick = 3210; /// <summary>
public int Thick /// x100
{ /// </summary>
get { return thick; } public int Thick { get; set; } = 3210;
set {
if (thick != value)
{
thick = value;
NotifyPropertyChanged("Thick");
}
}
}
/// <summary>
/// 编码器1 位置 脉冲
/// </summary>
public int Position { get; set; }
private int position = 0;
public int Position
{
get { return position; }
set
{
if (position != value)
{
position = value;
NotifyPropertyChanged("Position");
}
}
}
private int boltIndex = 0; /// <summary>
public int BoltIndex /// 分区序号
{ /// </summary>
get { return boltIndex; } public int BoltIndex { get; set; }
set /// <summary>
{ /// 分区号
if (boltIndex != value) /// </summary>
{
boltIndex = value;
NotifyPropertyChanged("BoltIndex");
NotifyPropertyChanged("BoltNo");
}
}
}
public int BoltNo public int BoltNo
{ {
get { return BoltIndex + FirstBoltNo; } get { return BoltIndex + FirstBoltNo; }
} }
/// <summary>
private int ad = 12345; /// AD值
public int AD /// </summary>
{ public int AD { get; set; } = 12345;
get { return ad; } /// <summary>
set /// 最大AD值
{ /// </summary>
if (ad != value) public int ADMax { get; set; } = 65535;
{
ad = value;
NotifyPropertyChanged("AD");
}
}
}
private int admax = 65535;
public int ADMax {
get { return admax; }
set
{
if (admax != value)
{
admax = value;
NotifyPropertyChanged("ADMax");
}
}
}
#endregion #endregion
#region POSITION2 #region POSITION2
private int position2=0;
public int Position2 /// <summary>
{ /// 编码器2 位置 脉冲
get { return position2; } /// </summary>
set { public int Position2 { get; set; }
if (position2 != value)
{
position2 = value;
NotifyPropertyChanged("Position2");
}
}
}
#endregion #endregion
#region 扫描 #region 扫描
private ObservableCollection<int> sampleAD = new ObservableCollection<int>(new int[3] { -1, -1,-1 });
/// <summary> /// <summary>
/// 最新样品AD /// 最新样品AD
/// </summary> /// </summary>
public ObservableCollection<int> SampleAD public ObservableCollection<int> SampleAD { get; } = new ObservableCollection<int>(new int[3] { -1, -1, -1 });
{
get { return sampleAD; }
}
private bool tempState = false;
/// <summary> /// <summary>
/// 动态温修 /// 动态温修
/// </summary> /// </summary>
public bool TempState public bool TempState { get; set; }
{
get { return tempState; }
set
{
if (tempState != value)
{
tempState = value;
NotifyPropertyChanged("TempState");
}
}
}
//TODO /// <summary>
private bool datavalid=false; /// 数据是否有效, 当膜没有动时,为无效。 通过PLC获取,或编码器判断
public bool DataValid//数据是否有效, 当膜没有动时,为无效。 通过PLC获取,或编码器判断 /// </summary>
{ public bool DataValid { get; set; }
get
{
return datavalid;
}
set
{
if (datavalid != value)
{
datavalid = value;
NotifyPropertyChanged("DataValid");
}
}
}
private int rolldown=0;
public int RollDown
{
get
{
return rolldown;
}
set
{
if (rolldown != value)
{
rolldown = value;
NotifyPropertyChanged("RollDown");
}
}
}
private Misc.DIRECTION direction=DIRECTION.FIX; /// 下辊计数,用于同步多个软件,现在没有用
public Misc.DIRECTION Direction//扫描方向 /// </summary>
{ public int RollDown { get; set; }
get /// <summary>
{ /// 扫描方向
return direction; /// </summary>
} public Misc.DIRECTION Direction { get; set; } = DIRECTION.FIX;
set
{
if (direction != value)
{
direction = value;
NotifyPropertyChanged("Direction");
}
}
}
private double width = 600;//膜宽 mm /// <summary>
public double Width /// 膜宽 mm
{ /// </summary>
get { return width; } public double Width { get; set; } = 600;
set { /// <summary>
if (width != value) /// 生产速度 m/min
{ /// </summary>
width = value; public double FilmVelocity { get; set; }
NotifyPropertyChanged("Width"); /// <summary>
} /// 测厚仪速度 m/min
} /// </summary>
} public double Velocity { get; set; }
private double filmVelocity = 0;//m/min
public double FilmVelocity
{
get { return filmVelocity; }
set
{
if (filmVelocity != value)
{
filmVelocity = value;
NotifyPropertyChanged("FilmVelocity");
}
}
}
private double velocity = 0;//m/min
public double Velocity
{
get { return velocity; }
set
{
if (velocity != value)
{
velocity = value;
NotifyPropertyChanged("Velocity");
}
}
}
#endregion #endregion
#region 运行状态 #region 运行状态
...@@ -309,267 +178,115 @@ namespace FLY.Thick.Base.Common ...@@ -309,267 +178,115 @@ namespace FLY.Thick.Base.Common
#endregion #endregion
#region 系统 #region 系统
private int hrs=3;
/// <summary> /// <summary>
/// 系统剩余小时数 /// 系统剩余小时数
/// </summary> /// </summary>
public int Hrs public int Hrs { get; set; } = 3;
{
get { return hrs; }
set
{
if (hrs != value)
{
hrs = value;
NotifyPropertyChanged("Hrs");
}
}
}
private string version = "null";
/// <summary> /// <summary>
/// 版本号 /// 版本号
/// </summary> /// </summary>
public string Version public string Version { get; set; } = "null";
{
get { return version; } /// <summary>
set /// FLYAD 连接状态
{ /// </summary>
if (version != value) public bool FLYADIsConnect { get; set; }
{
version = value;
NotifyPropertyChanged("Version");
} /// <summary>
} /// 过期, 锁ing
} /// </summary>
private bool isConnect = false; public bool SecuteLock { get; set; }
public bool FLYADIsConnect//FLYAD 连接状态
{ /// <summary>
get { return isConnect; } /// 服务器连接断开
set /// </summary>
{ public bool ServerIsConnected { get; set; }
if (isConnect != value)
{ /// <summary>
isConnect = value; ///
NotifyPropertyChanged("FLYADIsConnect"); /// </summary>
} public GAGE_TYPE GageType { get; set; } = GAGE_TYPE.Normal;
}
}
private bool secuteLock = false;
public bool SecuteLock
{
get { return secuteLock; }
set
{
if (secuteLock != value)
{
secuteLock = value;
NotifyPropertyChanged("SecuteLock");
}
}
}
private bool serverIsConnect = false;
public bool ServerIsConnected
{
get { return serverIsConnect; }
set
{
serverIsConnect = value;
NotifyPropertyChanged("ServerIsConnected");
}
}
private GAGE_TYPE gagetype = GAGE_TYPE.Normal;
public GAGE_TYPE GageType
{
get { return gagetype; }
set
{
if (gagetype != value)
{
gagetype = value;
NotifyPropertyChanged("GageType");
}
}
}
#endregion #endregion
#region PROFILE 运行参数 #region PROFILE 运行参数
private string productName = "default";
public string ProductName//产品名称
{
get { return productName; }
set
{
if (productName != value)
{
productName = value;
NotifyPropertyChanged("ProductName");
}
}
}
private int target = 3000;
/// <summary> /// <summary>
/// 目标值 /// 产品名称
/// </summary> /// </summary>
public int Target public string ProductName { get; set; } = "default";
{
get { return target; }
set
{
if (target != value)
{
target = value;
NotifyPropertyChanged("Target");
}
}
}
private int alarm = 1000;
/// <summary> /// <summary>
/// 报警值 /// 目标值 x100
/// </summary>
public int Target { get; set; } = 3000;
/// <summary>
/// 报警值 x100
/// </summary>
public int Alarm { get; set; } = 100;
/// <summary>
/// Y轴范围
/// </summary> /// </summary>
public int Alarm
{
get { return alarm; }
set
{
if (alarm != value)
{
alarm = value;
NotifyPropertyChanged("Alarm");
NotifyPropertyChanged("YRange");
}
}
}
//Y轴范围
public int YRange public int YRange
{ {
get { return alarm*3; } get { return Alarm * 3; }
set {
}
}
private double comp=1;
public double Comp
{
get { return comp; }
set
{
if (comp != value)
{
comp = value;
NotifyPropertyChanged("Comp");
}
}
}
private int shift=0;
public int Shift
{
get { return shift; }
set
{
if (shift != value)
{
shift = value;
NotifyPropertyChanged("Shift");
}
}
} }
/// <summary>
/// 斜率补偿
/// </summary>
public double Comp { get; set; } = 1;
/// <summary>
/// 平移补偿
/// </summary>
public int Shift { get; set; } = 0;
private int _dataBoltNoBegin = 0;
/// <summary> /// <summary>
/// 数据开始分区号 /// 数据开始分区号
/// </summary> /// </summary>
public int DataBoltNoBegin public int DataBoltNoBegin { get; set; } = 0;
{
get { return _dataBoltNoBegin; }
set
{
if (_dataBoltNoBegin != value)
{
_dataBoltNoBegin = value;
NotifyPropertyChanged("DataBoltNoBegin");
}
}
}
private int dataBoltNoEnd = 30;
/// <summary> /// <summary>
/// 数据结束分区号 /// 数据结束分区号
/// </summary> /// </summary>
public int DataBoltNoEnd public int DataBoltNoEnd { get; set; } = 30;
{
get { return dataBoltNoEnd; }
set
{
if (dataBoltNoEnd != value)
{
dataBoltNoEnd = value;
NotifyPropertyChanged("DataBoltNoEnd");
}
}
}
private int _scanBoltNoBegin=0; /// <summary>
/// 扫描范围 开始
/// </summary>
public int ScanBoltNoBegin { get; set; } = 0;
public int ScanBoltNoBegin /// <summary>
{ /// 扫描范围 结束
get { return _scanBoltNoBegin; } /// </summary>
set { _scanBoltNoBegin = value; public int ScanBoltNoEnd { get; set; } = 30;
NotifyPropertyChanged("ScanBoltNoBegin");
}
}
private int _scanBoltNoEnd=30;
public int ScanBoltNoEnd
{
get { return _scanBoltNoEnd; }
set
{
_scanBoltNoEnd = value;
NotifyPropertyChanged("ScanBoltNoEnd");
}
}
#endregion #endregion
#region BOLTMAP 分区信息 #region BOLTMAP 分区信息
private int nbolts = 50;
/// <summary> /// <summary>
/// 总分区数 /// 总分区数
/// </summary> /// </summary>
public int NBolts public int NBolts { get; set; } = 50;
{
get { return nbolts; }
set
{
if (nbolts != value)
{
nbolts = value;
NotifyPropertyChanged("NBolts");
}
}
}
private int _firstBoltNo = 0; private int _firstBoltNo = 0;
/// <summary> /// <summary>
/// 开始分区号 /// 开始分区号
/// </summary> /// </summary>
public int FirstBoltNo public int FirstBoltNo { get; set; }
{
get { return _firstBoltNo; }
set
{
if (_firstBoltNo != value)
{
_firstBoltNo = value;
NotifyPropertyChanged("FirstBoltNo");
}
}
}
#endregion #endregion
......
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