diff --git a/CleanMachineHMI.Model/CleanMachineHMI.Domain.csproj b/CleanMachineHMI.Model/CleanMachineHMI.Domain.csproj index 842fdf8..47216ec 100644 --- a/CleanMachineHMI.Model/CleanMachineHMI.Domain.csproj +++ b/CleanMachineHMI.Model/CleanMachineHMI.Domain.csproj @@ -9,7 +9,7 @@ Properties CleanMachineHMI.Domain CleanMachineHMI.Domain - v4.5 + v4.6 512 true diff --git a/CleanMachineHMI/App.config b/CleanMachineHMI/App.config index 1a40121..19d6bde 100644 --- a/CleanMachineHMI/App.config +++ b/CleanMachineHMI/App.config @@ -2,63 +2,63 @@ -
+
- - + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - \ No newline at end of file + diff --git a/CleanMachineHMI/CleanMachineHMI.csproj b/CleanMachineHMI/CleanMachineHMI.csproj index 680d71a..356d4c7 100644 --- a/CleanMachineHMI/CleanMachineHMI.csproj +++ b/CleanMachineHMI/CleanMachineHMI.csproj @@ -8,7 +8,7 @@ WinExe CleanMachineHMI CleanMachineHMI - v4.5 + v4.6 512 true @@ -122,10 +122,6 @@ False ..\public\FastReport.Web.dll - - False - ..\public\LEase.dll - ..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.140.1000.523\lib\net40\Microsoft.ReportViewer.Common.dll @@ -144,10 +140,6 @@ ..\packages\Microsoft.SqlServer.Types.14.0.314.76\lib\net40\Microsoft.SqlServer.Types.dll - - - ..\public\Microsoft.VisualBasic.PowerPacks.dll - False ..\public\NModbus4.dll @@ -288,6 +280,7 @@ frmWarning.cs + @@ -446,6 +439,8 @@ frmMainNew.cs + + diff --git a/CleanMachineHMI/FrmUserControl/frmMainDetail.Designer.cs b/CleanMachineHMI/FrmUserControl/frmMainDetail.Designer.cs index 5d5bc31..b06c822 100644 --- a/CleanMachineHMI/FrmUserControl/frmMainDetail.Designer.cs +++ b/CleanMachineHMI/FrmUserControl/frmMainDetail.Designer.cs @@ -68,8 +68,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonLabel9 = new ComponentFactory.Krypton.Toolkit.KryptonLabel(); this.swtbtn_brush2 = new CleanMachineHMI.LSwitchButton(); this.cbt_Brush2StatusTran = new CleanMachineHMI.CircleButton(); - this.shapeContainer1 = new Microsoft.VisualBasic.PowerPacks.ShapeContainer(); - this.lineShape1 = new Microsoft.VisualBasic.PowerPacks.LineShape(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox(); this.kryptonLabel13 = new ComponentFactory.Krypton.Toolkit.KryptonLabel(); @@ -515,7 +514,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonGroupBox7.Panel.Controls.Add(this.kryptonLabel9); this.kryptonGroupBox7.Panel.Controls.Add(this.swtbtn_brush2); this.kryptonGroupBox7.Panel.Controls.Add(this.cbt_Brush2StatusTran); - this.kryptonGroupBox7.Panel.Controls.Add(this.shapeContainer1); + this.kryptonGroupBox7.Size = new System.Drawing.Size(260, 338); this.kryptonGroupBox7.TabIndex = 5; this.kryptonGroupBox7.Values.Heading = ""; @@ -811,23 +810,10 @@ namespace CleanMachineHMI.FrmUserControl this.cbt_Brush2StatusTran.UseVisualStyleBackColor = false; // // shapeContainer1 - // - this.shapeContainer1.Location = new System.Drawing.Point(0, 0); - this.shapeContainer1.Margin = new System.Windows.Forms.Padding(0); - this.shapeContainer1.Name = "shapeContainer1"; - this.shapeContainer1.Shapes.AddRange(new Microsoft.VisualBasic.PowerPacks.Shape[] { - this.lineShape1}); - this.shapeContainer1.Size = new System.Drawing.Size(256, 334); - this.shapeContainer1.TabIndex = 45; - this.shapeContainer1.TabStop = false; + // // lineShape1 - // - this.lineShape1.Name = "lineShape1"; - this.lineShape1.X1 = 20; - this.lineShape1.X2 = 235; - this.lineShape1.Y1 = 117; - this.lineShape1.Y2 = 117; + // // tableLayoutPanel2 // @@ -2915,8 +2901,7 @@ namespace CleanMachineHMI.FrmUserControl private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel9; private LSwitchButton swtbtn_brush2; private CircleButton cbt_Brush2StatusTran; - private Microsoft.VisualBasic.PowerPacks.ShapeContainer shapeContainer1; - private Microsoft.VisualBasic.PowerPacks.LineShape lineShape1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1; private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_SheetType; diff --git a/CleanMachineHMI/Properties/Resources.Designer.cs b/CleanMachineHMI/Properties/Resources.Designer.cs index ccabb2c..c302097 100644 --- a/CleanMachineHMI/Properties/Resources.Designer.cs +++ b/CleanMachineHMI/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace CleanMachineHMI.Properties { // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen // (以 /str 作为命令选项),或重新生成 VS 项目。 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/CleanMachineHMI/Properties/Settings.Designer.cs b/CleanMachineHMI/Properties/Settings.Designer.cs index 9a9b1a9..d22e62b 100644 --- a/CleanMachineHMI/Properties/Settings.Designer.cs +++ b/CleanMachineHMI/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace CleanMachineHMI.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/CleanMachineHMI/Utils/AnimateBase.cs b/CleanMachineHMI/Utils/AnimateBase.cs new file mode 100644 index 0000000..5529f5a --- /dev/null +++ b/CleanMachineHMI/Utils/AnimateBase.cs @@ -0,0 +1,148 @@ +// LEase.AnimateBase +using System; +using LEase; + +public class AnimateBase +{ + public static double Back(double x, LEaseMode easeMode) + { + switch (easeMode) + { + case LEaseMode.EaseIn: + return 2.70158 * x * x * x - 1.70158 * x * x; + case LEaseMode.EaseOut: + return 1.0 + 2.70158 * Math.Pow(x - 1.0, 3.0) + 1.70158 * Math.Pow(x - 1.0, 2.0); + case LEaseMode.EaseInOut: + return (x < 0.5) ? (Math.Pow(2.0 * x, 2.0) * (7.189819 * x - 2.5949095) / 2.0) : ((Math.Pow(2.0 * x - 2.0, 2.0) * (7.189819 * x - 4.5949095) + 2.0) / 2.0); + default: + return 0.0; + } + } + + private static double BounceOut(double x) + { + if (x < 0.36363636363636365) + { + return 7.5625 * x * x; + } + if (x < 0.72727272727272729) + { + return 7.5625 * (x -= 0.54545454545454541) * x + 0.75; + } + if (x < 0.90909090909090906) + { + return 7.5625 * (x -= 0.81818181818181823) * x + 0.9375; + } + return 7.5625 * (x -= 21.0 / 22.0) * x + 63.0 / 64.0; + } + + public static double Bounce(double x, LEaseMode easeMode) + { + switch (easeMode) + { + case LEaseMode.EaseIn: + return 1.0 - BounceOut(1.0 - x); + case LEaseMode.EaseOut: + return BounceOut(x); + case LEaseMode.EaseInOut: + return (x < 0.5) ? ((1.0 - BounceOut(1.0 - 2.0 * x)) / 2.0) : ((1.0 + BounceOut(2.0 * x - 1.0)) / 2.0); + default: + return 0.0; + } + } + + public static double Circle(double x, LEaseMode easeMode) + { + switch (easeMode) + { + case LEaseMode.EaseIn: + return 1.0 - Math.Sqrt(1.0 - Math.Pow(x, 2.0)); + case LEaseMode.EaseOut: + return Math.Sqrt(1.0 - Math.Pow(x - 1.0, 2.0)); + case LEaseMode.EaseInOut: + return (x < 0.5) ? ((1.0 - Math.Sqrt(1.0 - Math.Pow(2.0 * x, 2.0))) / 2.0) : ((Math.Sqrt(1.0 - Math.Pow(-2.0 * x + 2.0, 2.0)) + 1.0) / 2.0); + default: + return 0.0; + } + } + + public static double Power(double x, LEaseMode easeMode, int power) + { + switch (easeMode) + { + case LEaseMode.EaseIn: + return Math.Pow(x, power); + case LEaseMode.EaseOut: + return 1.0 - Math.Pow(1.0 - x, power); + case LEaseMode.EaseInOut: + return (x < 0.5) ? (Math.Pow(2.0, power - 1) * Math.Pow(x, power)) : (1.0 - Math.Pow(-2.0 * x + 2.0, power) / 2.0); + default: + return 0.0; + } + } + + public static double Quadratic(double x, LEaseMode easeMode) + { + return Power(x, easeMode, 2); + } + + public static double Cubic(double x, LEaseMode easeMode) + { + return Power(x, easeMode, 3); + } + + public static double Quartic(double x, LEaseMode easeMode) + { + return Power(x, easeMode, 4); + } + + public static double Quintic(double x, LEaseMode easeMode) + { + return Power(x, easeMode, 5); + } + + public static double Elastic(double x, LEaseMode easeMode) + { + switch (easeMode) + { + case LEaseMode.EaseIn: + return (x == 0.0) ? 0.0 : ((x == 1.0) ? 1.0 : ((0.0 - Math.Pow(2.0, 10.0 * x - 10.0)) * Math.Sin((x * 10.0 - 10.75) * 2.0 * Math.PI / 3.0))); + case LEaseMode.EaseOut: + return (x == 0.0) ? 0.0 : ((x == 1.0) ? 1.0 : (Math.Pow(2.0, -10.0 * x) * Math.Sin((x * 10.0 - 0.75) * 2.0 * Math.PI / 3.0) + 1.0)); + case LEaseMode.EaseInOut: + return (x == 0.0) ? 0.0 : ((x == 1.0) ? 1.0 : ((x < 0.5) ? ((0.0 - Math.Pow(2.0, 20.0 * x - 10.0) * Math.Sin((x * 20.0 - 11.125) * 2.0 * Math.PI / 4.5)) / 2.0) : (Math.Pow(2.0, -20.0 * x + 10.0) * Math.Sin((x * 20.0 - 11.125) * 2.0 * Math.PI / 4.5) / 2.0 + 1.0))); + default: + return 0.0; + } + } + + public static double Exponential(double x, LEaseMode easeMode) + { + switch (easeMode) + { + case LEaseMode.EaseIn: + return (x == 0.0) ? 0.0 : Math.Pow(2.0, 10.0 * x - 10.0); + case LEaseMode.EaseOut: + return (x == 1.0) ? 1.0 : (1.0 - Math.Pow(2.0, -10.0 * x)); + case LEaseMode.EaseInOut: + return (x == 0.0) ? 0.0 : ((x == 1.0) ? 1.0 : ((x < 0.5) ? (Math.Pow(2.0, 20.0 * x - 10.0) / 2.0) : ((2.0 - Math.Pow(2.0, -20.0 * x + 10.0)) / 2.0))); + default: + return 0.0; + } + } + + public static double Sine(double x, LEaseMode easeMode) + { + switch (easeMode) + { + case LEaseMode.EaseIn: + return 1.0 - Math.Cos(x * Math.PI / 2.0); + case LEaseMode.EaseOut: + return Math.Sin(x * Math.PI / 2.0); + case LEaseMode.EaseInOut: + return (0.0 - (Math.Cos(Math.PI * x) - 1.0)) / 2.0; + default: + return 0.0; + } + } +} diff --git a/CleanMachineHMI/Utils/LEaseMode.cs b/CleanMachineHMI/Utils/LEaseMode.cs new file mode 100644 index 0000000..feac8c3 --- /dev/null +++ b/CleanMachineHMI/Utils/LEaseMode.cs @@ -0,0 +1,9 @@ +namespace LEase +{ + public enum LEaseMode + { + EaseIn, + EaseOut, + EaseInOut + } +} diff --git a/CleanMachineHMI/Utils/LEaseType.cs b/CleanMachineHMI/Utils/LEaseType.cs new file mode 100644 index 0000000..92ec1cb --- /dev/null +++ b/CleanMachineHMI/Utils/LEaseType.cs @@ -0,0 +1,16 @@ +namespace LEase +{ + public enum LEaseType + { + Back, + Bounce, + Circle, + Quadratic, + Cubic, + Quartic, + Quintic, + Elastic, + Exponential, + Sine + } +} diff --git a/CleanMachineHMI/Utils/LSwitchButton.cs b/CleanMachineHMI/Utils/LSwitchButton.cs index 849ca4d..aee6bf4 100644 --- a/CleanMachineHMI/Utils/LSwitchButton.cs +++ b/CleanMachineHMI/Utils/LSwitchButton.cs @@ -186,6 +186,8 @@ namespace CleanMachineHMI private void TTimer_Tick(object sender, EventArgs e) { + + bool b = (_IsOpen?(iNow>=0):(iNow<=iDuration)); if (b) { @@ -251,7 +253,7 @@ namespace CleanMachineHMI protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); - e.Graphics.SmoothingMode = SmoothingMode.HighQuality; + // e.Graphics.SmoothingMode = SmoothingMode.HighQuality; Pen penBarBack = new Pen(_CloseColor, _BarHight); Pen penBarFore = new Pen(_OpenColor, _BarHight); diff --git a/LeadDataBaseUtility/App.config b/LeadDataBaseUtility/App.config index d5d0df3..d47b274 100644 --- a/LeadDataBaseUtility/App.config +++ b/LeadDataBaseUtility/App.config @@ -1,14 +1,14 @@ - + -
+
- - + + - \ No newline at end of file + diff --git a/LeadDataBaseUtility/LeadDataBaseUtility.csproj b/LeadDataBaseUtility/LeadDataBaseUtility.csproj index f4335fa..e85df29 100644 --- a/LeadDataBaseUtility/LeadDataBaseUtility.csproj +++ b/LeadDataBaseUtility/LeadDataBaseUtility.csproj @@ -9,7 +9,7 @@ Properties LeadDataBaseUtility LeadDataBaseUtility - v4.5 + v4.6 512 diff --git a/NX_LogUtility/NX_LogUtility.csproj b/NX_LogUtility/NX_LogUtility.csproj index 0f7700d..5ed189d 100644 --- a/NX_LogUtility/NX_LogUtility.csproj +++ b/NX_LogUtility/NX_LogUtility.csproj @@ -9,9 +9,10 @@ Properties NX_LogUtility NX_LogUtility - v4.5 + v4.6 512 true + true