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

1

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