diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..cb53e99
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,4 @@
+[*.cs]
+
+# CA1416: 验证平台兼容性
+dotnet_diagnostic.CA1416.severity = silent
diff --git a/CapMachine.Core/CapMachine.Core.csproj b/CapMachine.Core/CapMachine.Core.csproj
new file mode 100644
index 0000000..3971803
--- /dev/null
+++ b/CapMachine.Core/CapMachine.Core.csproj
@@ -0,0 +1,14 @@
+
+
+
+ Library
+ net6.0-windows
+ enable
+ enable
+ true
+
+
+
+
+
+
diff --git a/CapMachine.Core/DialogViewModel.cs b/CapMachine.Core/DialogViewModel.cs
new file mode 100644
index 0000000..df39e3a
--- /dev/null
+++ b/CapMachine.Core/DialogViewModel.cs
@@ -0,0 +1,55 @@
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Core
+{
+ ///
+ /// 弹窗基类
+ ///
+ public class DialogViewModel : BindableBase, IDialogAware
+ {
+ public string Title { get; set; }
+
+ public event Action? RequestClose;
+
+ ///
+ /// 调用RequestClose
+ ///
+ ///
+ public void RaiseRequestClose(IDialogResult dialogResult)
+ {
+ RequestClose?.Invoke(dialogResult);
+
+ }
+ ///
+ /// 是否关闭窗口
+ ///
+ ///
+ public bool CanCloseDialog()
+ {
+ return true;
+ }
+
+ ///
+ /// 关闭时触发
+ ///
+ public void OnDialogClosed()
+ {
+
+ }
+
+ ///
+ /// 打开时触发
+ ///
+ ///
+ public virtual void OnDialogOpened(IDialogParameters parameters)
+ {
+
+ }
+ }
+}
diff --git a/CapMachine.Core/IService/INavigationMenuService.cs b/CapMachine.Core/IService/INavigationMenuService.cs
new file mode 100644
index 0000000..e92535d
--- /dev/null
+++ b/CapMachine.Core/IService/INavigationMenuService.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Core.IService
+{
+ ///
+ /// 导航服务接口
+ ///
+ public interface INavigationMenuService
+ {
+ ///
+ /// 初始化
+ ///
+ void Initialize();
+ }
+}
diff --git a/CapMachine.Core/NavigationViewModel.cs b/CapMachine.Core/NavigationViewModel.cs
new file mode 100644
index 0000000..65e74f5
--- /dev/null
+++ b/CapMachine.Core/NavigationViewModel.cs
@@ -0,0 +1,46 @@
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Core
+{
+ ///
+ /// 导航的基类
+ ///
+ public class NavigationViewModel : BindableBase, INavigationAware
+ {
+ ///
+ /// 是否重用导航对象
+ ///
+ ///
+ ///
+ public virtual bool IsNavigationTarget(NavigationContext navigationContext)
+ {
+ return true;
+ }
+
+ ///
+ /// 导航被切换触发
+ ///
+ ///
+ ///
+ public virtual void OnNavigatedFrom(NavigationContext navigationContext)
+ {
+
+ }
+
+ ///
+ /// 导航被执行触发
+ ///
+ ///
+ ///
+ public virtual void OnNavigatedTo(NavigationContext navigationContext)
+ {
+
+ }
+ }
+}
diff --git a/CapMachine.Model/CapMachine.Model.csproj b/CapMachine.Model/CapMachine.Model.csproj
new file mode 100644
index 0000000..c61bce4
--- /dev/null
+++ b/CapMachine.Model/CapMachine.Model.csproj
@@ -0,0 +1,11 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
diff --git a/CapMachine.Model/ConfigChartSelect.cs b/CapMachine.Model/ConfigChartSelect.cs
new file mode 100644
index 0000000..7e6e980
--- /dev/null
+++ b/CapMachine.Model/ConfigChartSelect.cs
@@ -0,0 +1,54 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ ///
+ /// ConfigChartSelect表设置
+ ///
+ [Table(Name = "ConfigChartSelect")]
+ public class ConfigChartSelect
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true, IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 序号
+ ///
+ [Column(Name = "Index")]
+ public int Index { get; set; }
+
+ ///
+ /// 分类/工况
+ ///
+ [Column(Name = "Category", IsNullable = false, StringLength = 50)]
+ public string? Category { get; set; }
+
+ ///
+ /// 名称
+ ///
+ [Column(Name = "Name", IsNullable = false, StringLength = 50)]
+ public string? Name { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
+ ///
+
+ public long ConfigChartYAxisId { get; set; }
+ public ConfigChartYAxis? ConfigChartYAxis { get; set; }
+
+ }
+}
diff --git a/CapMachine.Model/ConfigChartYAxis.cs b/CapMachine.Model/ConfigChartYAxis.cs
new file mode 100644
index 0000000..59d6d90
--- /dev/null
+++ b/CapMachine.Model/ConfigChartYAxis.cs
@@ -0,0 +1,56 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ ///
+ /// ConfigChartYAxis表设置
+ ///
+ [Table(Name = "ConfigChartYAxis")]
+ public class ConfigChartYAxis
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true, IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 序号
+ ///
+ [Column(Name = "Index")]
+ public int Index { get; set; }
+
+ ///
+ /// 标尺名称
+ ///
+ [Column(Name = "Name", IsNullable = false, StringLength = 50)]
+ public string? Name { get; set; }
+
+ ///
+ /// Max
+ ///
+ [Column(Name = "Max")]
+ public double Max { get; set; }
+
+ ///
+ /// Min
+ ///
+ [Column(Name = "Min")]
+ public double Min { get; set; }
+
+ ///
+ /// 单位
+ ///
+ [Column(Name = "Unit", IsNullable = false, StringLength = 10)]
+ public string? Unit { get; set; }
+
+
+ //[Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
+ //public DateTime CreateTime { get; set; }
+ }
+}
diff --git a/CapMachine.Model/ConfigValueType.cs b/CapMachine.Model/ConfigValueType.cs
new file mode 100644
index 0000000..511ee59
--- /dev/null
+++ b/CapMachine.Model/ConfigValueType.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ public enum ConfigValueType
+ {
+ ///
+ /// 常值
+ ///
+ Constant = 1,
+
+ ///
+ /// 斜坡
+ ///
+ Slope = 2,
+
+ }
+}
diff --git a/CapMachine.Model/MeterPd.cs b/CapMachine.Model/MeterPd.cs
new file mode 100644
index 0000000..7930ee8
--- /dev/null
+++ b/CapMachine.Model/MeterPd.cs
@@ -0,0 +1,70 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ ///
+ /// Pd表设置
+ ///
+ [Table(Name = "MeterPd")]
+ public class MeterPd
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true, IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 程序步骤序号
+ ///
+ [Column(Name = "StepNo")]
+ public int StepNo { get; set; }
+
+ ///
+ /// 开始值
+ ///
+ [Column(Name = "StartValue")]
+ public double StartValue { get; set; }
+
+ ///
+ /// 结束值
+ ///
+ [Column(Name = "EndValue")]
+ public double EndValue { get; set; }
+
+ ///
+ /// 维持时间
+ ///
+ [Column(Name = "KeepTime")]
+ public double KeepTime { get; set; }
+
+ ///
+ /// 配置值类型
+ ///
+ [Column(MapType = typeof(int))]
+ public ConfigValueType ValueType { get; set; }
+
+ ///
+ /// 常值
+ /// 在ValueType为常值时会使用
+ ///
+ [Column(Name = "Constant")]
+ public double Constant { get; set; }
+
+
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
+ ///
+
+ public long ProStepId { get; set; }
+ public ProStep? ProStep { get; set; }
+ }
+}
diff --git a/CapMachine.Model/MeterPs.cs b/CapMachine.Model/MeterPs.cs
new file mode 100644
index 0000000..b6f1cdf
--- /dev/null
+++ b/CapMachine.Model/MeterPs.cs
@@ -0,0 +1,70 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ ///
+ /// Ps表设置
+ ///
+ [Table(Name = "MeterPs")]
+ public class MeterPs
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true, IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 程序步骤序号
+ ///
+ [Column(Name = "StepNo")]
+ public int StepNo { get; set; }
+
+ ///
+ /// 开始值
+ ///
+ [Column(Name = "StartValue")]
+ public double StartValue { get; set; }
+
+ ///
+ /// 结束值
+ ///
+ [Column(Name = "EndValue")]
+ public double EndValue { get; set; }
+
+ ///
+ /// 维持时间
+ ///
+ [Column(Name = "KeepTime")]
+ public double KeepTime { get; set; }
+
+ ///
+ /// 配置值类型
+ ///
+ [Column(MapType = typeof(int))]
+ public ConfigValueType ValueType { get; set; }
+
+ ///
+ /// 常值
+ /// 在ValueType为常值时会使用
+ ///
+ [Column(Name = "Constant")]
+ public double Constant { get; set; }
+
+
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
+ ///
+
+ public long ProStepId { get; set; }
+ public ProStep? ProStep { get; set; }
+ }
+}
diff --git a/CapMachine.Model/MeterSpeed.cs b/CapMachine.Model/MeterSpeed.cs
new file mode 100644
index 0000000..8d6a941
--- /dev/null
+++ b/CapMachine.Model/MeterSpeed.cs
@@ -0,0 +1,71 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ ///
+ /// 速度表设置
+ ///
+ [Table(Name = "MeterSpeed")]
+ public class MeterSpeed
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true, IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 程序步骤序号
+ ///
+ [Column(Name = "StepNo")]
+ public int StepNo { get; set; }
+
+ ///
+ /// 开始值
+ ///
+ [Column(Name = "StartValue")]
+ public double StartValue { get; set; }
+
+ ///
+ /// 结束值
+ ///
+ [Column(Name = "EndValue")]
+ public double EndValue { get; set; }
+
+ ///
+ /// 维持时间
+ ///
+ [Column(Name = "KeepTime")]
+ public double KeepTime { get; set; }
+
+ ///
+ /// 配置值类型
+ ///
+ [Column(MapType = typeof(int))]
+ public ConfigValueType ValueType { get; set; }
+
+ ///
+ /// 常值
+ /// 在ValueType为常值时会使用
+ ///
+ [Column(Name = "Constant")]
+ public double Constant { get; set; }
+
+
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
+ ///
+
+ public long ProStepId { get; set; }
+ public ProStep? ProStep { get; set; }
+
+ }
+}
diff --git a/CapMachine.Model/ProKpStepExecute.cs b/CapMachine.Model/ProKpStepExecute.cs
new file mode 100644
index 0000000..a129f1b
--- /dev/null
+++ b/CapMachine.Model/ProKpStepExecute.cs
@@ -0,0 +1,165 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ ///
+ /// 程序段具体步骤执行信息
+ ///
+ [Table(Name = "ProStepExecute")]
+ public class ProStepExecute
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true)]
+ public Guid Id { get; set; }
+
+ ///
+ /// 程序段名称
+ ///
+ [Column(Name = "ProName", IsNullable = false, StringLength = 20)]
+ public string ProName { get; set; }
+
+ ///
+ /// 程序段步骤
+ ///
+ [Column(Name = "ProStep", IsNullable = false)]
+ public int ProStep { get; set; }
+
+ ///
+ /// 程序段反复
+ ///
+ [Column(Name = "ProRepeat")]
+ public int ProRepeat { get; set; }
+
+ ///
+ /// 是否正在执行当前程序段
+ ///
+ [Column(Name = "IsCurrentProStep")]
+ public bool IsCurrentProStep { get; set; }
+
+
+ /////////////////////////////////////////////////////////////////
+ ////////////////////////程序步骤///////////////////////////////
+ ////////////////////////////////////////////////////////////////
+
+ ///
+ /// 是否正在执行当前程序段
+ ///
+ [Column(Name = "IsCurrentMeterStep")]
+ public bool IsCurrentMeterStep { get; set; }
+
+ ///
+ /// 仪表功能名称
+ ///
+ [Column(Name = "MeterName", IsNullable = false, StringLength = 20)]
+ public string MeterName { get; set; }
+
+ ///
+ /// 步骤
+ ///
+ [Column(Name = "MeterStep", IsNullable = false)]
+ public int MeterStep { get; set; }
+
+ ///
+ /// 速度 DegC
+ ///
+ [Column(Name = "SV", IsNullable = true)]
+ public int SV { get; set; }
+
+ ///
+ /// 时间-分钟
+ ///
+ [Column(Name = "TimeMin", IsNullable = true)]
+ public int TimeMin { get; set; }
+
+ ///
+ /// 时间-秒
+ ///
+ [Column(Name = "TimeSec", IsNullable = true)]
+ public int TimeSec { get; set; }
+
+ ///
+ /// PID NO
+ ///
+ [Column(Name = "PIDNo", IsNullable = true)]
+ public int PIDNo { get; set; }
+
+ ///
+ /// Limit NO
+ ///
+ [Column(Name = "LitmitNo", IsNullable = true)]
+ public int LitmitNo { get; set; }
+
+ ///
+ /// Alarm NO
+ ///
+ [Column(Name = "AlarmNo", IsNullable = true)]
+ public int AlarmNo { get; set; }
+
+ /////
+ ///// 时间信号
+ /////
+ //[Column(Name = "TimeSign1", IsNullable = true)]
+ //public int TimeSign1 { get; set; }
+
+ /////
+ ///// 时间信号
+ /////
+ //[Column(Name = "TimeSign2", IsNullable = true)]
+ //public int TimeSign2 { get; set; }
+
+ /////
+ ///// 时间信号
+ /////
+ //[Column(Name = "TimeSign3", IsNullable = true)]
+ //public int TimeSign3 { get; set; }
+
+ ///
+ /// 步进重复
+ ///
+ [Column(Name = "Repeat", IsNullable = true)]
+ public int StepRepeat { get; set; }
+
+ /////
+ ///// 拓展字段1
+ /////
+ //[Column(Name = "FeildExte1", IsNullable = true)]
+ //public string FeildExte1 { get; set; }
+
+ /////
+ ///// 拓展字段1
+ /////
+ //[Column(Name = "FeildExte2", IsNullable = true)]
+ //public string FeildExte2 { get; set; }
+
+ /////
+ ///// 拓展字段1
+ /////
+ //[Column(Name = "FeildExte3", IsNullable = true)]
+ //public string FeildExte3 { get; set; }
+
+
+ /////
+ ///// 拓展字段1
+ /////
+ //[Column(Name = "FeildExte4", IsNullable = true)]
+ //public string FeildExte4 { get; set; }
+
+ /////
+ ///// 拓展字段1
+ /////
+ //[Column(Name = "FeildExte5", IsNullable = true)]
+ //public string FeildExte5 { get; set; }
+
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
+ public DateTime CreateTime { get; set; }
+
+
+ }
+}
diff --git a/CapMachine.Model/ProStep.cs b/CapMachine.Model/ProStep.cs
new file mode 100644
index 0000000..f992cf8
--- /dev/null
+++ b/CapMachine.Model/ProStep.cs
@@ -0,0 +1,68 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.Metrics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ ///
+ /// 步骤
+ ///
+ [Table(Name = "ProStep")]
+ public class ProStep
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true, IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 程序步骤序号
+ ///
+ [Column(Name = "StepNo")]
+ public int StepNo { get; set; }
+
+ ///
+ /// 程序步骤反复次数
+ ///
+ [Column(Name = "StepRepeat")]
+ public int StepRepeat { get; set; }
+
+ /////
+ ///// 程序段反复
+ /////
+ //[Column(Name = "ProRepeat")]
+ //public int ProRepeat { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [Column(Name = "Remark", IsNullable = false, StringLength = 200)]
+ public string Remark { get; set; }
+
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
+ public DateTime CreateTime { get; set; }
+
+
+ ///
+ /// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
+ ///
+
+ public ICollection? MeterSpeeds { get; set; }
+ public ICollection? MeterPds { get; set; }
+ public ICollection? MeterPss { get; set; }
+
+
+
+ ///
+ /// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
+ ///
+
+ public long ProgramSegId { get; set; }
+ public ProgramSeg? ProgramSeg { get; set; }
+ }
+}
diff --git a/CapMachine.Model/ProStepDto.cs b/CapMachine.Model/ProStepDto.cs
new file mode 100644
index 0000000..1d4d04f
--- /dev/null
+++ b/CapMachine.Model/ProStepDto.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ public class ProStepDto
+ {
+ ///
+ /// 主键
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// 程序步骤序号
+ ///
+ public int StepNo { get; set; }
+
+ ///
+ /// 程序循环次数
+ ///
+ public int StepRepeat { get; set; }
+
+ ///
+ /// 压缩机转速信息
+ ///
+ public string? SpeedInfo { get; set; }
+
+ ///
+ /// PID信息
+ ///
+ public string? PID { get; set; }
+
+ ///
+ /// PID输出限幅信息
+ ///
+ public string? PIDOutLimit { get; set; }
+
+ ///
+ /// Ps信息
+ ///
+ public string? Ps { get; set; }
+
+ ///
+ /// Pd信息
+ ///
+ public string? PdInfo{ get; set; }
+ }
+}
diff --git a/CapMachine.Model/ProgramSeg.cs b/CapMachine.Model/ProgramSeg.cs
new file mode 100644
index 0000000..ebe4669
--- /dev/null
+++ b/CapMachine.Model/ProgramSeg.cs
@@ -0,0 +1,52 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+
+namespace CapMachine.Model
+{
+ [Table(Name = "ProgramSeg")]
+ public class ProgramSeg
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true,IsIdentity =true)]
+ public long Id { get; set; }
+
+ ///
+ /// 程序名称
+ /// 工况名称
+ ///
+ [Column(Name = "Name", IsNullable = false, StringLength = 50)]
+ public string Name { get; set; }
+
+ ///
+ /// 程序段反复
+ ///
+ [Column(Name = "ProRepeat")]
+ public int ProRepeat { get; set; }
+
+ ///
+ /// 编辑者
+ ///
+ [Column(Name = "UserName", IsNullable = false, StringLength = 20)]
+ public string UserName { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [Column(Name = "Remark", IsNullable = false, StringLength = 100)]
+ public string Remark { get; set; }
+
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
+ public DateTime CreateTime { get; set; }
+
+
+ ///
+ /// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
+ ///
+
+ public ICollection? ProSteps { get; set; }
+
+ }
+}
diff --git a/CapMachine.Model/QuickCpLimtNo.cs b/CapMachine.Model/QuickCpLimtNo.cs
new file mode 100644
index 0000000..d0e3d38
--- /dev/null
+++ b/CapMachine.Model/QuickCpLimtNo.cs
@@ -0,0 +1,46 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ [Table(Name = "QuickCpLimtNo")]
+ public class QuickCpLimtNo
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true)]
+ public Guid Id { get; set; }
+
+ ///
+ /// 快速设置仪表名称
+ ///
+ [Column(Name = "MeterName", IsNullable = true, StringLength = 30)]
+ public string MeterName { get; set; }
+
+ ///
+ /// 序号
+ ///
+ [Column(Name = "IndexNo", IsNullable = false)]
+ public int IndexNo { get; set; }
+
+ ///
+ /// 上限
+ ///
+ [Column(Name = "Up", DbType = "decimal(5, 1)", IsNullable = true)]
+ public decimal Up { get; set; }
+
+ ///
+ /// 下限
+ ///
+ [Column(Name = "Down", DbType = "decimal(5, 1)", IsNullable = true)]
+ public decimal Down { get; set; }
+
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
+ public DateTime CreateTime { get; set; }
+ }
+}
diff --git a/CapMachine.Model/QuickCpPIDNo.cs b/CapMachine.Model/QuickCpPIDNo.cs
new file mode 100644
index 0000000..1de77da
--- /dev/null
+++ b/CapMachine.Model/QuickCpPIDNo.cs
@@ -0,0 +1,52 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ [Table(Name = "QuickCpPIDNo")]
+ public class QuickCpPIDNo
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true)]
+ public Guid Id { get; set; }
+
+ ///
+ /// 快速设置仪表名称
+ ///
+ [Column(Name = "MeterName", IsNullable = true, StringLength = 30)]
+ public string MeterName { get; set; }
+
+ ///
+ /// 序号
+ ///
+ [Column(Name = "IndexNo", IsNullable = false)]
+ public int IndexNo { get; set; }
+
+ ///
+ /// P
+ ///
+ [Column(Name = "P", DbType = "decimal(5, 1)", IsNullable = true)]
+ public decimal P { get; set; }
+
+ ///
+ /// I
+ ///
+ [Column(Name = "I", IsNullable = true)]
+ public int I { get; set; }
+
+ ///
+ /// D
+ ///
+ [Column(Name = "D", IsNullable = true)]
+ public int D { get; set; }
+
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
+ public DateTime CreateTime { get; set; }
+ }
+}
diff --git a/CapMachine.Model/QuickProStepExecute.cs b/CapMachine.Model/QuickProStepExecute.cs
new file mode 100644
index 0000000..f21e6ac
--- /dev/null
+++ b/CapMachine.Model/QuickProStepExecute.cs
@@ -0,0 +1,162 @@
+using FreeSql.DataAnnotations;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Model
+{
+ ///
+ /// 快速设置程序段具体步骤执行信息
+ ///
+ [Table(Name = "QuickProStepExecute")]
+ public class QuickProStepExecute
+ {
+ ///
+ /// 主键
+ ///
+ [Column(IsPrimary = true)]
+ public Guid Id { get; set; }
+
+ ///
+ /// 程序段名称
+ ///
+ [Column(Name = "ProName", IsNullable = false, StringLength = 30)]
+ public string ProName { get; set; }
+
+ ///
+ /// 程序段步骤
+ ///
+ [Column(Name = "ProStep", IsNullable = false)]
+ public int ProStep { get; set; }
+
+ ///
+ /// 程序段反复
+ ///
+ [Column(Name = "ProRepeat")]
+ public int ProRepeat { get; set; }
+
+ ///
+ /// 是否正在执行当前程序段
+ ///
+ [Column(Name = "IsCurrentProStep")]
+ public bool IsCurrentProStep { get; set; }
+
+
+ /////////////////////////////////////////////////////////////////
+ ////////////////////////程序步骤///////////////////////////////
+ ////////////////////////////////////////////////////////////////
+
+ ///
+ /// 是否正在执行当前程序段
+ ///
+ [Column(Name = "IsCurrentMeterStep")]
+ public bool IsCurrentMeterStep { get; set; }
+
+ ///
+ /// 仪表功能名称
+ ///
+ [Column(Name = "MeterName", IsNullable = false, StringLength = 20)]
+ public string MeterName { get; set; }
+
+ ///
+ /// 步骤
+ ///
+ [Column(Name = "MeterStep", IsNullable = false)]
+ public int MeterStep { get; set; }
+
+ ///
+ /// 这个步骤是打开具体设置步骤界面的那个层面的信息,例如:2-3,代表是程序2里面的仪表步骤3,方便调试和给液击使用
+ ///
+ [Column(Name = "ProStepInfo", IsNullable = false)]
+ public string ProStepInfo { get; set; }
+
+ ///
+ /// SV DegC
+ ///
+ [Column(Name = "SV", IsNullable = true)]
+ public int SV { get; set; }
+
+ ///
+ /// 时间-分钟-步骤维持时间
+ ///
+ [Column(Name = "TimeMin", IsNullable = true)]
+ public int TimeMin { get; set; }
+
+ ///
+ /// 时间-秒-步骤维持时间
+ ///
+ [Column(Name = "TimeSec", IsNullable = true)]
+ public int TimeSec { get; set; }
+
+ ///
+ /// PID NO-PID序号
+ ///
+ [Column(Name = "PIDNo", IsNullable = true)]
+ public int PIDNo { get; set; }
+
+ ///
+ /// 是否启用坡度
+ ///
+ [Column(Name = "ExistSlop", IsNullable = false)]
+ public bool ExistSlop { get; set; }
+
+ ///
+ /// 时间-秒-斜坡时间
+ ///
+ [Column(Name = "SlopTimeSec", IsNullable = true)]
+ public int SlopTimeSec { get; set; }
+
+ ///
+ /// 启用状态-没有启用就是什么数据都没有
+ /// Const-常值-常值,StepValue有值,只有一个步骤,CycleTime为0
+ /// MultisStep-有步骤细节-此时在一个仪表下就会有很多步骤的细节数据
+ ///
+ [Column(Name = "ConfigState", IsNullable = false, StringLength = 10)]
+ public string ConfigState { get; set; }
+
+ ///
+ /// PID NO-CpPIDNoInfo-用的是Cp表的QuickCpPIDNo模型,是一样的,因为里面有仪表名称
+ ///
+ public QuickCpPIDNo KpPIDNoInfo { get; set; }
+
+ ///
+ /// Limit NO
+ ///
+ [Column(Name = "LitmitNo", IsNullable = true)]
+ public int LitmitNo { get; set; }
+
+ ///
+ /// PID NO-CpPIDNoInfo 用的是Cp表的QuickCpLimtNo模型,是一样的,因为里面有仪表名称
+ ///
+ public QuickCpLimtNo KpLimitNoInfo { get; set; }
+
+ ///
+ /// Alarm NO
+ ///
+ [Column(Name = "AlarmNo", IsNullable = true)]
+ public int AlarmNo { get; set; }
+
+ /////
+ ///// 步进重复
+ /////
+ //[Column(Name = "Repeat", IsNullable = true)]
+ //public int StepRepeat { get; set; }
+
+
+ [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
+ public DateTime CreateTime { get; set; }
+
+
+
+ /////////////////////////////////////////////////////////////////
+ ////////////////////////步骤运行时间//////////////////////////
+ ////////////////////////////////////////////////////////////////
+
+ /////
+ ///// 当前仪表步骤执行时间信息
+ /////
+ //public CpRunTime CpRunTimeInfo { get; set; }
+ }
+}
diff --git a/CapMachine.Shared/CapMachine.Shared.csproj b/CapMachine.Shared/CapMachine.Shared.csproj
new file mode 100644
index 0000000..600f2f5
--- /dev/null
+++ b/CapMachine.Shared/CapMachine.Shared.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Library
+ net6.0-windows
+ enable
+ enable
+ true
+
+
+
+
+
+
+
diff --git a/CapMachine.Shared/Controls/MeterConfig.xaml b/CapMachine.Shared/Controls/MeterConfig.xaml
new file mode 100644
index 0000000..1773aa8
--- /dev/null
+++ b/CapMachine.Shared/Controls/MeterConfig.xaml
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CapMachine.Shared/Controls/MeterConfig.xaml.cs b/CapMachine.Shared/Controls/MeterConfig.xaml.cs
new file mode 100644
index 0000000..1a522d5
--- /dev/null
+++ b/CapMachine.Shared/Controls/MeterConfig.xaml.cs
@@ -0,0 +1,122 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace CapMachine.Shared.Controls
+{
+ ///
+ /// MeterConfig.xaml 的交互逻辑
+ ///
+ public partial class MeterConfig : UserControl
+ {
+ public MeterConfig()
+ {
+ InitializeComponent();
+ }
+
+ public string MeterName
+ {
+ get
+ {
+ return (string)base.GetValue(MeterConfig.MeterNameProperty);
+ }
+ set
+ {
+ base.SetValue(MeterConfig.MeterNameProperty, value);
+ }
+ }
+ public static readonly DependencyProperty MeterNameProperty = DependencyProperty.Register("MeterName", typeof(string), typeof(MeterConfig), new PropertyMetadata("速度"));
+
+
+ //MeterSlopCell
+ public object SelectedMeter
+ {
+ get
+ {
+ return (MeterSlopCell)base.GetValue(MeterConfig.SelectedMeterProperty);
+ }
+ set
+ {
+ base.SetValue(MeterConfig.SelectedMeterProperty, value);
+ }
+ }
+ public static readonly DependencyProperty SelectedMeterProperty = DependencyProperty.Register("SelectedMeter", typeof(object), typeof(MeterConfig), new PropertyMetadata(null));
+
+
+ //MeterSlopCell
+ public IEnumerable ListMeter
+ {
+ get
+ {
+ return (IEnumerable)base.GetValue(MeterConfig.ListMeterProperty);
+ }
+ set
+ {
+ base.SetValue(MeterConfig.ListMeterProperty, value);
+ }
+ }
+ public static readonly DependencyProperty ListMeterProperty = DependencyProperty.Register("ListMeter", typeof(IEnumerable), typeof(MeterConfig), new PropertyMetadata(null));
+
+
+ ///
+ /// Add 命令
+ ///
+ public ICommand AddCommand
+ {
+ get { return (ICommand)GetValue(AddCommandProperty); }
+ set { SetValue(AddCommandProperty, value); }
+ }
+ public static readonly DependencyProperty AddCommandProperty =
+ DependencyProperty.Register("AddCommand", typeof(ICommand), typeof(MeterConfig), new PropertyMetadata(default(ICommand)));
+
+ ///
+ /// Edit 命令
+ ///
+ public ICommand EditCommand
+ {
+ get { return (ICommand)GetValue(EditCommandProperty); }
+ set { SetValue(EditCommandProperty, value); }
+ }
+ public static readonly DependencyProperty EditCommandProperty =
+ DependencyProperty.Register("EditCommand", typeof(ICommand), typeof(MeterConfig), new PropertyMetadata(default(ICommand)));
+
+ ///
+ /// Delete 命令
+ ///
+ public ICommand DeleteCommand
+ {
+ get { return (ICommand)GetValue(DeleteCommandProperty); }
+ set { SetValue(DeleteCommandProperty, value); }
+ }
+ public static readonly DependencyProperty DeleteCommandProperty =
+ DependencyProperty.Register("DeleteCommand", typeof(ICommand), typeof(MeterConfig), new PropertyMetadata(default(ICommand)));
+
+
+ //MeterSelectedChangedCmd
+ ///
+ /// Add 命令
+ ///
+ public ICommand MeterSelectedChangedCmd
+ {
+ get { return (ICommand)GetValue(MeterSelectedChangedCmdProperty); }
+ set { SetValue(MeterSelectedChangedCmdProperty, value); }
+ }
+ public static readonly DependencyProperty MeterSelectedChangedCmdProperty =
+ DependencyProperty.Register("MeterSelectedChangedCmd", typeof(ICommand), typeof(MeterConfig), new PropertyMetadata(default(ICommand)));
+
+
+ }
+}
diff --git a/CapMachine.Shared/Controls/MeterSlopCell.cs b/CapMachine.Shared/Controls/MeterSlopCell.cs
new file mode 100644
index 0000000..5764472
--- /dev/null
+++ b/CapMachine.Shared/Controls/MeterSlopCell.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CapMachine.Shared.Controls
+{
+ public class MeterSlopCell
+ {
+ ///
+ /// 开始值
+ ///
+ public double StartValue { get; set; }
+
+ ///
+ /// 结束值
+ ///
+ public double EndValue { get; set; }
+
+ ///
+ /// 维持时间
+ ///
+ public double KeepTime { get; set; }
+ }
+}
diff --git a/CapMachine.Shared/Themes/Generic.xaml b/CapMachine.Shared/Themes/Generic.xaml
new file mode 100644
index 0000000..5ec2505
--- /dev/null
+++ b/CapMachine.Shared/Themes/Generic.xaml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/CapMachine.Wpf/App.config b/CapMachine.Wpf/App.config
new file mode 100644
index 0000000..bf9a94b
--- /dev/null
+++ b/CapMachine.Wpf/App.config
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CapMachine.Wpf/App.xaml b/CapMachine.Wpf/App.xaml
new file mode 100644
index 0000000..d791b16
--- /dev/null
+++ b/CapMachine.Wpf/App.xaml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CapMachine.Wpf/App.xaml.cs b/CapMachine.Wpf/App.xaml.cs
new file mode 100644
index 0000000..71e4e69
--- /dev/null
+++ b/CapMachine.Wpf/App.xaml.cs
@@ -0,0 +1,149 @@
+using AutoMapper;
+using CapMachine.Core.IService;
+using CapMachine.Wpf.MapperProfile;
+using CapMachine.Wpf.Services;
+using CapMachine.Wpf.ViewModels;
+using CapMachine.Wpf.Views;
+using FreeSql;
+using Prism.DryIoc;
+using Prism.Ioc;
+using Prism.Regions;
+using System.Windows;
+
+namespace CapMachine.Wpf
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : PrismApplication
+ {
+ public App()
+ {
+ try
+ {
+ //24.2.7
+ //Syncfusion.SfSkinManager.SfSkinManager.ApplyStylesOnApplication = true;
+ Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MzEyMzM3NkAzMjM0MmUzMDJlMzBHdjVKNUNpNWZxYXQwR05ZbVYvUEtzbGxXMnVxRjYvRGtLSlZUOGpjQW44PQ==");
+
+ // 授权 a717c797-59e3-48de-b6b4-574a4e03dc79
+ if (!HslCommunication.Authorization.SetAuthorizationCode("a717c797-59e3-48de-b6b4-574a4e03dc79"))
+ {
+ //active failed
+ //MessageBox.Show("授权失败!当前程序只能使用8小时!");
+ //return;
+
+ }
+ else
+ {
+ //IsActive = true;
+ }
+
+ //SfSkinManager.ApplyStylesOnApplication = true;
+
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message);
+ }
+ }
+
+ protected override Window CreateShell() => null;
+
+
+ protected override void RegisterTypes(IContainerRegistry containerRegistry)
+ {
+ ////注册日志服务
+ //containerRegistry.RegisterSingleton();
+
+ ////注册设备服务
+ //containerRegistry.RegisterSingleton();
+ containerRegistry.RegisterSingleton();
+
+ //注册AutoMapper 将IAutoMapperProvider注入IOC容器,并对外提供IMapper注入类型。
+ containerRegistry.RegisterSingleton();
+ containerRegistry.Register(typeof(IMapper), GetMapper);
+
+ //注册IFreeSql实例 单例
+ containerRegistry.RegisterSingleton(() =>
+ {
+ IFreeSql Fsql = new FreeSqlBuilder()
+ //.UseConnectionString(DataType.SqlServer, "Data Source=CT-PC;user instance=false;Initial Catalog=KylinEMS;Encrypt=True;TrustServerCertificate=True;User ID=sa;Password=12345678")
+ .UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=CT-PC;user instance=false;Initial Catalog=CapMachine;Encrypt=True;TrustServerCertificate=True;User ID=sa;Password=12345678")
+ .UseAutoSyncStructure(true)
+ .Build();
+ return Fsql;
+ });
+
+ containerRegistry.RegisterSingleton();
+ containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterForNavigation();
+ //containerRegistry.RegisterForNavigation();
+ //containerRegistry.RegisterForNavigation();
+
+ //注册Dialog视图时绑定VM
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterDialog();
+
+ //注册AutoMapper
+ //containerRegistry.RegisterSingleton();
+ //containerRegistry.Register(typeof(IMapper), GetMapper);
+ }
+
+
+
+ //private IMapper GetMapper(IContainerProvider container)
+ //{
+ // var provider = container.Resolve();
+ // return provider.GetMapper();
+
+ //}
+
+ ///
+ /// 将IAutoMapperProvider注入IOC容器,并对外提供IMapper注入类型。
+ ///
+ ///
+ ///
+ private IMapper GetMapper(IContainerProvider container)
+ {
+ var provider = container.Resolve();
+ return provider.GetMapper();
+ }
+
+ ///
+ /// 系统初始化
+ ///
+ protected override void OnInitialized()
+ {
+ //从容器中获取MainView的实例对象
+ var container = ContainerLocator.Container;
+ var shell = container.Resolve