From f60c0612eab87630f6dc1d4f9ad56a63ac7793d0 Mon Sep 17 00:00:00 2001 From: vniacob Date: Sat, 14 May 2022 19:14:07 +0200 Subject: [PATCH 1/6] - Three working layers implementation with different color on preview panel. - Three different loop Count for every layer - Fast enabling layer control - Fast reopen of the last file --- LaserGRBL.sln | 10 +- LaserGRBL/App.config | 6 +- LaserGRBL/ColorScheme.cs | 19 +- LaserGRBL/ConnectLogForm.Designer.cs | 874 +++++++++++------ LaserGRBL/ConnectLogForm.cs | 128 ++- LaserGRBL/ConnectLogForm.it.resx | 20 +- LaserGRBL/ConnectLogForm.resx | 898 +++++++++++++++--- LaserGRBL/Core/GrblCore.cs | 535 ++++++----- LaserGRBL/GrblFile.cs | 194 ++-- LaserGRBL/HotKeysManager.cs | 4 +- LaserGRBL/LaserGRBL.csproj | 53 +- LaserGRBL/MainForm.cs | 16 +- LaserGRBL/MainForm.resx | 100 +- LaserGRBL/PSHelper/MaterialDB.Designer.cs | 142 +-- LaserGRBL/PSHelper/MaterialDB.cs | 348 +++---- LaserGRBL/RasterConverter/ImageProcessor.cs | 10 +- .../RasterConverter/RasterToLaserForm.cs | 202 ++-- LaserGRBL/SaveOptionForm.cs | 2 +- LaserGRBL/SaveOptionForm.resx | 36 +- LaserGRBL/Strings.Designer.cs | 2 +- .../ConvertSizeAndOptionForm.Designer.cs | 496 +++++----- .../SvgConverter/ConvertSizeAndOptionForm.cs | 4 +- .../ConvertSizeAndOptionForm.resx | 14 +- LaserGRBL/Tools/Project.cs | 32 +- LaserGRBL/UserControls/GrblPanel.cs | 17 +- 25 files changed, 2675 insertions(+), 1487 deletions(-) diff --git a/LaserGRBL.sln b/LaserGRBL.sln index 06ee53491..e0e715fac 100644 --- a/LaserGRBL.sln +++ b/LaserGRBL.sln @@ -1,20 +1,26 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.1705 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32421.90 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaserGRBL", "LaserGRBL\LaserGRBL.csproj", "{839698EC-FE05-4112-ACCB-A5D7556714F0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {839698EC-FE05-4112-ACCB-A5D7556714F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {839698EC-FE05-4112-ACCB-A5D7556714F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {839698EC-FE05-4112-ACCB-A5D7556714F0}.Debug|x86.ActiveCfg = Debug|x86 + {839698EC-FE05-4112-ACCB-A5D7556714F0}.Debug|x86.Build.0 = Debug|x86 {839698EC-FE05-4112-ACCB-A5D7556714F0}.Release|Any CPU.ActiveCfg = Release|Any CPU {839698EC-FE05-4112-ACCB-A5D7556714F0}.Release|Any CPU.Build.0 = Release|Any CPU + {839698EC-FE05-4112-ACCB-A5D7556714F0}.Release|x86.ActiveCfg = Release|x86 + {839698EC-FE05-4112-ACCB-A5D7556714F0}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/LaserGRBL/App.config b/LaserGRBL/App.config index e5d78fc03..dd7ba6f6c 100644 --- a/LaserGRBL/App.config +++ b/LaserGRBL/App.config @@ -1,4 +1,4 @@ - + @@ -14,6 +14,6 @@ - + - \ No newline at end of file + diff --git a/LaserGRBL/ColorScheme.cs b/LaserGRBL/ColorScheme.cs index 5771be8e7..a1335ab77 100644 --- a/LaserGRBL/ColorScheme.cs +++ b/LaserGRBL/ColorScheme.cs @@ -51,6 +51,9 @@ static ColorScheme() Color.DodgerBlue, //link color Color.Purple, //visited link color + + Color.Green, //preview laser 2 + Color.Black, //preview laser 3 }); mData.Add(Scheme.RedLaser, new Color[] { @@ -81,6 +84,9 @@ static ColorScheme() Color.DodgerBlue, //link color Color.Purple, //visited link color + + Color.Green, //preview laser 2 + Color.Black, //preview laser 3 }); mData.Add(Scheme.Dark, new Color[] { @@ -111,6 +117,9 @@ static ColorScheme() Color.Yellow, //link color Color.Violet, //visited link color + + Color.Green, //preview laser 2 + Color.Black, //preview laser 3 }); mData.Add(Scheme.Hacker, new Color[] { @@ -141,6 +150,9 @@ static ColorScheme() Color.Yellow, //link color Color.Violet, //visited link color + + Color.Green, //preview laser 2 + Color.Black, //preview laser 3 }); mData.Add(Scheme.Nighty, new Color[] { @@ -171,6 +183,9 @@ static ColorScheme() Color.Yellow, //link color Color.Violet, //visited link color + + Color.Green, //preview laser 2 + Color.Black, //preview laser 3 }); CurrentScheme = Scheme.RedLaser; @@ -233,8 +248,8 @@ public static Color PreviewFirstMovement { get { return GetColor(6); } } public static Color PreviewOtherMovement { get { return GetColor(7); } } - public static Color PreviewLaserPower - { get { return GetColor(8); } } + public static Color[] PreviewLaserPower + { get { return new Color[] { GetColor(8), GetColor(23), GetColor(24) }; } } public static Color PreviewCross { get { return GetColor(9); } } diff --git a/LaserGRBL/ConnectLogForm.Designer.cs b/LaserGRBL/ConnectLogForm.Designer.cs index b3a8c2642..c4a17bd2b 100644 --- a/LaserGRBL/ConnectLogForm.Designer.cs +++ b/LaserGRBL/ConnectLogForm.Designer.cs @@ -53,318 +53,575 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConnectLogForm)); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.GBCommands = new System.Windows.Forms.Panel(); - this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); - this.TxtManualCommand = new LaserGRBL.UserControls.GrblTextBox(); - this.CmdLog = new LaserGRBL.UserControls.CommandLog(); - this.GBFile = new System.Windows.Forms.Panel(); - this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); - this.LblProgress = new System.Windows.Forms.Label(); - this.LblFilename = new System.Windows.Forms.Label(); - this.TbFileName = new System.Windows.Forms.TextBox(); - this.PB = new LaserGRBL.UserControls.DoubleProgressBar(); - this.BtnOpen = new LaserGRBL.UserControls.ImageButton(); - this.BtnRunProgram = new LaserGRBL.UserControls.ImageButton(); - this.UDLoopCounter = new System.Windows.Forms.NumericUpDown(); - this.BtnAbortProgram = new LaserGRBL.UserControls.ImageButton(); - this.GBConnection = new System.Windows.Forms.Panel(); - this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); - this.LblEmulator = new System.Windows.Forms.Label(); - this.LblComPort = new System.Windows.Forms.Label(); - this.CBPort = new System.Windows.Forms.ComboBox(); - this.LblBaudRate = new System.Windows.Forms.Label(); - this.CBSpeed = new System.Windows.Forms.ComboBox(); - this.LblAddress = new System.Windows.Forms.Label(); - this.TxtAddress = new System.Windows.Forms.TextBox(); - this.TxtEmulator = new System.Windows.Forms.TextBox(); - this.BtnConnectDisconnect = new LaserGRBL.UserControls.ImageButton(); - this.TT = new System.Windows.Forms.ToolTip(this.components); - this.tableLayoutPanel1.SuspendLayout(); - this.GBCommands.SuspendLayout(); - this.tableLayoutPanel6.SuspendLayout(); - this.GBFile.SuspendLayout(); - this.tableLayoutPanel5.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.UDLoopCounter)).BeginInit(); - this.GBConnection.SuspendLayout(); - this.tableLayoutPanel4.SuspendLayout(); - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); - this.tableLayoutPanel1.Controls.Add(this.GBCommands, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.GBFile, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.GBConnection, 0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - // - // GBCommands - // - this.GBCommands.Controls.Add(this.tableLayoutPanel6); - resources.ApplyResources(this.GBCommands, "GBCommands"); - this.GBCommands.Name = "GBCommands"; - // - // tableLayoutPanel6 - // - resources.ApplyResources(this.tableLayoutPanel6, "tableLayoutPanel6"); - this.tableLayoutPanel6.Controls.Add(this.TxtManualCommand, 0, 0); - this.tableLayoutPanel6.Controls.Add(this.CmdLog, 0, 1); - this.tableLayoutPanel6.Name = "tableLayoutPanel6"; - // - // TxtManualCommand - // - resources.ApplyResources(this.TxtManualCommand, "TxtManualCommand"); - this.TxtManualCommand.Name = "TxtManualCommand"; - this.TxtManualCommand.WaterMarkActiveForeColor = System.Drawing.Color.Gray; - this.TxtManualCommand.WaterMarkFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.TxtManualCommand.WaterMarkForeColor = System.Drawing.Color.LightGray; - this.TxtManualCommand.CommandEntered += new LaserGRBL.UserControls.GrblTextBox.CommandEnteredDlg(this.TxtManualCommandCommandEntered); - this.TxtManualCommand.Enter += new System.EventHandler(this.TxtManualCommand_Enter); - this.TxtManualCommand.Leave += new System.EventHandler(this.TxtManualCommand_Leave); - // - // CmdLog - // - this.CmdLog.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - resources.ApplyResources(this.CmdLog, "CmdLog"); - this.CmdLog.Name = "CmdLog"; - this.CmdLog.TabStop = false; - // - // GBFile - // - resources.ApplyResources(this.GBFile, "GBFile"); - this.GBFile.Controls.Add(this.tableLayoutPanel5); - this.GBFile.Name = "GBFile"; - // - // tableLayoutPanel5 - // - resources.ApplyResources(this.tableLayoutPanel5, "tableLayoutPanel5"); - this.tableLayoutPanel5.Controls.Add(this.LblProgress, 0, 1); - this.tableLayoutPanel5.Controls.Add(this.LblFilename, 0, 0); - this.tableLayoutPanel5.Controls.Add(this.TbFileName, 1, 0); - this.tableLayoutPanel5.Controls.Add(this.PB, 1, 1); - this.tableLayoutPanel5.Controls.Add(this.BtnOpen, 3, 0); - this.tableLayoutPanel5.Controls.Add(this.BtnRunProgram, 3, 1); - this.tableLayoutPanel5.Controls.Add(this.UDLoopCounter, 2, 1); - this.tableLayoutPanel5.Controls.Add(this.BtnAbortProgram, 4, 1); - this.tableLayoutPanel5.Name = "tableLayoutPanel5"; - // - // LblProgress - // - resources.ApplyResources(this.LblProgress, "LblProgress"); - this.LblProgress.Name = "LblProgress"; - // - // LblFilename - // - resources.ApplyResources(this.LblFilename, "LblFilename"); - this.LblFilename.Name = "LblFilename"; - // - // TbFileName - // - this.tableLayoutPanel5.SetColumnSpan(this.TbFileName, 2); - resources.ApplyResources(this.TbFileName, "TbFileName"); - this.TbFileName.Name = "TbFileName"; - this.TbFileName.ReadOnly = true; - this.TbFileName.TabStop = false; - this.TbFileName.MouseEnter += new System.EventHandler(this.TbFileName_MouseEnter); - this.TbFileName.MouseLeave += new System.EventHandler(this.TbFileName_MouseLeave); - // - // PB - // - this.PB.BarColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.PB.BorderColor = System.Drawing.Color.Black; - resources.ApplyResources(this.PB, "PB"); - this.PB.DrawProgressString = true; - this.PB.FillColor = System.Drawing.Color.White; - this.PB.FillStyle = LaserGRBL.UserControls.FillStyles.Solid; - this.PB.ForeColor = System.Drawing.Color.Black; - this.PB.Maximum = 100D; - this.PB.Minimum = 0D; - this.PB.Name = "PB"; - this.PB.PercString = null; - this.PB.ProgressStringDecimals = 0; - this.PB.Reverse = false; - this.PB.Step = 10D; - this.PB.ThrowExceprion = false; - this.PB.Value = 0D; - // - // BtnOpen - // - this.BtnOpen.AltImage = null; - resources.ApplyResources(this.BtnOpen, "BtnOpen"); - this.BtnOpen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnOpen.Caption = null; - this.BtnOpen.Coloration = System.Drawing.Color.Empty; - this.tableLayoutPanel5.SetColumnSpan(this.BtnOpen, 2); - this.BtnOpen.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen.Image"))); - this.BtnOpen.Name = "BtnOpen"; - this.BtnOpen.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnOpen.TabStop = false; - this.TT.SetToolTip(this.BtnOpen, resources.GetString("BtnOpen.ToolTip")); - this.BtnOpen.UseAltImage = false; - this.BtnOpen.Click += new System.EventHandler(this.BtnOpenClick); - // - // BtnRunProgram - // - this.BtnRunProgram.AltImage = null; - resources.ApplyResources(this.BtnRunProgram, "BtnRunProgram"); - this.BtnRunProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnRunProgram.Caption = null; - this.BtnRunProgram.Coloration = System.Drawing.Color.Empty; - this.BtnRunProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnRunProgram.Image"))); - this.BtnRunProgram.Name = "BtnRunProgram"; - this.BtnRunProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnRunProgram.TabStop = false; - this.TT.SetToolTip(this.BtnRunProgram, resources.GetString("BtnRunProgram.ToolTip")); - this.BtnRunProgram.UseAltImage = false; - this.BtnRunProgram.Click += new System.EventHandler(this.BtnRunProgramClick); - // - // UDLoopCounter - // - resources.ApplyResources(this.UDLoopCounter, "UDLoopCounter"); - this.UDLoopCounter.Maximum = new decimal(new int[] { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConnectLogForm)); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.GBCommands = new System.Windows.Forms.Panel(); + this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); + this.TxtManualCommand = new LaserGRBL.UserControls.GrblTextBox(); + this.CmdLog = new LaserGRBL.UserControls.CommandLog(); + this.GBFile = new System.Windows.Forms.Panel(); + this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); + this.BtnFileAppend2 = new LaserGRBL.UserControls.ImageButton(); + this.BtnFileAppend1 = new LaserGRBL.UserControls.ImageButton(); + this.BtnFileAppend = new LaserGRBL.UserControls.ImageButton(); + this.chkFileEnable2 = new System.Windows.Forms.CheckBox(); + this.chkFileEnable1 = new System.Windows.Forms.CheckBox(); + this.UDLoopCounter2 = new System.Windows.Forms.NumericUpDown(); + this.UDLoopCounter1 = new System.Windows.Forms.NumericUpDown(); + this.btnFileSetup2 = new LaserGRBL.UserControls.ImageButton(); + this.btnFileSetup1 = new LaserGRBL.UserControls.ImageButton(); + this.btnFileSetup = new LaserGRBL.UserControls.ImageButton(); + this.BtnOpen2 = new LaserGRBL.UserControls.ImageButton(); + this.TbFileName2 = new System.Windows.Forms.TextBox(); + this.BtnOpen1 = new LaserGRBL.UserControls.ImageButton(); + this.TbFileName1 = new System.Windows.Forms.TextBox(); + this.LblFilename = new System.Windows.Forms.Label(); + this.TbFileName = new System.Windows.Forms.TextBox(); + this.PB = new LaserGRBL.UserControls.DoubleProgressBar(); + this.BtnOpen = new LaserGRBL.UserControls.ImageButton(); + this.LblFilename1 = new System.Windows.Forms.Label(); + this.UDLoopCounter = new System.Windows.Forms.NumericUpDown(); + this.BtnRunProgram = new LaserGRBL.UserControls.ImageButton(); + this.BtnAbortProgram = new LaserGRBL.UserControls.ImageButton(); + this.LblFilename2 = new System.Windows.Forms.Label(); + this.LblProgress = new System.Windows.Forms.Label(); + this.chkFileEnable = new System.Windows.Forms.CheckBox(); + this.GBConnection = new System.Windows.Forms.Panel(); + this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); + this.LblEmulator = new System.Windows.Forms.Label(); + this.LblComPort = new System.Windows.Forms.Label(); + this.CBPort = new System.Windows.Forms.ComboBox(); + this.LblBaudRate = new System.Windows.Forms.Label(); + this.CBSpeed = new System.Windows.Forms.ComboBox(); + this.LblAddress = new System.Windows.Forms.Label(); + this.TxtAddress = new System.Windows.Forms.TextBox(); + this.TxtEmulator = new System.Windows.Forms.TextBox(); + this.BtnConnectDisconnect = new LaserGRBL.UserControls.ImageButton(); + this.TT = new System.Windows.Forms.ToolTip(this.components); + this.tableLayoutPanel1.SuspendLayout(); + this.GBCommands.SuspendLayout(); + this.tableLayoutPanel6.SuspendLayout(); + this.GBFile.SuspendLayout(); + this.tableLayoutPanel5.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.UDLoopCounter2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.UDLoopCounter1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.UDLoopCounter)).BeginInit(); + this.GBConnection.SuspendLayout(); + this.tableLayoutPanel4.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); + this.tableLayoutPanel1.Controls.Add(this.GBCommands, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.GBFile, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.GBConnection, 0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + // + // GBCommands + // + this.GBCommands.Controls.Add(this.tableLayoutPanel6); + resources.ApplyResources(this.GBCommands, "GBCommands"); + this.GBCommands.Name = "GBCommands"; + // + // tableLayoutPanel6 + // + resources.ApplyResources(this.tableLayoutPanel6, "tableLayoutPanel6"); + this.tableLayoutPanel6.Controls.Add(this.TxtManualCommand, 0, 0); + this.tableLayoutPanel6.Controls.Add(this.CmdLog, 0, 1); + this.tableLayoutPanel6.Name = "tableLayoutPanel6"; + // + // TxtManualCommand + // + resources.ApplyResources(this.TxtManualCommand, "TxtManualCommand"); + this.TxtManualCommand.Name = "TxtManualCommand"; + this.TxtManualCommand.WaterMarkActiveForeColor = System.Drawing.Color.Gray; + this.TxtManualCommand.WaterMarkFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TxtManualCommand.WaterMarkForeColor = System.Drawing.Color.LightGray; + this.TxtManualCommand.CommandEntered += new LaserGRBL.UserControls.GrblTextBox.CommandEnteredDlg(this.TxtManualCommandCommandEntered); + this.TxtManualCommand.Enter += new System.EventHandler(this.TxtManualCommand_Enter); + this.TxtManualCommand.Leave += new System.EventHandler(this.TxtManualCommand_Leave); + // + // CmdLog + // + this.CmdLog.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + resources.ApplyResources(this.CmdLog, "CmdLog"); + this.CmdLog.Name = "CmdLog"; + this.CmdLog.TabStop = false; + // + // GBFile + // + resources.ApplyResources(this.GBFile, "GBFile"); + this.GBFile.Controls.Add(this.tableLayoutPanel5); + this.GBFile.Name = "GBFile"; + // + // tableLayoutPanel5 + // + resources.ApplyResources(this.tableLayoutPanel5, "tableLayoutPanel5"); + this.tableLayoutPanel5.Controls.Add(this.BtnFileAppend2, 3, 2); + this.tableLayoutPanel5.Controls.Add(this.BtnFileAppend1, 3, 1); + this.tableLayoutPanel5.Controls.Add(this.BtnFileAppend, 3, 0); + this.tableLayoutPanel5.Controls.Add(this.chkFileEnable2, 6, 2); + this.tableLayoutPanel5.Controls.Add(this.chkFileEnable1, 6, 1); + this.tableLayoutPanel5.Controls.Add(this.UDLoopCounter2, 5, 2); + this.tableLayoutPanel5.Controls.Add(this.UDLoopCounter1, 5, 1); + this.tableLayoutPanel5.Controls.Add(this.btnFileSetup2, 4, 2); + this.tableLayoutPanel5.Controls.Add(this.btnFileSetup1, 4, 1); + this.tableLayoutPanel5.Controls.Add(this.btnFileSetup, 4, 0); + this.tableLayoutPanel5.Controls.Add(this.BtnOpen2, 2, 2); + this.tableLayoutPanel5.Controls.Add(this.TbFileName2, 1, 2); + this.tableLayoutPanel5.Controls.Add(this.BtnOpen1, 2, 1); + this.tableLayoutPanel5.Controls.Add(this.TbFileName1, 1, 1); + this.tableLayoutPanel5.Controls.Add(this.LblFilename, 0, 0); + this.tableLayoutPanel5.Controls.Add(this.TbFileName, 1, 0); + this.tableLayoutPanel5.Controls.Add(this.PB, 1, 3); + this.tableLayoutPanel5.Controls.Add(this.BtnOpen, 2, 0); + this.tableLayoutPanel5.Controls.Add(this.LblFilename1, 0, 1); + this.tableLayoutPanel5.Controls.Add(this.UDLoopCounter, 5, 0); + this.tableLayoutPanel5.Controls.Add(this.BtnRunProgram, 5, 3); + this.tableLayoutPanel5.Controls.Add(this.BtnAbortProgram, 6, 3); + this.tableLayoutPanel5.Controls.Add(this.LblFilename2, 0, 2); + this.tableLayoutPanel5.Controls.Add(this.LblProgress, 0, 3); + this.tableLayoutPanel5.Controls.Add(this.chkFileEnable, 6, 0); + this.tableLayoutPanel5.Name = "tableLayoutPanel5"; + // + // BtnFileAppend2 + // + this.BtnFileAppend2.AltImage = null; + this.BtnFileAppend2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnFileAppend2.Caption = null; + this.BtnFileAppend2.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnFileAppend2, "BtnFileAppend2"); + this.BtnFileAppend2.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend2.Image"))); + this.BtnFileAppend2.Name = "BtnFileAppend2"; + this.BtnFileAppend2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnFileAppend2.TabStop = false; + this.TT.SetToolTip(this.BtnFileAppend2, resources.GetString("BtnFileAppend2.ToolTip")); + this.BtnFileAppend2.UseAltImage = false; + this.BtnFileAppend2.Click += new System.EventHandler(this.BtnFileAppend2_Click); + // + // BtnFileAppend1 + // + this.BtnFileAppend1.AltImage = null; + this.BtnFileAppend1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnFileAppend1.Caption = null; + this.BtnFileAppend1.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnFileAppend1, "BtnFileAppend1"); + this.BtnFileAppend1.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend1.Image"))); + this.BtnFileAppend1.Name = "BtnFileAppend1"; + this.BtnFileAppend1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnFileAppend1.TabStop = false; + this.TT.SetToolTip(this.BtnFileAppend1, resources.GetString("BtnFileAppend1.ToolTip")); + this.BtnFileAppend1.UseAltImage = false; + this.BtnFileAppend1.Click += new System.EventHandler(this.BtnFileAppend1_Click); + // + // BtnFileAppend + // + this.BtnFileAppend.AltImage = null; + this.BtnFileAppend.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnFileAppend.Caption = null; + this.BtnFileAppend.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnFileAppend, "BtnFileAppend"); + this.BtnFileAppend.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend.Image"))); + this.BtnFileAppend.Name = "BtnFileAppend"; + this.BtnFileAppend.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnFileAppend.TabStop = false; + this.TT.SetToolTip(this.BtnFileAppend, resources.GetString("BtnFileAppend.ToolTip")); + this.BtnFileAppend.UseAltImage = false; + this.BtnFileAppend.Click += new System.EventHandler(this.BtnFileAppend_Click); + // + // chkFileEnable2 + // + resources.ApplyResources(this.chkFileEnable2, "chkFileEnable2"); + this.chkFileEnable2.Checked = true; + this.chkFileEnable2.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkFileEnable2.Name = "chkFileEnable2"; + this.chkFileEnable2.UseVisualStyleBackColor = true; + this.chkFileEnable2.CheckedChanged += new System.EventHandler(this.chkFileEnable2_CheckedChanged); + // + // chkFileEnable1 + // + resources.ApplyResources(this.chkFileEnable1, "chkFileEnable1"); + this.chkFileEnable1.Checked = true; + this.chkFileEnable1.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkFileEnable1.Name = "chkFileEnable1"; + this.chkFileEnable1.UseVisualStyleBackColor = true; + this.chkFileEnable1.CheckedChanged += new System.EventHandler(this.chkFileEnable1_CheckedChanged); + // + // UDLoopCounter2 + // + resources.ApplyResources(this.UDLoopCounter2, "UDLoopCounter2"); + this.UDLoopCounter2.Maximum = new decimal(new int[] { 99, 0, 0, 0}); - this.UDLoopCounter.Minimum = new decimal(new int[] { + this.UDLoopCounter2.Minimum = new decimal(new int[] { 1, 0, 0, 0}); - this.UDLoopCounter.Name = "UDLoopCounter"; - this.TT.SetToolTip(this.UDLoopCounter, resources.GetString("UDLoopCounter.ToolTip")); - this.UDLoopCounter.Value = new decimal(new int[] { + this.UDLoopCounter2.Name = "UDLoopCounter2"; + this.TT.SetToolTip(this.UDLoopCounter2, resources.GetString("UDLoopCounter2.ToolTip")); + this.UDLoopCounter2.Value = new decimal(new int[] { 1, 0, 0, 0}); - this.UDLoopCounter.ValueChanged += new System.EventHandler(this.UDLoopCounter_ValueChanged); - // - // BtnAbortProgram - // - this.BtnAbortProgram.AltImage = null; - resources.ApplyResources(this.BtnAbortProgram, "BtnAbortProgram"); - this.BtnAbortProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnAbortProgram.Caption = null; - this.BtnAbortProgram.Coloration = System.Drawing.Color.Empty; - this.BtnAbortProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnAbortProgram.Image"))); - this.BtnAbortProgram.Name = "BtnAbortProgram"; - this.BtnAbortProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnAbortProgram.TabStop = false; - this.TT.SetToolTip(this.BtnAbortProgram, resources.GetString("BtnAbortProgram.ToolTip")); - this.BtnAbortProgram.UseAltImage = false; - this.BtnAbortProgram.Click += new System.EventHandler(this.BtnAbortProgram_Click); - // - // GBConnection - // - resources.ApplyResources(this.GBConnection, "GBConnection"); - this.GBConnection.Controls.Add(this.tableLayoutPanel4); - this.GBConnection.Name = "GBConnection"; - // - // tableLayoutPanel4 - // - resources.ApplyResources(this.tableLayoutPanel4, "tableLayoutPanel4"); - this.tableLayoutPanel4.Controls.Add(this.LblEmulator, 0, 2); - this.tableLayoutPanel4.Controls.Add(this.LblComPort, 0, 0); - this.tableLayoutPanel4.Controls.Add(this.CBPort, 1, 0); - this.tableLayoutPanel4.Controls.Add(this.LblBaudRate, 2, 0); - this.tableLayoutPanel4.Controls.Add(this.CBSpeed, 3, 0); - this.tableLayoutPanel4.Controls.Add(this.LblAddress, 0, 1); - this.tableLayoutPanel4.Controls.Add(this.TxtAddress, 1, 1); - this.tableLayoutPanel4.Controls.Add(this.TxtEmulator, 1, 2); - this.tableLayoutPanel4.Controls.Add(this.BtnConnectDisconnect, 4, 0); - this.tableLayoutPanel4.Name = "tableLayoutPanel4"; - // - // LblEmulator - // - resources.ApplyResources(this.LblEmulator, "LblEmulator"); - this.LblEmulator.Name = "LblEmulator"; - // - // LblComPort - // - resources.ApplyResources(this.LblComPort, "LblComPort"); - this.LblComPort.Name = "LblComPort"; - // - // CBPort - // - resources.ApplyResources(this.CBPort, "CBPort"); - this.CBPort.FormattingEnabled = true; - this.CBPort.Name = "CBPort"; - this.CBPort.SelectedIndexChanged += new System.EventHandler(this.CBPort_SelectedIndexChanged); - this.CBPort.TextChanged += new System.EventHandler(this.CBPort_TextChanged); - // - // LblBaudRate - // - resources.ApplyResources(this.LblBaudRate, "LblBaudRate"); - this.LblBaudRate.Name = "LblBaudRate"; - // - // CBSpeed - // - resources.ApplyResources(this.CBSpeed, "CBSpeed"); - this.CBSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CBSpeed.FormattingEnabled = true; - this.CBSpeed.Name = "CBSpeed"; - this.CBSpeed.SelectedIndexChanged += new System.EventHandler(this.CBSpeed_SelectedIndexChanged); - // - // LblAddress - // - resources.ApplyResources(this.LblAddress, "LblAddress"); - this.LblAddress.Name = "LblAddress"; - // - // TxtAddress - // - resources.ApplyResources(this.TxtAddress, "TxtAddress"); - this.TxtAddress.BackColor = System.Drawing.SystemColors.Control; - this.tableLayoutPanel4.SetColumnSpan(this.TxtAddress, 3); - this.TxtAddress.ForeColor = System.Drawing.SystemColors.ControlText; - this.TxtAddress.Name = "TxtAddress"; - this.TxtAddress.TextChanged += new System.EventHandler(this.TxtHostName_TextChanged); - // - // TxtEmulator - // - resources.ApplyResources(this.TxtEmulator, "TxtEmulator"); - this.tableLayoutPanel4.SetColumnSpan(this.TxtEmulator, 3); - this.TxtEmulator.Name = "TxtEmulator"; - // - // BtnConnectDisconnect - // - this.BtnConnectDisconnect.AltImage = ((System.Drawing.Image)(resources.GetObject("BtnConnectDisconnect.AltImage"))); - resources.ApplyResources(this.BtnConnectDisconnect, "BtnConnectDisconnect"); - this.BtnConnectDisconnect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnConnectDisconnect.Caption = null; - this.BtnConnectDisconnect.Coloration = System.Drawing.Color.Empty; - this.BtnConnectDisconnect.Image = ((System.Drawing.Image)(resources.GetObject("BtnConnectDisconnect.Image"))); - this.BtnConnectDisconnect.Name = "BtnConnectDisconnect"; - this.tableLayoutPanel4.SetRowSpan(this.BtnConnectDisconnect, 3); - this.BtnConnectDisconnect.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.StretchImage; - this.BtnConnectDisconnect.TabStop = false; - this.TT.SetToolTip(this.BtnConnectDisconnect, resources.GetString("BtnConnectDisconnect.ToolTip")); - this.BtnConnectDisconnect.UseAltImage = false; - this.BtnConnectDisconnect.Click += new System.EventHandler(this.BtnConnectDisconnectClick); - // - // ConnectLogForm - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tableLayoutPanel1); - this.Name = "ConnectLogForm"; - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.GBCommands.ResumeLayout(false); - this.tableLayoutPanel6.ResumeLayout(false); - this.tableLayoutPanel6.PerformLayout(); - this.GBFile.ResumeLayout(false); - this.GBFile.PerformLayout(); - this.tableLayoutPanel5.ResumeLayout(false); - this.tableLayoutPanel5.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.UDLoopCounter)).EndInit(); - this.GBConnection.ResumeLayout(false); - this.GBConnection.PerformLayout(); - this.tableLayoutPanel4.ResumeLayout(false); - this.tableLayoutPanel4.PerformLayout(); - this.ResumeLayout(false); + this.UDLoopCounter2.ValueChanged += new System.EventHandler(this.UDLoopCounter2_ValueChanged); + // + // UDLoopCounter1 + // + resources.ApplyResources(this.UDLoopCounter1, "UDLoopCounter1"); + this.UDLoopCounter1.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.UDLoopCounter1.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.UDLoopCounter1.Name = "UDLoopCounter1"; + this.TT.SetToolTip(this.UDLoopCounter1, resources.GetString("UDLoopCounter1.ToolTip")); + this.UDLoopCounter1.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.UDLoopCounter1.ValueChanged += new System.EventHandler(this.UDLoopCounter1_ValueChanged); + // + // btnFileSetup2 + // + this.btnFileSetup2.AltImage = null; + this.btnFileSetup2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnFileSetup2.Caption = null; + this.btnFileSetup2.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.btnFileSetup2, "btnFileSetup2"); + this.btnFileSetup2.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup2.Image"))); + this.btnFileSetup2.Name = "btnFileSetup2"; + this.btnFileSetup2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.btnFileSetup2.TabStop = false; + this.TT.SetToolTip(this.btnFileSetup2, resources.GetString("btnFileSetup2.ToolTip")); + this.btnFileSetup2.UseAltImage = false; + this.btnFileSetup2.Click += new System.EventHandler(this.BtnReOpen2_Click); + // + // btnFileSetup1 + // + this.btnFileSetup1.AltImage = null; + this.btnFileSetup1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnFileSetup1.Caption = null; + this.btnFileSetup1.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.btnFileSetup1, "btnFileSetup1"); + this.btnFileSetup1.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup1.Image"))); + this.btnFileSetup1.Name = "btnFileSetup1"; + this.btnFileSetup1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.btnFileSetup1.TabStop = false; + this.TT.SetToolTip(this.btnFileSetup1, resources.GetString("btnFileSetup1.ToolTip")); + this.btnFileSetup1.UseAltImage = false; + this.btnFileSetup1.Click += new System.EventHandler(this.BtnReOpen1_Click); + // + // btnFileSetup + // + this.btnFileSetup.AltImage = null; + this.btnFileSetup.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnFileSetup.Caption = null; + this.btnFileSetup.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.btnFileSetup, "btnFileSetup"); + this.btnFileSetup.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup.Image"))); + this.btnFileSetup.Name = "btnFileSetup"; + this.btnFileSetup.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.btnFileSetup.TabStop = false; + this.TT.SetToolTip(this.btnFileSetup, resources.GetString("btnFileSetup.ToolTip")); + this.btnFileSetup.UseAltImage = false; + this.btnFileSetup.Click += new System.EventHandler(this.BtnReOpenClick); + // + // BtnOpen2 + // + this.BtnOpen2.AltImage = null; + this.BtnOpen2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOpen2.Caption = null; + this.BtnOpen2.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnOpen2, "BtnOpen2"); + this.BtnOpen2.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen2.Image"))); + this.BtnOpen2.Name = "BtnOpen2"; + this.BtnOpen2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnOpen2.TabStop = false; + this.TT.SetToolTip(this.BtnOpen2, resources.GetString("BtnOpen2.ToolTip")); + this.BtnOpen2.UseAltImage = false; + this.BtnOpen2.Click += new System.EventHandler(this.BtnOpen2_Click); + // + // TbFileName2 + // + resources.ApplyResources(this.TbFileName2, "TbFileName2"); + this.TbFileName2.Name = "TbFileName2"; + this.TbFileName2.ReadOnly = true; + this.TbFileName2.TabStop = false; + this.TbFileName2.MouseEnter += new System.EventHandler(this.TbFileName2_MouseEnter); + this.TbFileName2.MouseLeave += new System.EventHandler(this.TbFileName2_MouseLeave); + // + // BtnOpen1 + // + this.BtnOpen1.AltImage = null; + this.BtnOpen1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOpen1.Caption = null; + this.BtnOpen1.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnOpen1, "BtnOpen1"); + this.BtnOpen1.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen1.Image"))); + this.BtnOpen1.Name = "BtnOpen1"; + this.BtnOpen1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnOpen1.TabStop = false; + this.TT.SetToolTip(this.BtnOpen1, resources.GetString("BtnOpen1.ToolTip")); + this.BtnOpen1.UseAltImage = false; + this.BtnOpen1.Click += new System.EventHandler(this.BtnOpen1_Click); + // + // TbFileName1 + // + resources.ApplyResources(this.TbFileName1, "TbFileName1"); + this.TbFileName1.Name = "TbFileName1"; + this.TbFileName1.ReadOnly = true; + this.TbFileName1.TabStop = false; + this.TbFileName1.MouseEnter += new System.EventHandler(this.TbFileName1_MouseEnter); + this.TbFileName1.MouseLeave += new System.EventHandler(this.TbFileName1_MouseLeave); + // + // LblFilename + // + resources.ApplyResources(this.LblFilename, "LblFilename"); + this.LblFilename.Name = "LblFilename"; + // + // TbFileName + // + resources.ApplyResources(this.TbFileName, "TbFileName"); + this.TbFileName.Name = "TbFileName"; + this.TbFileName.ReadOnly = true; + this.TbFileName.TabStop = false; + this.TbFileName.MouseEnter += new System.EventHandler(this.TbFileName_MouseEnter); + this.TbFileName.MouseLeave += new System.EventHandler(this.TbFileName_MouseLeave); + // + // PB + // + this.PB.BarColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); + this.PB.BorderColor = System.Drawing.Color.Black; + this.tableLayoutPanel5.SetColumnSpan(this.PB, 4); + resources.ApplyResources(this.PB, "PB"); + this.PB.DrawProgressString = true; + this.PB.FillColor = System.Drawing.Color.White; + this.PB.FillStyle = LaserGRBL.UserControls.FillStyles.Solid; + this.PB.ForeColor = System.Drawing.Color.Black; + this.PB.Maximum = 100D; + this.PB.Minimum = 0D; + this.PB.Name = "PB"; + this.PB.PercString = null; + this.PB.ProgressStringDecimals = 0; + this.PB.Reverse = false; + this.PB.Step = 10D; + this.PB.ThrowExceprion = false; + this.PB.Value = 0D; + this.PB.Load += new System.EventHandler(this.PB_Load); + // + // BtnOpen + // + this.BtnOpen.AltImage = null; + this.BtnOpen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOpen.Caption = null; + this.BtnOpen.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnOpen, "BtnOpen"); + this.BtnOpen.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen.Image"))); + this.BtnOpen.Name = "BtnOpen"; + this.BtnOpen.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnOpen.TabStop = false; + this.TT.SetToolTip(this.BtnOpen, resources.GetString("BtnOpen.ToolTip")); + this.BtnOpen.UseAltImage = false; + this.BtnOpen.Click += new System.EventHandler(this.BtnOpenClick); + // + // LblFilename1 + // + resources.ApplyResources(this.LblFilename1, "LblFilename1"); + this.LblFilename1.Name = "LblFilename1"; + // + // UDLoopCounter + // + resources.ApplyResources(this.UDLoopCounter, "UDLoopCounter"); + this.UDLoopCounter.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.UDLoopCounter.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.UDLoopCounter.Name = "UDLoopCounter"; + this.TT.SetToolTip(this.UDLoopCounter, resources.GetString("UDLoopCounter.ToolTip")); + this.UDLoopCounter.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.UDLoopCounter.ValueChanged += new System.EventHandler(this.UDLoopCounter_ValueChanged); + // + // BtnRunProgram + // + this.BtnRunProgram.AltImage = null; + this.BtnRunProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnRunProgram.Caption = null; + this.BtnRunProgram.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnRunProgram, "BtnRunProgram"); + this.BtnRunProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnRunProgram.Image"))); + this.BtnRunProgram.Name = "BtnRunProgram"; + this.BtnRunProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnRunProgram.TabStop = false; + this.TT.SetToolTip(this.BtnRunProgram, resources.GetString("BtnRunProgram.ToolTip")); + this.BtnRunProgram.UseAltImage = false; + this.BtnRunProgram.Click += new System.EventHandler(this.BtnRunProgramClick); + // + // BtnAbortProgram + // + this.BtnAbortProgram.AltImage = null; + resources.ApplyResources(this.BtnAbortProgram, "BtnAbortProgram"); + this.BtnAbortProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnAbortProgram.Caption = null; + this.BtnAbortProgram.Coloration = System.Drawing.Color.Empty; + this.BtnAbortProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnAbortProgram.Image"))); + this.BtnAbortProgram.Name = "BtnAbortProgram"; + this.BtnAbortProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnAbortProgram.TabStop = false; + this.TT.SetToolTip(this.BtnAbortProgram, resources.GetString("BtnAbortProgram.ToolTip")); + this.BtnAbortProgram.UseAltImage = false; + this.BtnAbortProgram.Click += new System.EventHandler(this.BtnAbortProgram_Click); + // + // LblFilename2 + // + resources.ApplyResources(this.LblFilename2, "LblFilename2"); + this.LblFilename2.Name = "LblFilename2"; + // + // LblProgress + // + resources.ApplyResources(this.LblProgress, "LblProgress"); + this.LblProgress.Name = "LblProgress"; + // + // chkFileEnable + // + resources.ApplyResources(this.chkFileEnable, "chkFileEnable"); + this.chkFileEnable.Checked = true; + this.chkFileEnable.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkFileEnable.Name = "chkFileEnable"; + this.chkFileEnable.UseVisualStyleBackColor = true; + this.chkFileEnable.CheckedChanged += new System.EventHandler(this.chkFileEnable_CheckedChanged); + // + // GBConnection + // + resources.ApplyResources(this.GBConnection, "GBConnection"); + this.GBConnection.Controls.Add(this.tableLayoutPanel4); + this.GBConnection.Name = "GBConnection"; + // + // tableLayoutPanel4 + // + resources.ApplyResources(this.tableLayoutPanel4, "tableLayoutPanel4"); + this.tableLayoutPanel4.Controls.Add(this.LblEmulator, 0, 2); + this.tableLayoutPanel4.Controls.Add(this.LblComPort, 0, 0); + this.tableLayoutPanel4.Controls.Add(this.CBPort, 1, 0); + this.tableLayoutPanel4.Controls.Add(this.LblBaudRate, 2, 0); + this.tableLayoutPanel4.Controls.Add(this.CBSpeed, 3, 0); + this.tableLayoutPanel4.Controls.Add(this.LblAddress, 0, 1); + this.tableLayoutPanel4.Controls.Add(this.TxtAddress, 1, 1); + this.tableLayoutPanel4.Controls.Add(this.TxtEmulator, 1, 2); + this.tableLayoutPanel4.Controls.Add(this.BtnConnectDisconnect, 4, 0); + this.tableLayoutPanel4.Name = "tableLayoutPanel4"; + // + // LblEmulator + // + resources.ApplyResources(this.LblEmulator, "LblEmulator"); + this.LblEmulator.Name = "LblEmulator"; + // + // LblComPort + // + resources.ApplyResources(this.LblComPort, "LblComPort"); + this.LblComPort.Name = "LblComPort"; + // + // CBPort + // + resources.ApplyResources(this.CBPort, "CBPort"); + this.CBPort.FormattingEnabled = true; + this.CBPort.Name = "CBPort"; + this.CBPort.SelectedIndexChanged += new System.EventHandler(this.CBPort_SelectedIndexChanged); + this.CBPort.TextChanged += new System.EventHandler(this.CBPort_TextChanged); + // + // LblBaudRate + // + resources.ApplyResources(this.LblBaudRate, "LblBaudRate"); + this.LblBaudRate.Name = "LblBaudRate"; + // + // CBSpeed + // + resources.ApplyResources(this.CBSpeed, "CBSpeed"); + this.CBSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CBSpeed.FormattingEnabled = true; + this.CBSpeed.Name = "CBSpeed"; + this.CBSpeed.SelectedIndexChanged += new System.EventHandler(this.CBSpeed_SelectedIndexChanged); + // + // LblAddress + // + resources.ApplyResources(this.LblAddress, "LblAddress"); + this.LblAddress.Name = "LblAddress"; + // + // TxtAddress + // + resources.ApplyResources(this.TxtAddress, "TxtAddress"); + this.TxtAddress.BackColor = System.Drawing.SystemColors.Control; + this.tableLayoutPanel4.SetColumnSpan(this.TxtAddress, 3); + this.TxtAddress.ForeColor = System.Drawing.SystemColors.ControlText; + this.TxtAddress.Name = "TxtAddress"; + this.TxtAddress.TextChanged += new System.EventHandler(this.TxtHostName_TextChanged); + // + // TxtEmulator + // + resources.ApplyResources(this.TxtEmulator, "TxtEmulator"); + this.tableLayoutPanel4.SetColumnSpan(this.TxtEmulator, 3); + this.TxtEmulator.Name = "TxtEmulator"; + // + // BtnConnectDisconnect + // + this.BtnConnectDisconnect.AltImage = ((System.Drawing.Image)(resources.GetObject("BtnConnectDisconnect.AltImage"))); + resources.ApplyResources(this.BtnConnectDisconnect, "BtnConnectDisconnect"); + this.BtnConnectDisconnect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnConnectDisconnect.Caption = null; + this.BtnConnectDisconnect.Coloration = System.Drawing.Color.Empty; + this.BtnConnectDisconnect.Image = ((System.Drawing.Image)(resources.GetObject("BtnConnectDisconnect.Image"))); + this.BtnConnectDisconnect.Name = "BtnConnectDisconnect"; + this.tableLayoutPanel4.SetRowSpan(this.BtnConnectDisconnect, 3); + this.BtnConnectDisconnect.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.StretchImage; + this.BtnConnectDisconnect.TabStop = false; + this.TT.SetToolTip(this.BtnConnectDisconnect, resources.GetString("BtnConnectDisconnect.ToolTip")); + this.BtnConnectDisconnect.UseAltImage = false; + this.BtnConnectDisconnect.Click += new System.EventHandler(this.BtnConnectDisconnectClick); + // + // ConnectLogForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tableLayoutPanel1); + this.Name = "ConnectLogForm"; + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.GBCommands.ResumeLayout(false); + this.tableLayoutPanel6.ResumeLayout(false); + this.tableLayoutPanel6.PerformLayout(); + this.GBFile.ResumeLayout(false); + this.GBFile.PerformLayout(); + this.tableLayoutPanel5.ResumeLayout(false); + this.tableLayoutPanel5.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.UDLoopCounter2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.UDLoopCounter1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.UDLoopCounter)).EndInit(); + this.GBConnection.ResumeLayout(false); + this.GBConnection.PerformLayout(); + this.tableLayoutPanel4.ResumeLayout(false); + this.tableLayoutPanel4.PerformLayout(); + this.ResumeLayout(false); } @@ -378,5 +635,22 @@ private void InitializeComponent() private System.Windows.Forms.Label LblEmulator; private System.Windows.Forms.TextBox TxtEmulator; private UserControls.ImageButton BtnAbortProgram; + private System.Windows.Forms.Label LblFilename1; + private UserControls.ImageButton BtnOpen1; + private System.Windows.Forms.TextBox TbFileName1; + private UserControls.ImageButton btnFileSetup2; + private UserControls.ImageButton btnFileSetup1; + private UserControls.ImageButton btnFileSetup; + private UserControls.ImageButton BtnOpen2; + private System.Windows.Forms.TextBox TbFileName2; + private System.Windows.Forms.Label LblFilename2; + private System.Windows.Forms.CheckBox chkFileEnable2; + private System.Windows.Forms.CheckBox chkFileEnable1; + private System.Windows.Forms.NumericUpDown UDLoopCounter2; + private System.Windows.Forms.NumericUpDown UDLoopCounter1; + private System.Windows.Forms.CheckBox chkFileEnable; + private UserControls.ImageButton BtnFileAppend; + private UserControls.ImageButton BtnFileAppend2; + private UserControls.ImageButton BtnFileAppend1; } } diff --git a/LaserGRBL/ConnectLogForm.cs b/LaserGRBL/ConnectLogForm.cs index b00898c00..770221893 100644 --- a/LaserGRBL/ConnectLogForm.cs +++ b/LaserGRBL/ConnectLogForm.cs @@ -19,7 +19,8 @@ public partial class ConnectLogForm : System.Windows.Forms.UserControl public ComWrapper.WrapperType currentWrapper; GrblCore Core; - private string mLoadedFileName; + GrblFile File; + private string[] mLoadedFileName = new string[3]; public ConnectLogForm() { @@ -31,7 +32,7 @@ public void SetCore(GrblCore core) { Core = core; Core.OnFileLoaded += OnFileLoaded; - Core.OnLoopCountChange += OnLoopCountChanged; + core.OnLoopCountChange += OnLoopCountChanged; CmdLog.SetCom(core); @@ -46,16 +47,17 @@ public void SetCore(GrblCore core) TimerUpdate(); } - void OnLoopCountChanged(decimal current) + void OnLoopCountChanged(decimal current, int nLayer) { if (InvokeRequired) { - Invoke(new GrblCore.dlgOnLoopCountChange(OnLoopCountChanged), current); + Invoke(new GrblCore.dlgOnLoopCountChange(OnLoopCountChanged), current, nLayer); } else { - if (UDLoopCounter.Value != current) - UDLoopCounter.Value = current; + if (nLayer == 0) if (UDLoopCounter.Value != current) UDLoopCounter.Value = current; + if (nLayer == 1) if (UDLoopCounter1.Value != current) UDLoopCounter1.Value = current; + if (nLayer == 2) if (UDLoopCounter2.Value != current) UDLoopCounter2.Value = current; } } @@ -69,16 +71,18 @@ private void RestoreConf() TxtAddress.Text = Settings.GetObject("Websocket URL", "ws://127.0.0.1:81/"); } - void OnFileLoaded(long elapsed, string filename) + void OnFileLoaded(long elapsed, string filename, int nLayer) { if (InvokeRequired) { - Invoke(new GrblFile.OnFileLoadedDlg(OnFileLoaded), elapsed, filename); + Invoke(new GrblFile.OnFileLoadedDlg(OnFileLoaded), elapsed, filename, nLayer); } else { - mLoadedFileName = filename; - TbFileName.Text = System.IO.Path.GetFileName(filename); + mLoadedFileName[nLayer] = filename; + if (nLayer == 0) TbFileName.Text = System.IO.Path.GetFileName(filename); + if (nLayer == 1) TbFileName1.Text = System.IO.Path.GetFileName(filename); + if (nLayer == 2) TbFileName2.Text = System.IO.Path.GetFileName(filename); } } @@ -194,6 +198,7 @@ void ApplyConfig() void BtnOpenClick(object sender, EventArgs e) { + Tools.Project.ClearSettings(0); Core.OpenFile(ParentForm); } @@ -329,7 +334,7 @@ private void ITcpPort_CurrentValueChanged(object sender, int NewValue, bool ByUs private void UDLoopCounter_ValueChanged(object sender, EventArgs e) { - Core.LoopCount = UDLoopCounter.Value; + Core.LoopCount(0, UDLoopCounter.Value); } internal void OnColorChange() @@ -350,15 +355,36 @@ private void TxtManualCommand_Leave(object sender, EventArgs e) private void TbFileName_MouseEnter(object sender, EventArgs e) { if (mLoadedFileName != null) - TT.Show(mLoadedFileName, TbFileName, 5000); + TT.Show(mLoadedFileName[0], TbFileName, 5000); } private void TbFileName_MouseLeave(object sender, EventArgs e) { TT.Hide(TbFileName); } + private void TbFileName1_MouseEnter(object sender, EventArgs e) + { + if (mLoadedFileName != null) + TT.Show(mLoadedFileName[1], TbFileName, 5000); + } + + private void TbFileName1_MouseLeave(object sender, EventArgs e) + { + TT.Hide(TbFileName); + } + + private void TbFileName2_MouseEnter(object sender, EventArgs e) + { + if (mLoadedFileName != null) + TT.Show(mLoadedFileName[2], TbFileName, 5000); + } + + private void TbFileName2_MouseLeave(object sender, EventArgs e) + { + TT.Hide(TbFileName); + } - private void BtnAbortProgram_Click(object sender, EventArgs e) + private void BtnAbortProgram_Click(object sender, EventArgs e) { if (MessageBox.Show(Strings.BoxAbortProgramConfirm, Strings.WarnMessageBoxHeader, MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes) Core.AbortProgram(); @@ -375,5 +401,79 @@ internal void ConfigFromDiscovery(string config) BtnConnectDisconnectClick(null, null); } } - } + + private void PB_Load(object sender, EventArgs e) + { + + } + + private void BtnOpen1_Click(object sender, EventArgs e) + { + Tools.Project.ClearSettings(1); + Core.OpenFile(ParentForm, nLayer: 1); + } + private void BtnOpen2_Click(object sender, EventArgs e) + { + Tools.Project.ClearSettings(2); + Core.OpenFile(ParentForm, nLayer: 2); + } + + private void BtnReOpenClick(object sender, EventArgs e) + { + Tools.Project.ClearSettings(0); + Core.ReOpenFile(ParentForm, 0); + } + + private void BtnReOpen1_Click(object sender, EventArgs e) + { + Tools.Project.ClearSettings(1); + Core.ReOpenFile(ParentForm, 1); + } + + private void BtnReOpen2_Click(object sender, EventArgs e) + { + Tools.Project.ClearSettings(2); + Core.ReOpenFile(ParentForm, 2); + } + + private void UDLoopCounter1_ValueChanged(object sender, EventArgs e) + { + Core.LoopCount(1, UDLoopCounter1.Value); + } + + private void UDLoopCounter2_ValueChanged(object sender, EventArgs e) + { + Core.LoopCount(2, UDLoopCounter2.Value); + } + + private void BtnFileAppend_Click(object sender, EventArgs e) + { + Core.OpenFile(ParentForm, null, true); + } + + private void BtnFileAppend1_Click(object sender, EventArgs e) + { + Core.OpenFile(ParentForm, null, true, 1); + } + + private void BtnFileAppend2_Click(object sender, EventArgs e) + { + Core.OpenFile(ParentForm, null, true, 2); + } + + private void chkFileEnable_CheckedChanged(object sender, EventArgs e) + { + Core.LayerEnabled(0, chkFileEnable.Checked); + } + + private void chkFileEnable1_CheckedChanged(object sender, EventArgs e) + { + Core.LayerEnabled(1, chkFileEnable1.Checked); + } + + private void chkFileEnable2_CheckedChanged(object sender, EventArgs e) + { + Core.LayerEnabled(2, chkFileEnable2.Checked); + } + } } diff --git a/LaserGRBL/ConnectLogForm.it.resx b/LaserGRBL/ConnectLogForm.it.resx index 0c2e23973..b8f3de331 100644 --- a/LaserGRBL/ConnectLogForm.it.resx +++ b/LaserGRBL/ConnectLogForm.it.resx @@ -112,12 +112,12 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 281, 255 @@ -146,7 +146,7 @@ 62, 13 - File + File (Engrave) 23, 13 @@ -169,7 +169,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAJxAIA3kywAAACBjSFJNAABu - lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsSAAALEgHS3X78AAADQElE + lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsOAAALDgFAvuFBAAADQElE QVQ4T3WTW0hTcRzHf12o16KnLrq5s013ph4921ymS/M6yyyzmuKclaJGN1pE2kP1UBRdhS4kUVBgF4LC ktIkIy1tF1dTj7u5uemmWallZhbhr7NZRkkPXw7n4fPhx//3/YFMIgOlMgMyM9fBlsKtUFpSCkmrkkAR p4AYaQzIZXKIjqIhRiafX1RUrBSLyNn8EB4ICX4g/xXExcYBzYJSWgpUBDX3/PmLJ0dGPn3PydmUGLR4 @@ -196,7 +196,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAK - 7wAACu8BfXaKSAAAAAd0SU1FB9MCGhU2KcxZSDgAAAIpSURBVDhPtdJfSNNRFAfws5L+DNrcJkGEL0aK + 6wAACusBgosNWgAAAAd0SU1FB9MCGhU2KcxZSDgAAAIpSURBVDhPtdJfSNNRFAfws5L+DNrcJkGEL0aK abq2oZWUhRGVYFbDCh3OzOafbWxuWi1nrnItM5FNiAZR9JAvBZHpcoqxFKc2beiwKUQvSUlP0mQv5bcf cmEIYj7U5/Ge873ncLn075SSPuVm8gJVUIA0lMNO109ojJ+f/DaOzo9PIL239zd3iZvqSczKf5dgSlh4 GXqOtsE7aBlqQPkLJfi1W77TNSphLWsT1YoWnk50oLHfAOPbUtR4lNB485HhSlwiM/XRbdrNWlcnNsX/ @@ -221,7 +221,7 @@ 178, 21 - + Left, Right @@ -418,4 +418,10 @@ scrivi gcode + + File 2 (Raster) + + + File 3 (Cut) + \ No newline at end of file diff --git a/LaserGRBL/ConnectLogForm.resx b/LaserGRBL/ConnectLogForm.resx index 27046f29d..5903164dc 100644 --- a/LaserGRBL/ConnectLogForm.resx +++ b/LaserGRBL/ConnectLogForm.resx @@ -112,23 +112,23 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 1 1 - + Fill - + Consolas, 9pt @@ -139,7 +139,7 @@ 1, 1, 1, 0 - 243, 22 + 346, 22 9 @@ -151,7 +151,7 @@ TxtManualCommand - LaserGRBL.UserControls.GrblTextBox, LaserGRBL, Version=3.7.3.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.GrblTextBox, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel6 @@ -169,7 +169,7 @@ 3, 26 - 239, 320 + 342, 284 5 @@ -178,7 +178,7 @@ CmdLog - LaserGRBL.UserControls.CommandLog, LaserGRBL, Version=3.7.3.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.CommandLog, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel6 @@ -196,7 +196,7 @@ 2 - 245, 349 + 348, 313 0 @@ -205,7 +205,7 @@ tableLayoutPanel6 - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 GBCommands @@ -220,13 +220,13 @@ Fill - 1, 118 + 1, 154 1, 1, 1, 1 - 245, 349 + 348, 313 2 @@ -235,7 +235,7 @@ GBCommands - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -256,43 +256,550 @@ GrowAndShrink - 5 + 7 - - Left + + Fill - + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAhRJREFUOE+Vkd1LU3Ech/0zuugFuiiwLioKggJHrRdNs4RGJGESvVCoSMpiy8DC + AimcFVHILhKiC4OoTLc5pzu5l7NzPLWdLc/cm+CEZYFWXnXR09kUUirYPvCD783zfF9+ZaVEVVVWytLj + 8/lZWPhGNBotTTKQeMF5j4kmfwONztMMex2lCaxOM/fnrmH7epWjgzuJpGIoilKcZFQc5ea4hYdf2nmw + eI6qt7sZjwm8Ghv6tyAWiyGMjaFGVGqHDtIkn+Vi0KQLWrmTM9EoVnBq2EjlwC6O2Q1rJZoWJywFmUvF + mfooc0Gs4+WvW/QttXA3V491ppobM1Xcnq2lOWLA+HjLH0E6nUYRA2S0qA5PEpFEjrv30ZGpo1U7jCVT + hTl5iMsf9tMQ2MNJ13b22rYuC1KpFOqkxGxSK8CqHEKRJbpGO7EOm6l5foQ2rVoXGKno30SzeR1nuivp + dfcuC/Ld3S4X4nsvWlhBCfpJTCcK75N+k453nZi1Gq4nD2C0b6S/x0IqnVm7fzabRZYVpFAIz4gTSQwR + 1zQisWksA216580Ynm1gR/d6vNLEWjgfURTJfZ7n+48lwvoPOF0jhKMasi6csp1gvqucNz0thPQmK8jf + mdZHFgShIJpKpJnQ68TTehbvbcPVe4UJf/D/8Orkp/EG9GM6+vj5qBzfk0t4BV9x8Oo4Bl8j2NvxeMZL + h4tPWdlv9WyFjnbnj1gAAAAASUVORK5CYII= + + + + 250, 45 + + + 1, 1, 1, 1 + + + 17, 18 + + + 27 + + + 17, 17 + + + Append File + + + BtnFileAppend2 + + + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel5 + + + 0 + + + Fill + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAhRJREFUOE+Vkd1LU3Ech/0zuugFuiiwLioKggJHrRdNs4RGJGESvVCoSMpiy8DC + AimcFVHILhKiC4OoTLc5pzu5l7NzPLWdLc/cm+CEZYFWXnXR09kUUirYPvCD783zfF9+ZaVEVVVWytLj + 8/lZWPhGNBotTTKQeMF5j4kmfwONztMMex2lCaxOM/fnrmH7epWjgzuJpGIoilKcZFQc5ea4hYdf2nmw + eI6qt7sZjwm8Ghv6tyAWiyGMjaFGVGqHDtIkn+Vi0KQLWrmTM9EoVnBq2EjlwC6O2Q1rJZoWJywFmUvF + mfooc0Gs4+WvW/QttXA3V491ppobM1Xcnq2lOWLA+HjLH0E6nUYRA2S0qA5PEpFEjrv30ZGpo1U7jCVT + hTl5iMsf9tMQ2MNJ13b22rYuC1KpFOqkxGxSK8CqHEKRJbpGO7EOm6l5foQ2rVoXGKno30SzeR1nuivp + dfcuC/Ld3S4X4nsvWlhBCfpJTCcK75N+k453nZi1Gq4nD2C0b6S/x0IqnVm7fzabRZYVpFAIz4gTSQwR + 1zQisWksA216580Ynm1gR/d6vNLEWjgfURTJfZ7n+48lwvoPOF0jhKMasi6csp1gvqucNz0thPQmK8jf + mdZHFgShIJpKpJnQ68TTehbvbcPVe4UJf/D/8Orkp/EG9GM6+vj5qBzfk0t4BV9x8Oo4Bl8j2NvxeMZL + h4tPWdlv9WyFjnbnj1gAAAAASUVORK5CYII= + + + + 250, 23 + + + 1, 1, 1, 1 + + + 17, 20 + + + 26 + + + Append File + + + BtnFileAppend1 + + + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel5 + + + 1 + + + Fill + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAhRJREFUOE+Vkd1LU3Ech/0zuugFuiiwLioKggJHrRdNs4RGJGESvVCoSMpiy8DC + AimcFVHILhKiC4OoTLc5pzu5l7NzPLWdLc/cm+CEZYFWXnXR09kUUirYPvCD783zfF9+ZaVEVVVWytLj + 8/lZWPhGNBotTTKQeMF5j4kmfwONztMMex2lCaxOM/fnrmH7epWjgzuJpGIoilKcZFQc5ea4hYdf2nmw + eI6qt7sZjwm8Ghv6tyAWiyGMjaFGVGqHDtIkn+Vi0KQLWrmTM9EoVnBq2EjlwC6O2Q1rJZoWJywFmUvF + mfooc0Gs4+WvW/QttXA3V491ppobM1Xcnq2lOWLA+HjLH0E6nUYRA2S0qA5PEpFEjrv30ZGpo1U7jCVT + hTl5iMsf9tMQ2MNJ13b22rYuC1KpFOqkxGxSK8CqHEKRJbpGO7EOm6l5foQ2rVoXGKno30SzeR1nuivp + dfcuC/Ld3S4X4nsvWlhBCfpJTCcK75N+k453nZi1Gq4nD2C0b6S/x0IqnVm7fzabRZYVpFAIz4gTSQwR + 1zQisWksA216580Ynm1gR/d6vNLEWjgfURTJfZ7n+48lwvoPOF0jhKMasi6csp1gvqucNz0thPQmK8jf + mdZHFgShIJpKpJnQ68TTehbvbcPVe4UJf/D/8Orkp/EG9GM6+vj5qBzfk0t4BV9x8Oo4Bl8j2NvxeMZL + h4tPWdlv9WyFjnbnj1gAAAAASUVORK5CYII= + + + + 250, 1 + + + 1, 1, 1, 1 + + + 17, 20 + + + 25 + + + Append File + + + BtnFileAppend + + + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel5 + + + 2 + + True - + + Fill + + NoControl - - 1, 28 + + 330, 47 - + + 15, 14 + + + 24 + + + chkFileEnable2 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 3 + + + True + + + Fill + + + NoControl + + + 330, 25 + + + 15, 16 + + + 23 + + + chkFileEnable1 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 4 + + + Fill + + + 288, 45 + + 1, 1, 1, 1 - - 48, 13 + + 38, 20 - + + 22 + + + Perform multiple passes + + + UDLoopCounter2 + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 5 + + + Fill + + + 288, 23 + + + 1, 1, 1, 1 + + + 38, 20 + + + 21 + + + Perform multiple passes + + + UDLoopCounter1 + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 6 + + + Fill + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAbFJREFUOE+VUqGS7CAQ3M+4X1i5ci0SGRmLRCLHIpFILHJlZCwSGYmNXBnZN0Ny + uUu9eq/eTVUXlcD0zHTP7X9CeQWbLNracPz6XShSiFPE4EfkOf+dJJeMMY4YGHKOwXRIYntXlG2CDQ4u + 0ZWktspJA/xEyC0irYHhfyAgrA60DZi2CMqeSfxOInOpoPBaMmg1sE3Dr/ZE6HAwi4Ze7ohvh8RjGG93 + ApMM4hyg6xND4VlLhI32ACcGC4rc2ZLgF4LPAQOZ7xFE4cSXmpPTnCCClaWeD5a2QFm9VyXuigmOqz3u + 9ICJ3DrbpEh3tY+rMx5MoNzIxAXvbet27lhxa++vj9Yvd0FHPOj5B5FY+GQyxyPZQHgYfX0jI4htYqfm + boT0uOpia8su1AkvBDQUDPYQUkLEpEx4vRPqNrNwvistIor3AtFBnHGb7kVOApk/TOI1QdV7t4waq38B + L1XjlWabxXJJPsV2XFmWQ2y6zx/dTle5UjUdtp/sQOE37II2BnMp1/llPaVdeSSei2WD46r9/IJDSOma + +DNEZVmSkGP3vtv02xC1DQv2ZMWPX/+I2+0TK4fIYkk16gEAAAAASUVORK5CYII= + + + + 269, 45 + + + 1, 1, 1, 1 + + + 17, 18 + + + 19 + + + Reload last file + + + btnFileSetup2 + + + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel5 + + + 7 + + + Fill + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAbFJREFUOE+VUqGS7CAQ3M+4X1i5ci0SGRmLRCLHIpFILHJlZCwSGYmNXBnZN0Ny + uUu9eq/eTVUXlcD0zHTP7X9CeQWbLNracPz6XShSiFPE4EfkOf+dJJeMMY4YGHKOwXRIYntXlG2CDQ4u + 0ZWktspJA/xEyC0irYHhfyAgrA60DZi2CMqeSfxOInOpoPBaMmg1sE3Dr/ZE6HAwi4Ze7ohvh8RjGG93 + ApMM4hyg6xND4VlLhI32ACcGC4rc2ZLgF4LPAQOZ7xFE4cSXmpPTnCCClaWeD5a2QFm9VyXuigmOqz3u + 9ICJ3DrbpEh3tY+rMx5MoNzIxAXvbet27lhxa++vj9Yvd0FHPOj5B5FY+GQyxyPZQHgYfX0jI4htYqfm + boT0uOpia8su1AkvBDQUDPYQUkLEpEx4vRPqNrNwvistIor3AtFBnHGb7kVOApk/TOI1QdV7t4waq38B + L1XjlWabxXJJPsV2XFmWQ2y6zx/dTle5UjUdtp/sQOE37II2BnMp1/llPaVdeSSei2WD46r9/IJDSOma + +DNEZVmSkGP3vtv02xC1DQv2ZMWPX/+I2+0TK4fIYkk16gEAAAAASUVORK5CYII= + + + + 269, 23 + + + 1, 1, 1, 1 + + + 17, 20 + + + 18 + + + Reload last file + + + btnFileSetup1 + + + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel5 + + 8 - - Progress + + Fill - - LblProgress + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAbFJREFUOE+VUqGS7CAQ3M+4X1i5ci0SGRmLRCLHIpFILHJlZCwSGYmNXBnZN0Ny + uUu9eq/eTVUXlcD0zHTP7X9CeQWbLNracPz6XShSiFPE4EfkOf+dJJeMMY4YGHKOwXRIYntXlG2CDQ4u + 0ZWktspJA/xEyC0irYHhfyAgrA60DZi2CMqeSfxOInOpoPBaMmg1sE3Dr/ZE6HAwi4Ze7ohvh8RjGG93 + ApMM4hyg6xND4VlLhI32ACcGC4rc2ZLgF4LPAQOZ7xFE4cSXmpPTnCCClaWeD5a2QFm9VyXuigmOqz3u + 9ICJ3DrbpEh3tY+rMx5MoNzIxAXvbet27lhxa++vj9Yvd0FHPOj5B5FY+GQyxyPZQHgYfX0jI4htYqfm + boT0uOpia8su1AkvBDQUDPYQUkLEpEx4vRPqNrNwvistIor3AtFBnHGb7kVOApk/TOI1QdV7t4waq38B + L1XjlWabxXJJPsV2XFmWQ2y6zx/dTle5UjUdtp/sQOE37II2BnMp1/llPaVdeSSei2WD46r9/IJDSOma + +DNEZVmSkGP3vtv02xC1DQv2ZMWPX/+I2+0TK4fIYkk16gEAAAAASUVORK5CYII= + - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 269, 1 - + + 1, 1, 1, 1 + + + 17, 20 + + + 17 + + + Reload last file + + + btnFileSetup + + + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null + + tableLayoutPanel5 - - 0 + + 9 + + + Fill + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAJxAIA3kywAAACBjSFJNAABu + lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsMAAALDAE/QCLIAAADQElE + QVQ4T3WTW0hTcRzHf12o16KnLrq5s013ph4921ymS/M6yyyzmuKclaJGN1pE2kP1UBRdhS4kUVBgF4LC + ktIkIy1tF1dTj7u5uemmWallZhbhr7NZRkkPXw7n4fPhx//3/YFMIgOlMgMyM9fBlsKtUFpSCkmrkkAR + p4AYaQzIZXKIjqIhRiafX1RUrBSLyNn8EB4ICX4g/xXExcYBzYJSWgpUBDX3/PmLJ0dGPn3PydmUGLR4 + CRDckED+K8hQroYN2TmwXB4Lu3ftWfvly/i3sbHxidt37t4XEII5BIcLAh4xU1DyS6BS5UHZ9h1QfqAi + +/LlqqvDwyOjXl//YI+n73Nubt6aoCVLZ06gVmtAoykERbwi8H/2XOXu9x+G0Olyo9vTN+7odg31en1j + d+7X1pHiyPk8TvAfQVpaBuzbq828ce3qrUK1Ju1AecW2gbeDP3rcvejt70eX241Wm32ys9vz1VhzfaI4 + W5krkcqnBImJyVC0rTihrfXFkM9pQ8sb42Rrc/Mkw1iwt8/Lwh602R3Y6fSirvY2tpWGYXWx4jUlWb7A + /8Kgzi+Q6pqfD/RYO1m4DdsNOjSbTOhyOtFusyPDdGGHw4P6hhrU76LQrKXxSFn+PYGQXAjK1HTqta71 + Q1+3NQB3GPVoMhrQ5eoJwF0Mg+YuB+oaH6Fpvxwt+yk8qd3aQMXEEwSHAxAfu0JcdenirZfPng5bzSY0 + vWpBBzuuP79hQ3Mjth9OQNfBCKzUqnXR8pVkiH+NbKHAvw7VZpWopeWVz6DXY2NDPRp0erRZrdjO2NHQ + +hKZE+noOxyOV8rVjCwueQXvVwcCAh67S02BZhP74qOjn8fQ3N6B9U8a0NxpRSMrtFSux3fHSLx5KM8Z + m5CeEioMnYKnBayNsywIUpJT6erqm/feDr5Di8OFL5qa0FGVjx9Pi/HB0VyvInn12jBhGISLyOk7EPqb + 6G8Tnw13WTCwRzKLLdLmh0+a3nTUXcHvF0h8dkY1kJSetVEsCgeaigYJex/+7+9MC4SEIDCWfxoqkl5U + rt15/PGpfEtWVnYBKYoAOnIK/jd/CUL5UyG4XCBC+ECGS4JJkXheVGQUSKiZsCSKhp+/5brOKZOAhwAA + AABJRU5ErkJggg== + + + + 231, 45 + + + 1, 1, 1, 1 + + + 17, 18 + + + 16 + + + Open File + + + BtnOpen2 + + + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel5 + + + 10 + + + Fill + + + 101, 45 + + + 1, 1, 1, 1 + + + 128, 20 + + + 15 + + + TbFileName2 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 11 + + + Fill + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAJxAIA3kywAAACBjSFJNAABu + lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsMAAALDAE/QCLIAAADQElE + QVQ4T3WTW0hTcRzHf12o16KnLrq5s013ph4921ymS/M6yyyzmuKclaJGN1pE2kP1UBRdhS4kUVBgF4LC + ktIkIy1tF1dTj7u5uemmWallZhbhr7NZRkkPXw7n4fPhx//3/YFMIgOlMgMyM9fBlsKtUFpSCkmrkkAR + p4AYaQzIZXKIjqIhRiafX1RUrBSLyNn8EB4ICX4g/xXExcYBzYJSWgpUBDX3/PmLJ0dGPn3PydmUGLR4 + CRDckED+K8hQroYN2TmwXB4Lu3ftWfvly/i3sbHxidt37t4XEII5BIcLAh4xU1DyS6BS5UHZ9h1QfqAi + +/LlqqvDwyOjXl//YI+n73Nubt6aoCVLZ06gVmtAoykERbwi8H/2XOXu9x+G0Olyo9vTN+7odg31en1j + d+7X1pHiyPk8TvAfQVpaBuzbq828ce3qrUK1Ju1AecW2gbeDP3rcvejt70eX241Wm32ys9vz1VhzfaI4 + W5krkcqnBImJyVC0rTihrfXFkM9pQ8sb42Rrc/Mkw1iwt8/Lwh602R3Y6fSirvY2tpWGYXWx4jUlWb7A + /8Kgzi+Q6pqfD/RYO1m4DdsNOjSbTOhyOtFusyPDdGGHw4P6hhrU76LQrKXxSFn+PYGQXAjK1HTqta71 + Q1+3NQB3GPVoMhrQ5eoJwF0Mg+YuB+oaH6Fpvxwt+yk8qd3aQMXEEwSHAxAfu0JcdenirZfPng5bzSY0 + vWpBBzuuP79hQ3Mjth9OQNfBCKzUqnXR8pVkiH+NbKHAvw7VZpWopeWVz6DXY2NDPRp0erRZrdjO2NHQ + +hKZE+noOxyOV8rVjCwueQXvVwcCAh67S02BZhP74qOjn8fQ3N6B9U8a0NxpRSMrtFSux3fHSLx5KM8Z + m5CeEioMnYKnBayNsywIUpJT6erqm/feDr5Di8OFL5qa0FGVjx9Pi/HB0VyvInn12jBhGISLyOk7EPqb + 6G8Tnw13WTCwRzKLLdLmh0+a3nTUXcHvF0h8dkY1kJSetVEsCgeaigYJex/+7+9MC4SEIDCWfxoqkl5U + rt15/PGpfEtWVnYBKYoAOnIK/jd/CUL5UyG4XCBC+ECGS4JJkXheVGQUSKiZsCSKhp+/5brOKZOAhwAA + AABJRU5ErkJggg== + + + + 231, 23 + + + 1, 1, 1, 1 + + + 17, 20 + + + 13 + + + Open File + + + BtnOpen1 + + + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel5 + + + 12 + + + Fill + + + 101, 23 + + + 1, 1, 1, 1 + + + 128, 20 + + + 12 + + + TbFileName1 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 13 Left @@ -310,37 +817,37 @@ 1, 1, 1, 1 - 49, 13 + 98, 13 0 - Filename + Filename (Engrave) LblFilename - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel5 - 1 + 14 Fill - 52, 1 + 101, 1 1, 1, 1, 1 - 154, 20 + 128, 20 1 @@ -349,25 +856,25 @@ TbFileName - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel5 - 2 + 15 Fill - 52, 23 + 101, 65 1, 1, 1, 1 - 109, 24 + 185, 18 7 @@ -376,21 +883,21 @@ PB - LaserGRBL.UserControls.DoubleProgressBar, LaserGRBL, Version=3.7.3.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.DoubleProgressBar, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel5 - 3 + 16 - - None + + Fill iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAJxAIA3kywAAACBjSFJNAABu - lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsTAAALEwEAmpwYAAADQElE + lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsMAAALDAE/QCLIAAADQElE QVQ4T3WTW0hTcRzHf12o16KnLrq5s013ph4921ymS/M6yyyzmuKclaJGN1pE2kP1UBRdhS4kUVBgF4LC ktIkIy1tF1dTj7u5uemmWallZhbhr7NZRkkPXw7n4fPhx//3/YFMIgOlMgMyM9fBlsKtUFpSCkmrkkAR p4AYaQzIZXKIjqIhRiafX1RUrBSLyNn8EB4ICX4g/xXExcYBzYJSWgpUBDX3/PmLJ0dGPn3PydmUGLR4 @@ -409,20 +916,17 @@ - 217, 2 + 231, 1 1, 1, 1, 1 - 17, 17 + 17, 20 6 - - 17, 17 - Open File @@ -430,16 +934,82 @@ BtnOpen - LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=3.7.3.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel5 - 4 + 17 - - None + + Left + + + True + + + NoControl + + + 1, 26 + + + 1, 1, 1, 1 + + + 98, 13 + + + 11 + + + Filename 2 (Raster) + + + LblFilename1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 18 + + + Fill + + + 288, 1 + + + 1, 1, 1, 1 + + + 38, 20 + + + 9 + + + Perform multiple passes + + + UDLoopCounter + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 19 + + + Right False @@ -447,7 +1017,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAK - 8AAACvABQqw0mAAAAAd0SU1FB9MCGhU2KcxZSDgAAAIpSURBVDhPtdJfSNNRFAfws5L+DNrcJkGEL0aK + 6QAACukB/XXO0wAAAAd0SU1FB9MCGhU2KcxZSDgAAAIpSURBVDhPtdJfSNNRFAfws5L+DNrcJkGEL0aK abq2oZWUhRGVYFbDCh3OzOafbWxuWi1nrnItM5FNiAZR9JAvBZHpcoqxFKc2beiwKUQvSUlP0mQv5bcf cmEIYj7U5/Ge873ncLn075SSPuVm8gJVUIA0lMNO109ojJ+f/DaOzo9PIL239zd3iZvqSczKf5dgSlh4 GXqOtsE7aBlqQPkLJfi1W77TNSphLWsT1YoWnk50oLHfAOPbUtR4lNB485HhSlwiM/XRbdrNWlcnNsX/ @@ -461,13 +1031,13 @@ - 208, 26 + 309, 65 1, 1, 1, 1 - 17, 17 + 17, 18 8 @@ -479,37 +1049,13 @@ BtnRunProgram - LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=3.7.3.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel5 - 5 - - - 165, 25 - - - 39, 20 - - - 9 - - - Perform multiple passes - - - UDLoopCounter - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel5 - - - 6 + 20 None @@ -526,7 +1072,7 @@ - 227, 26 + 329, 65 1, 1, 1, 1 @@ -547,13 +1093,115 @@ BtnAbortProgram - LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=3.7.3.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel5 - 7 + 21 + + + Left + + + True + + + NoControl + + + 1, 47 + + + 1, 1, 1, 1 + + + 83, 13 + + + 14 + + + Filename 3 (Cut) + + + LblFilename2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 22 + + + Left + + + True + + + NoControl + + + 1, 67 + + + 1, 1, 1, 1 + + + 48, 13 + + + 8 + + + Progress + + + LblProgress + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 23 + + + True + + + Fill + + + NoControl + + + 330, 3 + + + 15, 16 + + + 20 + + + chkFileEnable + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel5 + + + 24 Fill @@ -562,10 +1210,10 @@ 0, 0 - 2 + 4 - 245, 48 + 348, 84 0 @@ -574,7 +1222,7 @@ tableLayoutPanel5 - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 GBFile @@ -583,7 +1231,7 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="LblProgress" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="LblFilename" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="TbFileName" Row="0" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="PB" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="BtnOpen" Row="0" RowSpan="1" Column="3" ColumnSpan="2" /><Control Name="BtnRunProgram" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="UDLoopCounter" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="BtnAbortProgram" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,AutoSize,20" /><Rows Styles="AutoSize,0,AutoSize,0" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="BtnFileAppend2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="BtnFileAppend1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="BtnFileAppend" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="chkFileEnable2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="chkFileEnable1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="UDLoopCounter2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="UDLoopCounter1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="btnFileSetup2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="btnFileSetup1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="btnFileSetup" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="BtnOpen2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="TbFileName2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="BtnOpen1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="TbFileName1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="LblFilename" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="TbFileName" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="PB" Row="3" RowSpan="1" Column="1" ColumnSpan="4" /><Control Name="BtnOpen" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="LblFilename1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="UDLoopCounter" Row="0" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="BtnRunProgram" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="BtnAbortProgram" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="LblFilename2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="LblProgress" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkFileEnable" Row="0" RowSpan="1" Column="6" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,40,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,Absolute,20,Absolute,20,Absolute,20" /></TableLayoutSettings> Fill @@ -595,7 +1243,7 @@ 1, 1, 1, 0 - 245, 48 + 348, 84 1 @@ -604,7 +1252,7 @@ GBFile - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -658,7 +1306,7 @@ LblEmulator - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel4 @@ -694,7 +1342,7 @@ LblComPort - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel4 @@ -712,7 +1360,7 @@ 1, 1, 1, 1 - 66, 21 + 118, 21 1 @@ -721,7 +1369,7 @@ CBPort - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel4 @@ -739,7 +1387,7 @@ NoControl - 119, 5 + 171, 5 1, 1, 1, 1 @@ -757,7 +1405,7 @@ LblBaudRate - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel4 @@ -769,13 +1417,13 @@ Fill - 153, 1 + 205, 1 1, 1, 1, 1 - 66, 21 + 118, 21 2 @@ -784,7 +1432,7 @@ CBSpeed - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel4 @@ -823,7 +1471,7 @@ LblAddress - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel4 @@ -841,7 +1489,7 @@ 1, 1, 1, 1 - 168, 20 + 272, 20 3 @@ -853,7 +1501,7 @@ TxtAddress - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel4 @@ -874,7 +1522,7 @@ 1, 1, 1, 1 - 168, 20 + 272, 20 7 @@ -889,7 +1537,7 @@ TxtEmulator - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel4 @@ -1052,7 +1700,7 @@ - 221, 22 + 325, 22 1, 1, 1, 1 @@ -1076,7 +1724,7 @@ BtnConnectDisconnect - LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=3.7.3.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel4 @@ -1094,7 +1742,7 @@ 3 - 245, 67 + 348, 67 0 @@ -1103,7 +1751,7 @@ tableLayoutPanel4 - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 GBConnection @@ -1124,7 +1772,7 @@ 1, 1, 1, 0 - 245, 67 + 348, 67 0 @@ -1133,7 +1781,7 @@ GBConnection - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -1151,7 +1799,7 @@ 3 - 247, 468 + 350, 468 1 @@ -1160,7 +1808,7 @@ tableLayoutPanel1 - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -1171,12 +1819,12 @@ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="GBCommands" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="GBFile" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="GBConnection" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,Percent,100" /></TableLayoutSettings> - + True - - + + 39 - + 6, 13 @@ -1187,18 +1835,18 @@ 4, 4, 4, 4 - 247, 468 + 350, 468 TT - System.Windows.Forms.ToolTip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ConnectLogForm - System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/LaserGRBL/Core/GrblCore.cs b/LaserGRBL/Core/GrblCore.cs index 5acf9bc1c..76b220553 100644 --- a/LaserGRBL/Core/GrblCore.cs +++ b/LaserGRBL/Core/GrblCore.cs @@ -65,11 +65,11 @@ public override string ToString() public override bool Equals(object obj) { return obj != null && obj is ThreadingMode && ((ThreadingMode)obj).Name == Name; } - public override int GetHashCode() - { - return base.GetHashCode(); - } - } + public override int GetHashCode() + { + return base.GetHashCode(); + } + } public enum DetectedIssue { @@ -216,7 +216,7 @@ public object Clone() public string Vendor { - get + get { if (mVendorInfo != null && mVendorInfo.ToLower().Contains("ortur")) return "Ortur"; @@ -229,9 +229,9 @@ public string Vendor } } - public int OrturFWVersionNumber + public int OrturFWVersionNumber { - get + get { try { return int.Parse(mVendorVersion); } catch { return -1; } @@ -242,8 +242,9 @@ public int OrturFWVersionNumber public delegate void dlgIssueDetector(DetectedIssue issue); public delegate void dlgOnMachineStatus(); public delegate void dlgOnOverrideChange(); - public delegate void dlgOnLoopCountChange(decimal current); + public delegate void dlgOnLoopCountChange(decimal current, int nLayer); public delegate void dlgJogStateChange(bool jog); + public delegate void dlgOnLayerEnabledChange(bool current, int nLayer); public event dlgIssueDetector IssueDetected; public event dlgOnMachineStatus MachineStatusChanged; @@ -252,6 +253,7 @@ public int OrturFWVersionNumber public event dlgOnOverrideChange OnOverrideChange; public event dlgOnLoopCountChange OnLoopCountChange; public event dlgJogStateChange JogStateChange; + public event dlgOnLayerEnabledChange OnLayerEnabledChange; private System.Windows.Forms.Control syncro; protected ComWrapper.IComWrapper com; @@ -278,7 +280,7 @@ public int OrturFWVersionNumber protected TimeProjection mTP = new TimeProjection(); private MacStatus mMachineStatus = MacStatus.Disconnected; - + private float mCurF; private float mCurS; @@ -291,7 +293,8 @@ public int OrturFWVersionNumber private int mTarOvRapids; private int mTarOvPower; - private decimal mLoopCount = 1; + private decimal[] mLoopCount = { 1, 1, 1 }; + private bool[] layerEnabled = { true, true, true }; protected Tools.PeriodicEventTimer QueryTimer; @@ -307,30 +310,30 @@ public int OrturFWVersionNumber private HotKeysManager mHotKeyManager; public UsageStats.UsageCounters UsageCounters; - + public GrblCore(System.Windows.Forms.Control syncroObject, PreviewForm cbform, JogForm jogform) { - if (Type != Firmware.Grbl) Logger.LogMessage("Program", "Load {0} core", Type); + if (Type != Firmware.Grbl) Logger.LogMessage("Program", "Load {0} core", Type); - SetStatus(MacStatus.Disconnected); + SetStatus(MacStatus.Disconnected); syncro = syncroObject; com = new ComWrapper.UsbSerial(); debugLastStatusDelay = new Tools.ElapsedFromEvent(); debugLastMoveOrActivityDelay = new Tools.ElapsedFromEvent(); - //with version 4.5.0 default ThreadingMode change from "UltraFast" to "Fast" - if (!Settings.IsNewFile && Settings.PrevVersion < new Version(4, 5, 0)) - { - ThreadingMode CurrentMode = Settings.GetObject("Threading Mode", ThreadingMode.Fast); - if (Equals(CurrentMode, ThreadingMode.Insane) || Equals(CurrentMode, ThreadingMode.UltraFast)) - Settings.SetObject("Threading Mode", ThreadingMode.Fast); - } + //with version 4.5.0 default ThreadingMode change from "UltraFast" to "Fast" + if (!Settings.IsNewFile && Settings.PrevVersion < new Version(4, 5, 0)) + { + ThreadingMode CurrentMode = Settings.GetObject("Threading Mode", ThreadingMode.Fast); + if (Equals(CurrentMode, ThreadingMode.Insane) || Equals(CurrentMode, ThreadingMode.UltraFast)) + Settings.SetObject("Threading Mode", ThreadingMode.Fast); + } + + mThreadingMode = Settings.GetObject("Threading Mode", ThreadingMode.Fast); - mThreadingMode = Settings.GetObject("Threading Mode", ThreadingMode.Fast); - QueryTimer = new Tools.PeriodicEventTimer(TimeSpan.FromMilliseconds(mThreadingMode.StatusQuery), false); TX = new Tools.ThreadObject(ThreadTX, 1, true, "Serial TX Thread", StartTX); @@ -422,7 +425,7 @@ protected void SetStatus(MacStatus newStatus) Logger.LogMessage("SetStatus", "Machine status [{0}]", mMachineStatus); if (oldStatus == MacStatus.Connecting && newStatus == MacStatus.Disconnected) - mFailedConnection ++; + mFailedConnection++; if (oldStatus == MacStatus.Connecting && newStatus != MacStatus.Disconnected) mFailedConnection = 0; if (oldStatus == MacStatus.Connecting && newStatus != MacStatus.Disconnected) @@ -449,21 +452,21 @@ protected void SetStatus(MacStatus newStatus) private void RefreshConfigOnConnect() { - try {System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(RefreshConfigOnConnect)); } - catch{ } + try { System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(RefreshConfigOnConnect)); } + catch { } } internal virtual void SendHomingCommand() - { - EnqueueCommand(new GrblCommand("$H")); - } + { + EnqueueCommand(new GrblCommand("$H")); + } - internal virtual void SendUnlockCommand() - { - EnqueueCommand(new GrblCommand("$X")); - } + internal virtual void SendUnlockCommand() + { + EnqueueCommand(new GrblCommand("$X")); + } - public GrblVersionInfo GrblVersion //attenzione! può essere null + public GrblVersionInfo GrblVersion //attenzione! può essere null { get { return Settings.GetObject("Last GrblVersion known", null); } set @@ -536,46 +539,51 @@ void RiseOverrideChanged() } } - void RiseOnFileLoading(long elapsed, string filename) + void RiseOnFileLoading(long elapsed, string filename, int nLayer) { mTP.Reset(true); if (OnFileLoaded != null) - OnFileLoading(elapsed, filename); + OnFileLoading(elapsed, filename, nLayer); } - void RiseOnFileLoaded(long elapsed, string filename) + void RiseOnFileLoaded(long elapsed, string filename, int nLayer) { mTP.Reset(true); if (OnFileLoaded != null) - OnFileLoaded(elapsed, filename); + OnFileLoaded(elapsed, filename, nLayer); } public GrblFile LoadedFile { get { return file; } } - public void ReOpenFile(System.Windows.Forms.Form parent) + public void ReOpenFile(System.Windows.Forms.Form parent, int nLayer) { - if (CanReOpenFile) - OpenFile(parent, Settings.GetObject("Core.LastOpenFile", null)); + if (CanReOpenFile(nLayer)) + { + string layerSuffix = nLayer > 0 ? nLayer.ToString() : ""; + OpenFile(parent, Settings.GetObject("Core.LastOpenFile" + layerSuffix, null)); + } } public static readonly List ImageExtensions = new List(new string[] { ".jpg", ".bmp", ".png", ".gif" }); public static readonly List GCodeExtensions = new List(new string[] { ".nc", ".cnc", ".tap", ".gcode", ".ngc" }); public static readonly List ProjectFileExtensions = new List(new string[] { ".lps" }); - public void OpenFile(System.Windows.Forms.Form parent, string filename = null, bool append = false) + public void OpenFile(System.Windows.Forms.Form parent, string filename = null, bool append = false, int nLayer = 0) { if (!CanLoadNewFile) return; try { + string layerSuffix = nLayer > 0 ? nLayer.ToString() : ""; + if (filename == null) { using (System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog()) { //pre-select last file if exist - string lastFN = Settings.GetObject("Core.LastOpenFile", null); + string lastFN = Settings.GetObject("Core.LastOpenFile" + layerSuffix, null); if (lastFN != null && System.IO.File.Exists(lastFN)) ofd.FileName = lastFN; @@ -602,115 +610,120 @@ public void OpenFile(System.Windows.Forms.Form parent, string filename = null, b if (filename == null) return; - Logger.LogMessage("OpenFile", "Open {0}", filename); - Settings.SetObject("Core.LastOpenFile", filename); + Logger.LogMessage("OpenFile", "Open {0} ({1})", filename, layerSuffix); + Settings.SetObject("Core.LastOpenFile" + layerSuffix, filename); - if (ImageExtensions.Contains(System.IO.Path.GetExtension(filename).ToLowerInvariant())) //import raster image - { - try - { - RasterConverter.RasterToLaserForm.CreateAndShowDialog(this, filename, parent, append); - UsageCounters.RasterFile++; - } - catch (Exception ex) - { Logger.LogException("RasterImport", ex); } - } - else if (System.IO.Path.GetExtension(filename).ToLowerInvariant() == ".svg") - { - SvgConverter.SvgModeForm.Mode mode = SvgConverter.SvgModeForm.Mode.Vector;// SvgConverter.SvgModeForm.CreateAndShow(filename); - if (mode == SvgConverter.SvgModeForm.Mode.Vector) - { - try - { - SvgConverter.SvgToGCodeForm.CreateAndShowDialog(this, filename, parent, append); - UsageCounters.SvgFile++; - } - catch (Exception ex) - { Logger.LogException("SvgImport", ex); } - } - else if (mode == SvgConverter.SvgModeForm.Mode.Raster) - { - string bmpname = filename + ".png"; - string fcontent = System.IO.File.ReadAllText(filename); - Svg.SvgDocument svg = Svg.SvgDocument.FromSvg(fcontent); - svg.Ppi = 600; - - using (Bitmap bmp = svg.Draw()) - { - bmp.SetResolution(600, 600); - - //codec options not supported in C# png encoder https://efundies.com/c-sharp-save-png/ - //quality always 100% - - //ImageCodecInfo codecinfo = GetEncoder(ImageFormat.Png); - //EncoderParameters paramlist = new EncoderParameters(1); - //paramlist.Param[0] = new EncoderParameter(Encoder.Quality, 30L); - - - if (System.IO.File.Exists(bmpname)) - System.IO.File.Delete(bmpname); - - bmp.Save(bmpname/*, codecinfo, paramlist*/); - } - - try - { - RasterConverter.RasterToLaserForm.CreateAndShowDialog(this, bmpname, parent, append); - UsageCounters.RasterFile++; - if (System.IO.File.Exists(bmpname)) - System.IO.File.Delete(bmpname); - } - catch (Exception ex) - { Logger.LogException("SvgBmpImport", ex); } - } - } - else if (GCodeExtensions.Contains(System.IO.Path.GetExtension(filename).ToLowerInvariant())) //load GCODE file - { - Cursor.Current = Cursors.WaitCursor; - - try - { - file.LoadFile(filename, append); - UsageCounters.GCodeFile++; - } - catch (Exception ex) - { Logger.LogException("GCodeImport", ex); } - - Cursor.Current = Cursors.Default; - } - else if (ProjectFileExtensions.Contains(System.IO.Path.GetExtension(filename).ToLowerInvariant())) //load LaserGRBL project - { - var project = Project.LoadProject(filename); - - for (var i = 0; i < project.Count; i++) - { - var settings = project[i]; - - // Save image temporary - var imageFilepath = $"{System.IO.Path.GetTempPath()}\\{settings["ImageName"]}"; - Project.SaveImage(settings["ImageBase64"].ToString(), imageFilepath); - - // Restore settings - foreach (var setting in settings.Where(setting => - setting.Key != "ImageName" && setting.Key != "ImageBase64")) - Settings.SetObject(setting.Key, setting.Value); - - // Open file - Settings.SetObject("Core.LastOpenFile", imageFilepath); - if (i == 0) - ReOpenFile(parent); - else - OpenFile(parent, imageFilepath, true); - - // Delete temporary image file - System.IO.File.Delete(imageFilepath); - } + if (ImageExtensions.Contains(System.IO.Path.GetExtension(filename).ToLowerInvariant())) //import raster image + { + try + { + RasterConverter.RasterToLaserForm.CreateAndShowDialog(this, filename, parent, append, nLayer); + UsageCounters.RasterFile++; + } + catch (Exception ex) + { Logger.LogException("RasterImport", ex); } } - else - { - System.Windows.Forms.MessageBox.Show(Strings.UnsupportedFiletype, "Error", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); - } - } + else if (System.IO.Path.GetExtension(filename).ToLowerInvariant() == ".svg") + { + SvgConverter.SvgModeForm.Mode mode = SvgConverter.SvgModeForm.Mode.Vector;// SvgConverter.SvgModeForm.CreateAndShow(filename); + if (mode == SvgConverter.SvgModeForm.Mode.Vector) + { + try + { + SvgConverter.SvgToGCodeForm.CreateAndShowDialog(this, filename, parent, append, nLayer); + UsageCounters.SvgFile++; + } + catch (Exception ex) + { Logger.LogException("SvgImport", ex); } + } + else if (mode == SvgConverter.SvgModeForm.Mode.Raster) + { + string bmpname = filename + ".png"; + string fcontent = System.IO.File.ReadAllText(filename); + Svg.SvgDocument svg = Svg.SvgDocument.FromSvg(fcontent); + svg.Ppi = 600; + + using (Bitmap bmp = svg.Draw()) + { + bmp.SetResolution(600, 600); + + //codec options not supported in C# png encoder https://efundies.com/c-sharp-save-png/ + //quality always 100% + + //ImageCodecInfo codecinfo = GetEncoder(ImageFormat.Png); + //EncoderParameters paramlist = new EncoderParameters(1); + //paramlist.Param[0] = new EncoderParameter(Encoder.Quality, 30L); + + + if (System.IO.File.Exists(bmpname)) + System.IO.File.Delete(bmpname); + + bmp.Save(bmpname/*, codecinfo, paramlist*/); + } + + try + { + RasterConverter.RasterToLaserForm.CreateAndShowDialog(this, bmpname, parent, append, nLayer); + UsageCounters.RasterFile++; + if (System.IO.File.Exists(bmpname)) + System.IO.File.Delete(bmpname); + } + catch (Exception ex) + { Logger.LogException("SvgBmpImport", ex); } + } + } + else if (GCodeExtensions.Contains(System.IO.Path.GetExtension(filename).ToLowerInvariant())) //load GCODE file + { + Cursor.Current = Cursors.WaitCursor; + + try + { + file.LoadFile(filename, append, nLayer); + UsageCounters.GCodeFile++; + } + catch (Exception ex) + { Logger.LogException("GCodeImport", ex); } + + Cursor.Current = Cursors.Default; + } + else if (ProjectFileExtensions.Contains(System.IO.Path.GetExtension(filename).ToLowerInvariant())) //load LaserGRBL project + { + var project = Project.LoadProject(filename); + + for (int jLayer = 0; jLayer < 3; jLayer++) + { + for (var i = 0; i < project[jLayer].Count; i++) + { + var settings = project[jLayer][i]; + + string jSuffix = jLayer > 0 ? jLayer.ToString() : ""; + + // Save image temporary + var imageFilepath = $"{System.IO.Path.GetTempPath()}\\{settings["ImageName"]}"; + Project.SaveImage(settings["ImageBase64"].ToString(), imageFilepath); + + // Restore settings + foreach (var setting in settings.Where(setting => + setting.Key != "ImageName" && setting.Key != "ImageBase64")) + Settings.SetObject(setting.Key, setting.Value); + + // Open file + Settings.SetObject("Core.LastOpenFile" + jSuffix, imageFilepath); + /*if (i == 0) + ReOpenFile(parent); + else*/ + OpenFile(parent, imageFilepath, true, jLayer); + + // Delete temporary image file + System.IO.File.Delete(imageFilepath); + } + } + } + else + { + System.Windows.Forms.MessageBox.Show(Strings.UnsupportedFiletype, "Error", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); + } + } catch (Exception ex) { Logger.LogException("OpenFile", ex); @@ -730,14 +743,19 @@ private ImageCodecInfo GetEncoder(ImageFormat format) return null; } - public void SaveProgram(Form parent, bool header, bool footer, bool between, int cycles) + public void SaveProgram(Form parent, bool header, bool footer, bool between, int[] cycles) { if (HasProgram) { string filename = null; using (SaveFileDialog sfd = new SaveFileDialog()) { - string lastFN = Settings.GetObject("Core.LastOpenFile", null); + string lastFN = null; + for (int i = 0; i < 3 && lastFN == null; i++) + { + string layerSuffix = i > 0 ? i.ToString() : ""; + lastFN = Settings.GetObject("Core.LastOpenFile" + layerSuffix, null); + } if (lastFN != null) { string fn = System.IO.Path.GetFileNameWithoutExtension(lastFN); @@ -764,7 +782,7 @@ public void SaveProgram(Form parent, bool header, bool footer, bool between, int filename = sfd.FileName; } - if (filename != null) + if (filename != null) file.SaveGCODE(filename, header, footer, between, cycles, this); } } @@ -776,7 +794,12 @@ public void SaveProject(Form parent) string filename = null; using (SaveFileDialog sfd = new SaveFileDialog()) { - string lastFN = Settings.GetObject("Core.LastOpenFile", null); + string lastFN = null; + for (int i = 0; i < 3 && lastFN == null; i++) + { + string layerSuffix = i > 0 ? i.ToString() : ""; + lastFN = Settings.GetObject("Core.LastOpenFile" + layerSuffix, null); + } if (lastFN != null) { string fn = System.IO.Path.GetFileNameWithoutExtension(lastFN); @@ -1000,9 +1023,9 @@ public void RunProgramFromPosition(Form parent) if (CanSendFile) { bool homing = false; - int position = LaserGRBL.RunFromPositionForm.CreateAndShowDialog(parent, LoadedFile.Count, Configuration.HomingEnabled, out homing); + int position = LaserGRBL.RunFromPositionForm.CreateAndShowDialog(parent, LoadedFile.Count(this), Configuration.HomingEnabled, out homing); if (position >= 0) - ContinueProgramFromKnown(position, homing, false); + ContinueProgramFromKnown(position, homing, false, this); } } @@ -1015,7 +1038,7 @@ private void UserWantToContinue(Form parent) if (position == 0) RunProgramFromStart(homing); if (position > 0) - ContinueProgramFromKnown(position, homing, setwco); + ContinueProgramFromKnown(position, homing, setwco, this); } private void RunProgramFromStart(bool homing, bool first = false, bool pass = false) @@ -1039,12 +1062,12 @@ private void RunProgramFromStart(bool homing, bool first = false, bool pass = fa OnJobCycle(); - Logger.LogMessage("EnqueueProgram", "Push File, {0} lines", file.Count); - foreach (GrblCommand cmd in file) + Logger.LogMessage("EnqueueProgram", "Push File, {0} lines", file.Count(this)); + foreach (GrblCommand cmd in file.GetList(this)) mQueuePtr.Enqueue(cmd.Clone() as GrblCommand); mTP.JobStart(LoadedFile, mQueuePtr, first); - Logger.LogMessage("EnqueueProgram", "Running program, {0} lines", file.Count); + Logger.LogMessage("EnqueueProgram", "Running program, {0} lines", file.Count(this)); } } @@ -1066,7 +1089,7 @@ protected virtual void OnJobEnd() ExecuteCustombutton(Settings.GetObject("GCode.CustomFooter", GrblCore.GCODE_STD_FOOTER)); } - private void ContinueProgramFromKnown(int position, bool homing, bool setwco) + private void ContinueProgramFromKnown(int position, bool homing, bool setwco, GrblCore core) { lock (this) { @@ -1089,20 +1112,20 @@ private void ContinueProgramFromKnown(int position, bool homing, bool setwco) mQueue.Enqueue(new GrblCommand(String.Format("G92 X{0} Y{1} Z{2}", cur.X.ToString(System.Globalization.CultureInfo.InvariantCulture), cur.Y.ToString(System.Globalization.CultureInfo.InvariantCulture), cur.Z.ToString(System.Globalization.CultureInfo.InvariantCulture)))); } - for (int i = 0; i < position && i < file.Count; i++) //analizza fino alla posizione - spb.AnalyzeCommand(file[i], false); + for (int i = 0; i < position && i < file.Count(this); i++) //analizza fino alla posizione + spb.AnalyzeCommand(file.GetList(this)[i], false); mQueuePtr.Enqueue(new GrblCommand("G90")); //absolute coordinate mQueuePtr.Enqueue(new GrblCommand(string.Format("M5 G0 {0} {1} {2} {3} {4}", spb.X, spb.Y, spb.Z, spb.F, spb.S))); //fast go to the computed position with laser off and set speed and power mQueuePtr.Enqueue(new GrblCommand(spb.GetSettledModals())); - mTP.JobContinue(LoadedFile, position, mQueuePtr.Count); + mTP.JobContinue(core, LoadedFile, position, mQueuePtr.Count); - for (int i = position; i < file.Count; i++) //enqueue remaining commands + for (int i = position; i < file.Count(this); i++) //enqueue remaining commands { if (spb != null) //check the very first movement command and ensure modal MotionMode is settled { - GrblCommand cmd = file[i].Clone() as GrblCommand; + GrblCommand cmd = file.GetList(this)[i].Clone() as GrblCommand; cmd.BuildHelper(); if (cmd.IsMovement && cmd.G == null) mQueuePtr.Enqueue(new GrblCommand(spb.MotionMode, cmd)); @@ -1113,14 +1136,14 @@ private void ContinueProgramFromKnown(int position, bool homing, bool setwco) } else { - mQueuePtr.Enqueue(file[i].Clone() as GrblCommand); + mQueuePtr.Enqueue(file.GetList(this)[i].Clone() as GrblCommand); } } } } public bool HasProgram - { get { return file != null && file.Count > 0; } } + { get { return file != null && file.Count(this) > 0; } } public void EnqueueCommand(GrblCommand cmd) { @@ -1166,7 +1189,7 @@ public void OpenCom() Logger.LogMessage("OpenCom", "Error: {0}", ex.Message); SetStatus(MacStatus.Disconnected); com.Close(true); - System.Windows.Forms.MessageBox.Show(ex.Message, Strings.BoxConnectErrorTitle, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); + System.Windows.Forms.MessageBox.Show(ex.Message, Strings.BoxConnectErrorTitle, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } } @@ -1190,7 +1213,7 @@ public void CloseCom(bool user) { ClearQueue(false); } //non resettare l'elenco delle cose mandate così da non sbiancare la lista SetStatus(MacStatus.Disconnected); - } + } catch (Exception ex) { Logger.LogException("CloseCom", ex); @@ -1252,12 +1275,12 @@ private void InternalReset(bool device) RiseOverrideChanged(); } - protected virtual void SendBoardResetCommand() - { - SendImmediate(24); + protected virtual void SendBoardResetCommand() + { + SendImmediate(24); } - public virtual void SendImmediate(byte b, bool mute = false) + public virtual void SendImmediate(byte b, bool mute = false) { try { @@ -1336,12 +1359,12 @@ public bool SupportCSV public bool SupportOverride { get { return GrblVersion != null && GrblVersion >= new GrblVersionInfo(1, 1); } } - public bool SupportLaserMode - { get { return GrblVersion != null && GrblVersion >= new GrblVersionInfo(1, 1); } } + public bool SupportLaserMode + { get { return GrblVersion != null && GrblVersion >= new GrblVersionInfo(1, 1); } } - #endregion + #endregion - public bool JogEnabled + public bool JogEnabled { get { @@ -1352,18 +1375,18 @@ public bool JogEnabled } } - internal void EnqueueZJog(JogDirection dir, decimal step, bool fast) - { - if (JogEnabled) - { + internal void EnqueueZJog(JogDirection dir, decimal step, bool fast) + { + if (JogEnabled) + { mPrenotedJogSpeed = (fast ? 100000 : JogSpeed); if (SupportTrueJogging) - DoJogV11(dir, step); - else - EmulateJogV09(dir, step); //immediato - } - } + DoJogV11(dir, step); + else + EmulateJogV09(dir, step); //immediato + } + } public void BeginJog(PointF target, bool fast) { @@ -1387,7 +1410,7 @@ private PointF LimitToBound(PointF target) PointF rv = new PointF(Math.Min(Math.Max(target.X, -mWCO.X), (float)Configuration.TableWidth - mWCO.X), Math.Min(Math.Max(target.Y, -mWCO.Y), (float)Configuration.TableHeight - mWCO.Y)); return rv; } - + return target; } @@ -1408,8 +1431,8 @@ public void BeginJog(JogDirection dir, bool fast) //da chiamare su ButtonDown { if (dir == JogDirection.Home) { - EnqueueCommand(new GrblCommand(string.Format("G90"))); - EnqueueCommand(new GrblCommand(string.Format("G0X0Y0F{0}", mPrenotedJogSpeed))); + EnqueueCommand(new GrblCommand(string.Format("G90"))); + EnqueueCommand(new GrblCommand(string.Format("G0X0Y0F{0}", mPrenotedJogSpeed))); } else { @@ -1423,12 +1446,12 @@ public void BeginJog(JogDirection dir, bool fast) //da chiamare su ButtonDown cmd += $"Y{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; if (dir == JogDirection.SW || dir == JogDirection.S || dir == JogDirection.SE) cmd += $"Y-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; - if (dir == JogDirection.Zdown) - cmd += $"Z-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; - if (dir == JogDirection.Zup) - cmd += $"Z{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; + if (dir == JogDirection.Zdown) + cmd += $"Z-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; + if (dir == JogDirection.Zup) + cmd += $"Z{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; - cmd += $"F{mPrenotedJogSpeed}"; + cmd += $"F{mPrenotedJogSpeed}"; EnqueueCommand(new GrblCommand("G91")); EnqueueCommand(new GrblCommand(cmd)); @@ -1451,18 +1474,18 @@ public void BeginJog(JogDirection dir, bool fast) //da chiamare su ButtonDown private void DoJogV11(JogDirection dir, decimal step) { if (ContinuosJogEnabled && dir != JogDirection.Zdown && dir != JogDirection.Zup) //se C.J. e non Z => prenotato - { - mPrenotedJogDirection = dir; + { + mPrenotedJogDirection = dir; //lo step è quello configurato } - else //non è CJ o non è Z => immediate enqueue jog command - { - mPrenotedJogDirection = JogDirection.None; + else //non è CJ o non è Z => immediate enqueue jog command + { + mPrenotedJogDirection = JogDirection.None; if (dir == JogDirection.Home) - EnqueueCommand(new GrblCommand(string.Format("$J=G90X0Y0F{0}", mPrenotedJogSpeed))); - else - EnqueueCommand(GetRelativeJogCommandv11(dir, step)); - } + EnqueueCommand(new GrblCommand(string.Format("$J=G90X0Y0F{0}", mPrenotedJogSpeed))); + else + EnqueueCommand(GetRelativeJogCommandv11(dir, step)); + } } private void DoJogV11(PointF target) @@ -1483,12 +1506,12 @@ private GrblCommand GetRelativeJogCommandv11(JogDirection dir, decimal step) cmd += $"Y{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; if (dir == JogDirection.SW || dir == JogDirection.S || dir == JogDirection.SE) cmd += $"Y-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; - if (dir == JogDirection.Zdown) - cmd += $"Z-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; - if (dir == JogDirection.Zup) - cmd += $"Z{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; + if (dir == JogDirection.Zdown) + cmd += $"Z-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; + if (dir == JogDirection.Zup) + cmd += $"Z{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}"; - cmd += $"F{mPrenotedJogSpeed}"; + cmd += $"F{mPrenotedJogSpeed}"; return new GrblCommand(cmd); } @@ -1509,7 +1532,7 @@ private GrblCommand GetContinuosJogCommandv11(JogDirection dir) public void EndJogV11() //da chiamare su ButtonUp { - mPrenotedJogDirection = JogDirection.Abort; + mPrenotedJogDirection = JogDirection.Abort; } private void PushJogCommand() @@ -1523,7 +1546,7 @@ private void PushJogCommand() } else if (mPrenotedJogDirection == JogDirection.Home) { - EnqueueCommand(new GrblCommand(string.Format("$J=G90X0Y0F{0}", mPrenotedJogSpeed))); + EnqueueCommand(new GrblCommand(string.Format("$J=G90X0Y0F{0}", mPrenotedJogSpeed))); } else { @@ -1603,10 +1626,10 @@ protected virtual void DetectHang() //} bool noQueryResponse = debugLastStatusDelay.ElapsedTime > TimeSpan.FromTicks(QueryTimer.Period.Ticks * 10) && debugLastStatusDelay.ElapsedTime > TimeSpan.FromSeconds(5); - //bool noMovement = !executingM4 && debugLastMoveDelay.ElapsedTime > TimeSpan.FromSeconds(10); + //bool noMovement = !executingM4 && debugLastMoveDelay.ElapsedTime > TimeSpan.FromSeconds(10); - if (noQueryResponse) - SetIssue(DetectedIssue.StopResponding); + if (noQueryResponse) + SetIssue(DetectedIssue.StopResponding); //else if (noMovement) // SetIssue(DetectedIssue.StopMoving); @@ -1620,7 +1643,7 @@ private void OnConnectTimeout() { Logger.LogMessage("OpenCom", "Connection timeout!"); com.Close(true); //this cause disconnection from RX thread ("ReadLineOrDisconnect") - } + } } private bool CanSend() @@ -1898,7 +1921,7 @@ private void ManageOrturFirmwareMessage(string rline) { mVersionSeen = rline; mVersionSeen = mVersionSeen.Replace("OLF", ""); - mVersionSeen = mVersionSeen.Trim(new char[] { '.', ' ', ':' } ); + mVersionSeen = mVersionSeen.Trim(new char[] { '.', ' ', ':' }); Logger.LogMessage("OrturInfo", "Detected OLF {0}", mVersionSeen); } catch (Exception ex) @@ -2006,21 +2029,21 @@ private void ParseWCO(string p) { string wco = p.Substring(4, p.Length - 4); string[] xyz = wco.Split(",".ToCharArray()); - SetWCO(new GPoint(ParseFloat(xyz,0), ParseFloat(xyz,1), ParseFloat(xyz,2))); + SetWCO(new GPoint(ParseFloat(xyz, 0), ParseFloat(xyz, 1), ParseFloat(xyz, 2))); } private void ParseWPos(string p) { string wpos = p.Substring(5, p.Length - 5); string[] xyz = wpos.Split(",".ToCharArray()); - SetMPosition(mWCO + new GPoint(ParseFloat(xyz,0), ParseFloat(xyz,1), ParseFloat(xyz,2))); + SetMPosition(mWCO + new GPoint(ParseFloat(xyz, 0), ParseFloat(xyz, 1), ParseFloat(xyz, 2))); } private void ParseMPos(string p) { string mpos = p.Substring(5, p.Length - 5); string[] xyz = mpos.Split(",".ToCharArray()); - SetMPosition(new GPoint(ParseFloat(xyz,0), ParseFloat(xyz,1), ParseFloat(xyz,2))); + SetMPosition(new GPoint(ParseFloat(xyz, 0), ParseFloat(xyz, 1), ParseFloat(xyz, 2))); } protected static float ParseFloat(string value) @@ -2028,7 +2051,7 @@ protected static float ParseFloat(string value) return float.Parse(value, NumberFormatInfo.InvariantInfo); } - protected static float ParseFloat(string [] arr, int idx, float defval = 0.0f) + protected static float ParseFloat(string[] arr, int idx, float defval = 0.0f) { if (arr == null || idx < 0 || idx >= arr.Length) return defval; return float.Parse(arr[idx], NumberFormatInfo.InvariantInfo); @@ -2051,9 +2074,9 @@ private void EnlargeBuffer(int mGrblBuffer) { if (mGrblBuffer == 128) //Grbl v1.1 with enabled buffer report mAutoBufferSize = 128; - else if (mGrblBuffer == 255) //Grbl-Mega fixed + else if (mGrblBuffer == 255) //Grbl-Mega fixed mAutoBufferSize = 255; - else if (mGrblBuffer == 256) //Grbl-Mega + else if (mGrblBuffer == 256) //Grbl-Mega mAutoBufferSize = 256; else if (mGrblBuffer == 10240) //Grbl-LPC mAutoBufferSize = 10240; @@ -2066,7 +2089,7 @@ private void ParseFS(string p) { string sfs = p.Substring(3, p.Length - 3); string[] fs = sfs.Split(",".ToCharArray()); - SetFS(ParseFloat(fs,0), ParseFloat(fs,1)); + SetFS(ParseFloat(fs, 0), ParseFloat(fs, 1)); } protected virtual void ParseF(string p) @@ -2272,12 +2295,13 @@ protected virtual void ParseMachineStatus(string data) SetStatus(var); } - - protected virtual void ForceStatusIdle() {} // Used by Marlin to update status to Idle (As Marlin has no immediate message) + + protected virtual void ForceStatusIdle() { } // Used by Marlin to update status to Idle (As Marlin has no immediate message) private void OnProgramEnd() { - if (mTP.JobEnd(mLoopCount == 1) && mLoopCount > 1 && mMachineStatus != MacStatus.Check) + /* commentato perché tutti i loop vengono generati direttamente da GrblFile + if (mTP.JobEnd(LoopCount == 1) && LoopCount > 1 && mMachineStatus != MacStatus.Check) { Logger.LogMessage("CycleEnd", "Cycle Executed: {0} lines, {1} errors, {2}", file.Count, mTP.ErrorCount, Tools.Utils.TimeSpanToString(ProgramTime, Tools.Utils.TimePrecision.Second, Tools.Utils.TimePrecision.Second, ",", true)); mSentPtr.Add(new GrblMessage(string.Format("[{0} lines, {1} errors, {2}]", file.Count, mTP.ErrorCount, Tools.Utils.TimeSpanToString(ProgramTime, Tools.Utils.TimePrecision.Second, Tools.Utils.TimePrecision.Second, ",", true)), false)); @@ -2286,19 +2310,21 @@ private void OnProgramEnd() RunProgramFromStart(false, false, true); } else - { - Logger.LogMessage("ProgramEnd", "Job Executed: {0} lines, {1} errors, {2}", file.Count, mTP.ErrorCount, Tools.Utils.TimeSpanToString(ProgramTime, Tools.Utils.TimePrecision.Second, Tools.Utils.TimePrecision.Second, ",", true)); - mSentPtr.Add(new GrblMessage(string.Format("[{0} lines, {1} errors, {2}]", file.Count, mTP.ErrorCount, Tools.Utils.TimeSpanToString(ProgramTime, Tools.Utils.TimePrecision.Second, Tools.Utils.TimePrecision.Second, ",", true)), false)); + {*/ + mTP.JobEnd(file.Count(this) == 1); + Logger.LogMessage("ProgramEnd", "Job Executed: {0} lines, {1} errors, {2}", file.Count(this), mTP.ErrorCount, Tools.Utils.TimeSpanToString(ProgramTime, Tools.Utils.TimePrecision.Second, Tools.Utils.TimePrecision.Second, ",", true)); + mSentPtr.Add(new GrblMessage(string.Format("[{0} lines, {1} errors, {2}]", file.Count(this), mTP.ErrorCount, Tools.Utils.TimeSpanToString(ProgramTime, Tools.Utils.TimePrecision.Second, Tools.Utils.TimePrecision.Second, ",", true)), false)); OnJobEnd(); + Console.Out.WriteLine("*********"); SoundEvent.PlaySound(SoundEvent.EventId.Success); if (ProgramGlobalTime.TotalMinutes >= (int)Settings.GetObject("TelegramNotification.Threshold", 1)) - Telegram.NotifyEvent(String.Format("Job Executed\n{0} lines, {1} errors\nTime: {2}", file.Count, mTP.ErrorCount, Tools.Utils.TimeSpanToString(ProgramGlobalTime, Tools.Utils.TimePrecision.Second, Tools.Utils.TimePrecision.Second, ",", true))); + Telegram.NotifyEvent(String.Format("Job Executed\n{0} lines, {1} errors\nTime: {2}", file.Count(this), mTP.ErrorCount, Tools.Utils.TimeSpanToString(ProgramGlobalTime, Tools.Utils.TimePrecision.Second, Tools.Utils.TimePrecision.Second, ",", true))); ForceStatusIdle(); - } + //} } private bool InPause @@ -2312,13 +2338,11 @@ private void ClearQueue(bool sent) mRetryQueue = null; } - public bool CanReOpenFile + public bool CanReOpenFile(int nLayer) { - get - { - string lastFile = Settings.GetObject("Core.LastOpenFile", null); - return CanLoadNewFile && lastFile != null && System.IO.File.Exists(lastFile); - } + string layerSuffix = nLayer > 0 ? nLayer.ToString() : ""; + string lastFile = Settings.GetObject("Core.LastOpenFile" + layerSuffix, null); + return CanLoadNewFile && lastFile != null && System.IO.File.Exists(lastFile); } public bool CanLoadNewFile @@ -2357,8 +2381,37 @@ public bool CanResumeHold public bool CanReadWriteConfig { get { return IsConnected && !InProgram && (MachineStatus == MacStatus.Idle || MachineStatus == MacStatus.Alarm); } } - public decimal LoopCount - { get { return mLoopCount; } set { mLoopCount = value; if (OnLoopCountChange != null) OnLoopCountChange(mLoopCount); } } + public decimal LoopCount(int nLayer) + { + return mLoopCount[nLayer]; + } + public void LoopCount(int nLayer, decimal value) + { + mLoopCount[nLayer] = value; + if (OnLoopCountChange != null) + { + OnLoopCountChange(mLoopCount[nLayer], nLayer); + } + } + + public bool[] LayerEnabled() + { + return layerEnabled; + } + + public bool LayerEnabled(int nLayer) + { + return layerEnabled[nLayer]; + } + + public void LayerEnabled(int nLayer, bool value) + { + layerEnabled[nLayer] = value; + if (OnLayerEnabledChange != null) + { + OnLayerEnabledChange(layerEnabled[nLayer], nLayer); + } + } private ThreadingMode CurrentThreadingMode { get { return Settings.GetObject("Threading Mode", ThreadingMode.UltraFast); } } @@ -2832,12 +2885,12 @@ public void JobStart(GrblFile file, Queue mQueuePtr, bool global) } } - public void JobContinue(GrblFile file, int position, int added) + public void JobContinue(GrblCore core, GrblFile file, int position, int added) { if (!mStarted) { if (mETarget == TimeSpan.Zero) mETarget = file.EstimatedTime; - if (mTargetCount == 0) mTargetCount = file.Count; + if (mTargetCount == 0) mTargetCount = file.Count(core); //mEProgress = TimeSpan.Zero; if (mStart == 0) mGlobalStart = mStart = Tools.HiResTimer.TotalMilliseconds; diff --git a/LaserGRBL/GrblFile.cs b/LaserGRBL/GrblFile.cs index ed6885641..ecadf3b9b 100644 --- a/LaserGRBL/GrblFile.cs +++ b/LaserGRBL/GrblFile.cs @@ -18,15 +18,15 @@ namespace LaserGRBL { - public class GrblFile : IEnumerable + public class GrblFile { public enum CartesianQuadrant { I, II, III, IV, Mix, Unknown } - public delegate void OnFileLoadedDlg(long elapsed, string filename); + public delegate void OnFileLoadedDlg(long elapsed, string filename, int nLayer); public event OnFileLoadedDlg OnFileLoading; public event OnFileLoadedDlg OnFileLoaded; - private List list = new List(); + private List[] list = { new List(), new List(), new List() }; private ProgramRange mRange = new ProgramRange(); private TimeSpan mEstimatedTotalTime; @@ -41,7 +41,7 @@ public GrblFile(decimal x, decimal y, decimal x1, decimal y1) mRange.UpdateXYRange(new GrblCommand.Element('X', x1), new GrblCommand.Element('Y', y1), false); } - public void SaveGCODE(string filename, bool header, bool footer, bool between, int cycles, GrblCore core) + public void SaveGCODE(string filename, bool header, bool footer, bool between, int[] cycles, GrblCore core) { try { @@ -50,14 +50,20 @@ public void SaveGCODE(string filename, bool header, bool footer, bool between, i if (header) EvaluateAddLines(core, sw, Settings.GetObject("GCode.CustomHeader", GrblCore.GCODE_STD_HEADER)); - for (int i = 0; i < cycles; i++) + for (int j = 0; j < 3; j++) { - foreach (GrblCommand cmd in list) - sw.WriteLine(cmd.Command); + if (between && j > 0) + EvaluateAddLines(core, sw, Settings.GetObject("GCode.CustomPasses", GrblCore.GCODE_STD_PASSES)); + + for (int i = 0; i < cycles[j]; i++) + { + foreach (GrblCommand cmd in list[j]) + sw.WriteLine(cmd.Command); - if (between && i < cycles - 1) - EvaluateAddLines(core, sw, Settings.GetObject("GCode.CustomPasses", GrblCore.GCODE_STD_PASSES)); + if (between && i < cycles[j] - 1) + EvaluateAddLines(core, sw, Settings.GetObject("GCode.CustomPasses", GrblCore.GCODE_STD_PASSES)); + } } if (footer) @@ -83,14 +89,14 @@ private static void EvaluateAddLines(GrblCore core, System.IO.StreamWriter sw, s } } - public void LoadFile(string filename, bool append) + public void LoadFile(string filename, bool append, int nLayer) { - RiseOnFileLoading(filename); + RiseOnFileLoading(filename, nLayer); long start = Tools.HiResTimer.TotalMilliseconds; if (!append) - list.Clear(); + list[nLayer].Clear(); mRange.ResetRange(); if (System.IO.File.Exists(filename)) @@ -103,24 +109,24 @@ public void LoadFile(string filename, bool append) { GrblCommand cmd = new GrblCommand(line); if (!cmd.IsEmpty) - list.Add(cmd); + list[nLayer].Add(cmd); } } } Analyze(); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; - RiseOnFileLoaded(filename, elapsed); + RiseOnFileLoaded(filename, elapsed, nLayer); } - public void LoadImportedSVG(string filename, bool append, GrblCore core) + public void LoadImportedSVG(string filename, bool append, GrblCore core, int nLayer) { - RiseOnFileLoading(filename); + RiseOnFileLoading(filename, nLayer); long start = Tools.HiResTimer.TotalMilliseconds; if (!append) - list.Clear(); + list[nLayer].Clear(); mRange.ResetRange(); @@ -137,14 +143,14 @@ public void LoadImportedSVG(string filename, bool append, GrblCore core) { GrblCommand cmd = new GrblCommand(line); if (!cmd.IsEmpty) - list.Add(cmd); + list[nLayer].Add(cmd); } } Analyze(); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; - RiseOnFileLoaded(filename, elapsed); + RiseOnFileLoaded(filename, elapsed, nLayer); } @@ -296,17 +302,17 @@ public static bool TimeConsumingFilling(RasterConverter.ImageProcessor.Direction dir == RasterConverter.ImageProcessor.Direction.NewSquares; } - public void LoadImagePotrace(Bitmap bmp, string filename, bool UseSpotRemoval, int SpotRemoval, bool UseSmoothing, decimal Smoothing, bool UseOptimize, decimal Optimize, bool useOptimizeFast, L2LConf c, bool append, GrblCore core) + public void LoadImagePotrace(Bitmap bmp, string filename, bool UseSpotRemoval, int SpotRemoval, bool UseSmoothing, decimal Smoothing, bool UseOptimize, decimal Optimize, bool useOptimizeFast, L2LConf c, bool append, GrblCore core, int nLayer) { skipcmd = Settings.GetObject("Disable G0 fast skip", false) ? "G1" : "G0"; - RiseOnFileLoading(filename); + RiseOnFileLoading(filename, nLayer); bmp.RotateFlip(RotateFlipType.RotateNoneFlipY); long start = Tools.HiResTimer.TotalMilliseconds; if (!append) - list.Clear(); + list[nLayer].Clear(); //list.Add(new GrblCommand("G90")); //absolute (Moved to custom Header) @@ -339,20 +345,20 @@ public void LoadImagePotrace(Bitmap bmp, string filename, bool UseSpotRemoval, i using (Bitmap resampled = RasterConverter.ImageTransform.ResizeImage(ptb, new Size((int)(bmp.Width * c.fres / c.res) + 1, (int)(bmp.Height * c.fres / c.res) + 1), true, InterpolationMode.HighQualityBicubic)) { if (c.pwm) - list.Add(new GrblCommand(String.Format("{0} S0", c.lOn))); //laser on and power to zero + list[nLayer].Add(new GrblCommand(String.Format("{0} S0", c.lOn))); //laser on and power to zero else - list.Add(new GrblCommand(String.Format($"{c.lOff} S{core.Configuration.MaxPWM}"))); //laser off and power to max power + list[nLayer].Add(new GrblCommand(String.Format($"{c.lOff} S{core.Configuration.MaxPWM}"))); //laser off and power to max power //set speed to markspeed // For marlin, need to specify G1 each time : // list.Add(new GrblCommand(String.Format("G1 F{0}", c.markSpeed))); - list.Add(new GrblCommand(String.Format("F{0}", c.markSpeed))); + list[nLayer].Add(new GrblCommand(String.Format("F{0}", c.markSpeed))); c.vectorfilling = true; - ImageLine2Line(resampled, c); + ImageLine2Line(resampled, c, nLayer); //laser off - list.Add(new GrblCommand(c.lOff)); + list[nLayer].Add(new GrblCommand(c.lOff)); } } } @@ -362,9 +368,9 @@ public void LoadImagePotrace(Bitmap bmp, string filename, bool UseSpotRemoval, i if (supportPWM) - list.Add(new GrblCommand($"{c.lOn} S0")); //laser on and power to 0 + list[nLayer].Add(new GrblCommand($"{c.lOn} S0")); //laser on and power to 0 else - list.Add(new GrblCommand($"{c.lOff} S{core.Configuration.MaxPWM}")); //laser off and power to maxPower + list[nLayer].Add(new GrblCommand($"{c.lOff} S{core.Configuration.MaxPWM}")); //laser off and power to maxPower //trace raster filling if (flist != null) @@ -375,9 +381,9 @@ public void LoadImagePotrace(Bitmap bmp, string filename, bool UseSpotRemoval, i else gc.AddRange(Potrace.Export2GCode(flist, c.oX, c.oY, c.res, c.lOn, c.lOff, bmp.Size, skipcmd)); - list.Add(new GrblCommand(String.Format("F{0}", c.markSpeed))); + list[nLayer].Add(new GrblCommand(String.Format("F{0}", c.markSpeed))); foreach (string code in gc) - list.Add(new GrblCommand(code)); + list[nLayer].Add(new GrblCommand(code)); } @@ -398,9 +404,9 @@ public void LoadImagePotrace(Bitmap bmp, string filename, bool UseSpotRemoval, i // For marlin, need to specify G1 each time : //list.Add(new GrblCommand(String.Format("G1 F{0}", c.borderSpeed))); - list.Add(new GrblCommand(String.Format("F{0}", c.borderSpeed))); + list[nLayer].Add(new GrblCommand(String.Format("F{0}", c.borderSpeed))); foreach (string code in gc) - list.Add(new GrblCommand(code)); + list[nLayer].Add(new GrblCommand(code)); } //if (supportPWM) @@ -414,24 +420,24 @@ public void LoadImagePotrace(Bitmap bmp, string filename, bool UseSpotRemoval, i //laser off (superflua??) if (supportPWM) - list.Add(new GrblCommand(c.lOff)); //necessaria perché finisce con solo S0 + list[nLayer].Add(new GrblCommand(c.lOff)); //necessaria perché finisce con solo S0 Analyze(); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; - RiseOnFileLoaded(filename, elapsed); + RiseOnFileLoaded(filename, elapsed, nLayer); } - private void RiseOnFileLoaded(string filename, long elapsed) + private void RiseOnFileLoaded(string filename, long elapsed, int nLayer) { if (OnFileLoaded != null) - OnFileLoaded(elapsed, filename); + OnFileLoaded(elapsed, filename, nLayer); } - private void RiseOnFileLoading(string filename) + private void RiseOnFileLoading(string filename, int nLayer) { if (OnFileLoading != null) - OnFileLoading(0, filename); + OnFileLoading(0, filename, nLayer); } public class L2LConf @@ -453,19 +459,19 @@ public class L2LConf } private string skipcmd = "G0"; - public void LoadImageL2L(Bitmap bmp, string filename, L2LConf c, bool append, GrblCore core) + public void LoadImageL2L(Bitmap bmp, string filename, L2LConf c, bool append, GrblCore core, int nLayer) { skipcmd = Settings.GetObject("Disable G0 fast skip", false) ? "G1" : "G0"; - RiseOnFileLoading(filename); + RiseOnFileLoading(filename, nLayer); bmp.RotateFlip(RotateFlipType.RotateNoneFlipY); long start = Tools.HiResTimer.TotalMilliseconds; if (!append) - list.Clear(); + list[nLayer].Clear(); mRange.ResetRange(); @@ -473,21 +479,21 @@ public void LoadImageL2L(Bitmap bmp, string filename, L2LConf c, bool append, Gr //list.Add(new GrblCommand("G90")); //(Moved to custom Header) //move fast to offset (or slow if disable G0) and set mark speed - list.Add(new GrblCommand(String.Format("{0} X{1} Y{2} F{3}", skipcmd, formatnumber(c.oX), formatnumber(c.oY), c.markSpeed))); + list[nLayer].Add(new GrblCommand(String.Format("{0} X{1} Y{2} F{3}", skipcmd, formatnumber(c.oX), formatnumber(c.oY), c.markSpeed))); if (c.pwm) - list.Add(new GrblCommand(String.Format("{0} S0", c.lOn))); //laser on and power to zero + list[nLayer].Add(new GrblCommand(String.Format("{0} S0", c.lOn))); //laser on and power to zero else - list.Add(new GrblCommand($"{c.lOff} S{core.Configuration.MaxPWM}")); //laser off and power to maxpower + list[nLayer].Add(new GrblCommand($"{c.lOff} S{core.Configuration.MaxPWM}")); //laser off and power to maxpower //set speed to markspeed // For marlin, need to specify G1 each time : //list.Add(new GrblCommand(String.Format("G1 F{0}", c.markSpeed))); //list.Add(new GrblCommand(String.Format("F{0}", c.markSpeed))); //replaced by the first move to offset and set speed - ImageLine2Line(bmp, c); + ImageLine2Line(bmp, c, nLayer); //laser off - list.Add(new GrblCommand(c.lOff)); + list[nLayer].Add(new GrblCommand(c.lOff)); //move fast to origin //list.Add(new GrblCommand("G0 X0 Y0")); //moved to custom footer @@ -495,12 +501,12 @@ public void LoadImageL2L(Bitmap bmp, string filename, L2LConf c, bool append, Gr Analyze(); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; - RiseOnFileLoaded(filename, elapsed); + RiseOnFileLoaded(filename, elapsed, nLayer); } // For Marlin, as we sen M106 command, we need to know last color send //private int lastColorSend = 0; - private void ImageLine2Line(Bitmap bmp, L2LConf c) + private void ImageLine2Line(Bitmap bmp, L2LConf c, int nLayer) { bool fast = true; List segments = GetSegments(bmp, c); @@ -545,7 +551,7 @@ private void ImageLine2Line(Bitmap bmp, L2LConf c) } temp = OptimizeLine2Line(temp, c); - list.AddRange(temp); + list[nLayer].AddRange(temp); } @@ -924,8 +930,10 @@ public string formatnumber(double number) private static bool IsEven(int value) { return value % 2 == 0; } - public int Count - { get { return list.Count; } } + public int Count(GrblCore core) + { + return GetList(core).Count; + } public TimeSpan EstimatedTime { get { return mEstimatedTotalTime; } } @@ -952,7 +960,7 @@ public CartesianQuadrant Quadrant } } - internal void DrawOnGraphics(Graphics g, Size size) + internal void DrawOnGraphics(Graphics g, Size size, int nLayer, bool[] enabled) { if (!mRange.MovingRange.ValidRange) return; @@ -964,15 +972,15 @@ internal void DrawOnGraphics(Graphics g, Size size) ScaleAndPosition(g, size, scaleRange, zoom); - DrawJobPreview(g, spb, zoom); + if (enabled[nLayer]) DrawJobPreview(g, spb, zoom, nLayer); DrawJobRange(g, size, zoom); } - private void DrawJobPreview(Graphics g, GrblCommand.StatePositionBuilder spb, float zoom) + private void DrawJobPreview(Graphics g, GrblCommand.StatePositionBuilder spb, float zoom, int nLayer) { bool firstline = true; //used to draw the first line in a different color - foreach (GrblCommand cmd in list) + foreach (GrblCommand cmd in list[nLayer]) { try { @@ -982,11 +990,13 @@ private void DrawJobPreview(Graphics g, GrblCommand.StatePositionBuilder spb, fl if (spb.TrueMovement()) { - Color linecolor = Color.FromArgb(spb.GetCurrentAlpha(mRange.SpindleRange), firstline ? ColorScheme.PreviewFirstMovement : spb.LaserBurning ? ColorScheme.PreviewLaserPower : ColorScheme.PreviewOtherMovement); + Color linecolor = Color.FromArgb(spb.GetCurrentAlpha(mRange.SpindleRange), firstline ? ColorScheme.PreviewFirstMovement : spb.LaserBurning ? ColorScheme.PreviewLaserPower[nLayer] : ColorScheme.PreviewOtherMovement); using (Pen pen = GetPen(linecolor)) { pen.ScaleTransform(1 / zoom, 1 / zoom); + if (nLayer == 2 && !firstline) pen.Width = 2; + if (!spb.LaserBurning) { pen.DashStyle = DashStyle.Dash; @@ -1007,7 +1017,6 @@ private void DrawJobPreview(Graphics g, GrblCommand.StatePositionBuilder spb, fl catch { System.Diagnostics.Debug.WriteLine(String.Format("Ex drwing arc: W{0} H{1}", ah.RectW, ah.RectH)); } } } - } firstline = false; @@ -1018,15 +1027,15 @@ private void DrawJobPreview(Graphics g, GrblCommand.StatePositionBuilder spb, fl } } - internal void LoadImageCenterline(Bitmap bmp, string filename, bool useCornerThreshold, int cornerThreshold, bool useLineThreshold, int lineThreshold, L2LConf conf, bool append, GrblCore core) + internal void LoadImageCenterline(Bitmap bmp, string filename, bool useCornerThreshold, int cornerThreshold, bool useLineThreshold, int lineThreshold, L2LConf conf, bool append, GrblCore core, int nLayer) { - RiseOnFileLoading(filename); + RiseOnFileLoading(filename, nLayer); long start = Tools.HiResTimer.TotalMilliseconds; if (!append) - list.Clear(); + list[nLayer].Clear(); mRange.ResetRange(); @@ -1055,14 +1064,14 @@ internal void LoadImageCenterline(Bitmap bmp, string filename, bool useCornerThr { GrblCommand cmd = new GrblCommand(line); if (!cmd.IsEmpty) - list.Add(cmd); + list[nLayer].Add(cmd); } } Analyze(); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; - RiseOnFileLoaded(filename, elapsed); + RiseOnFileLoaded(filename, elapsed, nLayer); } @@ -1074,25 +1083,29 @@ internal void LoadImageCenterline(Bitmap bmp, string filename, bool useCornerThr mRange.UpdateXYRange("X0", "Y0", false); mEstimatedTotalTime = TimeSpan.Zero; - foreach (GrblCommand cmd in list) + for (int jLayer = 0; jLayer < 3; jLayer++) { - try + + foreach (GrblCommand cmd in list[jLayer]) { - GrblConf conf = Settings.GetObject("Grbl Configuration", new GrblConf()); - TimeSpan delay = spb.AnalyzeCommand(cmd, true, conf); + try + { + GrblConf conf = Settings.GetObject("Grbl Configuration", new GrblConf()); + TimeSpan delay = spb.AnalyzeCommand(cmd, true, conf); - mRange.UpdateSRange(spb.S); + mRange.UpdateSRange(spb.S); - if (spb.LastArcHelperResult != null) - mRange.UpdateXYRange(spb.LastArcHelperResult.BBox.X, spb.LastArcHelperResult.BBox.Y, spb.LastArcHelperResult.BBox.Width, spb.LastArcHelperResult.BBox.Height, spb.LaserBurning); - else - mRange.UpdateXYRange(spb.X, spb.Y, spb.LaserBurning); + if (spb.LastArcHelperResult != null) + mRange.UpdateXYRange(spb.LastArcHelperResult.BBox.X, spb.LastArcHelperResult.BBox.Y, spb.LastArcHelperResult.BBox.Width, spb.LastArcHelperResult.BBox.Height, spb.LaserBurning); + else + mRange.UpdateXYRange(spb.X, spb.Y, spb.LaserBurning); - mEstimatedTotalTime += delay; - cmd.SetOffset(mEstimatedTotalTime); + mEstimatedTotalTime += delay; + cmd.SetOffset(mEstimatedTotalTime); + } + catch (Exception ex) { throw ex; } + finally { cmd.DeleteHelper(); } } - catch (Exception ex) { throw ex; } - finally { cmd.DeleteHelper(); } } } @@ -1280,20 +1293,27 @@ private static void DrawRotatedTextAt(Graphics g, float a, string text, Font f, g.Restore(state); // Restore the graphics state. } - - - System.Collections.Generic.IEnumerator IEnumerable.GetEnumerator() - { return list.GetEnumerator(); } - - - public System.Collections.IEnumerator GetEnumerator() - { return list.GetEnumerator(); } + public List GetList(GrblCore core) + { + List l = new List(); + for (int i = 0; i < 3; i++) + { + if (core.LayerEnabled(i)) + for (int j = 0; j < core.LoopCount(i); j++) + { + IEnumerator e = list[i].GetEnumerator(); + while (e.MoveNext()) + { + GrblCommand cmd = e.Current; + l.Add(cmd); + } + } + } + return l; + } public ProgramRange Range { get { return mRange; } } - public GrblCommand this[int index] - { get { return list[index]; } } - } diff --git a/LaserGRBL/HotKeysManager.cs b/LaserGRBL/HotKeysManager.cs index e54914236..c99d04f65 100644 --- a/LaserGRBL/HotKeysManager.cs +++ b/LaserGRBL/HotKeysManager.cs @@ -231,9 +231,9 @@ private bool PerformAction(Form parent, HotKey.Actions action) case HotKey.Actions.OpenFile: mCore.OpenFile(Application.OpenForms[0]); break; case HotKey.Actions.ReopenLastFile: - mCore.ReOpenFile(Application.OpenForms[0]); break; + mCore.ReOpenFile(Application.OpenForms[0], 0); break; case HotKey.Actions.SaveFile: - mCore.SaveProgram(parent, false, false, false, 1); break; + mCore.SaveProgram(parent, false, false, false, new int[] { 1, 1, 1 }); break; case HotKey.Actions.ExecuteFile: mCore.RunProgram(parent); break; case HotKey.Actions.AbortFile: diff --git a/LaserGRBL/LaserGRBL.csproj b/LaserGRBL/LaserGRBL.csproj index f868f81cc..269f3449d 100644 --- a/LaserGRBL/LaserGRBL.csproj +++ b/LaserGRBL/LaserGRBL.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,7 +9,7 @@ Properties LaserGRBL LaserGRBL - v4.0 + v4.8 512 True False @@ -36,9 +36,10 @@ false false true - 0 + 1 1.0.0.%2a false + true true @@ -54,6 +55,7 @@ false MinimumRecommendedRules.ruleset false + false AnyCPU @@ -66,6 +68,7 @@ true false Off + false False @@ -86,6 +89,42 @@ LaserGRBL.Program + + true + bin\x86\Debug\ + DEBUG;TRACE + true + Full + x86 + false + 7.3 + prompt + false + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + true + PdbOnly + x86 + false + 7.3 + prompt + + + 8B428C6A03EDEE10B26DA36832B096675C63C73C + + + LaserGRBL_TemporaryKey.pfx + + + true + + + true + @@ -107,11 +146,15 @@ Form + PreserveNewest AutotraceTest.cs + PreserveNewest + + + PreserveNewest - @@ -905,6 +948,7 @@ DiscoveryForm.cs + PreserveNewest @@ -946,6 +990,7 @@ AutotraceTest.cs + PreserveNewest NewVersionForm.cs diff --git a/LaserGRBL/MainForm.cs b/LaserGRBL/MainForm.cs index 347f9d822..1ee3cee90 100644 --- a/LaserGRBL/MainForm.cs +++ b/LaserGRBL/MainForm.cs @@ -203,17 +203,17 @@ private void ManageMessage() catch (Exception ex){ System.Diagnostics.Debug.WriteLine(ex); } } - void OnFileLoaded(long elapsed, string filename) + void OnFileLoaded(long elapsed, string filename, int nLayer) { if (InvokeRequired) { - Invoke(new GrblFile.OnFileLoadedDlg(OnFileLoaded), elapsed, filename); + Invoke(new GrblFile.OnFileLoadedDlg(OnFileLoaded), elapsed, filename, nLayer); } else { TimerUpdate(); //TTTFile.Text = System.IO.Path.GetFileName(filename); - TTTLines.Text = Core.LoadedFile.Count.ToString(); + TTTLines.Text = Core.LoadedFile.Count(Core).ToString(); //TTTLoadedIn.Text = elapsed.ToString() + " ms"; TTTEstimated.Text = Tools.Utils.TimeSpanToString(Core.LoadedFile.EstimatedTime, Tools.Utils.TimePrecision.Second, Tools.Utils.TimePrecision.Second, " ,", true); } @@ -366,7 +366,7 @@ void ExitToolStripMenuItemClick(object sender, EventArgs e) private void MnFileOpen_Click(object sender, EventArgs e) { - Project.ClearSettings(); + Project.ClearSettings(0); Core.OpenFile(this); } @@ -448,7 +448,7 @@ private void MnDisconnect_Click(object sender, EventArgs e) } void MnSaveProgramClick(object sender, EventArgs e) { - Core.SaveProgram(this, false, false, false, 1); + Core.SaveProgram(this, false, false, false, new int[]{ 1, 1, 1}); } private void MnAdvancedSave_Click(object sender, EventArgs e) @@ -625,14 +625,14 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData) private void MnReOpenFile_Click(object sender, EventArgs e) { - Project.ClearSettings(); - Core.ReOpenFile(this); + Project.ClearSettings(0); + Core.ReOpenFile(this, 0); } private void fileToolStripMenuItem_DropDownOpening(object sender, EventArgs e) { - MnReOpenFile.Enabled = Core.CanReOpenFile; + MnReOpenFile.Enabled = Core.CanReOpenFile(0); } private void MnHotkeys_Click(object sender, EventArgs e) diff --git a/LaserGRBL/MainForm.resx b/LaserGRBL/MainForm.resx index b8b95ed46..034e83fd0 100644 --- a/LaserGRBL/MainForm.resx +++ b/LaserGRBL/MainForm.resx @@ -148,7 +148,7 @@ ConnectionForm - LaserGRBL.ConnectLogForm, LaserGRBL, Version=4.7.2.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.ConnectLogForm, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null splitContainer1.Panel1 @@ -175,7 +175,7 @@ JogForm - LaserGRBL.JogForm, LaserGRBL, Version=4.7.2.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.JogForm, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null splitContainer1.Panel1 @@ -217,7 +217,7 @@ PreviewForm - LaserGRBL.PreviewForm, LaserGRBL, Version=4.7.2.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.PreviewForm, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null splitContainer1.Panel2 @@ -318,7 +318,7 @@ False - 186, 19 + 402, 19 False @@ -465,7 +465,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAAAFkAAABZAaqdqYYAAAJYSURBVDhPpZJLaBNRGIWPiIX6 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAAAFYAAABWAdxTB5wAAAJYSURBVDhPpZJLaBNRGIWPiIX6 KsVNcVFEN4UidaEudCu4UShWFHRZd4JrRXFjEUQFXelOKC6EdlOUdiOkeUwmmWZeFkqR5jWZzCRpMpOk sY2vXE+naCM+Fro4c+dxz/ef/58LIcR/aeviGRXqM+XCN1TqCRrqadS1ftQNoEl9VQFfAUpJwEkF6gY8 pWbgmRJ8cxGe7vFewNdNaoyA/ej8DVDTgOo7aombTD7rJ1BVHxBaRs0QTDGFj9oR1P+YQH+BmvmSkLs0 @@ -618,7 +618,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6 - JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACrUlE + JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsQAAALEAGtI711AAACrUlE QVQ4T6WO60uTYRjG3/+kz0F9iMjEMnClhZonEMdi1WxoHoZzMzE3DTwhKttCN0MqZROdluiMSkQdw8OG ZjrJaZ42Z21NrWnbxJ2eq/d1JH7wQ+ED1/PcXPf1/O6bAnAmnWr+j44LaftaWNFnDzf22OZrOtevngw1 dC6zZL3rqzKtJVys+ERbJwClrfPDtCDtWGEa+OkDGTS5iWpwc1emnoqVa5dGjF8PyYoTGJ07gFRpQE1z @@ -671,7 +671,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAJxAIA3kywAAACBjSFJNAABu - lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsTAAALEwEAmpwYAAADS0lE + lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsQAAALEAGtI711AAADS0lE QVQ4T6WTWUwTYRDHt6WlLdCWbelWoBR6UUBrKSmHSLlSQJBDQUSKBuEBAkIIBBGFRETReCQKiUEaBW2C BS3BiA8IUjUeqDEeiYLXAxI1PmAMii1XGXeXVn33YTZfZr7/b+abfxYBgP8KRMKmk+HPRJAIsRCNCPTF JBwGIuUy3Fw1sacbIuN5MrRycZCCz3aXoSwanqcQNeICJYBFQaJlIsWw+eKz2wOX36Zq1bEynheFgAQS @@ -704,7 +704,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAJxAIA3kywAAACBjSFJNAABu - lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsTAAALEwEAmpwYAAADQElE + lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsQAAALEAGtI711AAADQElE QVQ4T3WTW0hTcRzHf12o16KnLrq5s013ph4921ymS/M6yyyzmuKclaJGN1pE2kP1UBRdhS4kUVBgF4LC ktIkIy1tF1dTj7u5uemmWallZhbhr7NZRkkPXw7n4fPhx//3/YFMIgOlMgMyM9fBlsKtUFpSCkmrkkAR p4AYaQzIZXKIjqIhRiafX1RUrBSLyNn8EB4ICX4g/xXExcYBzYJSWgpUBDX3/PmLJ0dGPn3PydmUGLR4 @@ -775,7 +775,7 @@ XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+ tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/ - 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEwAACxMBAJqcGAAAA1JJREFUOE91k2tIU2EY + 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEAAACxABrSO9dQAAA1JJREFUOE91k2tIU2EY x5/KCkWoyKwst7mzTXe23Ha2uUyXy9ucTrt7wTktS4NuqNVEK+hqWFJoBcMMMlSi6EMXLLtYZurcMnWZ p2YZlGn3m0QE7elsllHShx/vp//vfXjf/wNKuRLi4nSg1y+GrMxVkJuTC5GLIkEdpoYQRQiolCqQSSkI UaomZ2eviRMJyfG8AC4ICJ6b/wrCQsOAYoIKSgGSeRKPiopjpR8+fPq+fPlKjf9sPyA4AW7+K5hR5Qm+ @@ -804,24 +804,15 @@ - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m - dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAOzSURBVDhPXZNrTNNXGMaff2/SwgrInYC1rNzGuM51 - 4ABBLlIHBQqOtqwtDAuEOzNgUSyi4KU4RI23TMCgg7HEzGW4LFnCNnFzsM4skG4o1Y0sth/mSJjoMpfs - 3dFkidmHX05Oct7nvTzvAeoAmAFhrQi8Kh5Qze5PqWRUMExCf8HbntcFOtF5qLABKgGgDgQKQhlh7MHz - AkYmYGR3A3gsWIhyjuPtEAXJ6yJ+HJo6RWntmYvI4bQo8v+fQC2jGmLOwDMEN4V+HGdJtKdYlLeSO5X2 - hFblXIlV99i5Yqebq59Qw8k24uVLbcgP4kO1gQXWM6qQFNkR9d3+a1Yac56hUbeNht39jEP0nqufLrqO - 0Ynf2qnnYSld/fMs9Y4fJlFe2LvI8uOAGigS9yQtTzou0b77O6np1yI66K6nI64WRjMdcbfQUVcbNSwW - k2o+loZWOmj083HyyntxEq/7eMC3fv3k0PRxUn+fTmWzW+jszGmqPmFeLe/T/lxxyLhcul/3S8dg95NL - i8Nku91NB8eOkc82xRTS/UOwNRzI6Ml4NLJwgQqv59PIjWGSGSMcKMCrKOYCkMWmrsRLEWXRt0c+Gyft - XvNDLj2gi2WWYDNzYksEEN6+8XfdqbceVZ82r2225DxGqaAFWtaaySsIWi8O24MDxSWRCz6F0V9zWX6Z - yPb1wWvSMGzylSNDxmww8sOhgZwhg4bnDTWSJFXSq+Kq9Q7s8AxCQQiHvKAIpL4gQJZ3eVJtzh9NQ11r - ZtuuNbk2+wHLxBZDy5zQMUpQU9RX7Jr49kN62ZzoRAoUrIUAdkoRC7lfpmxmyv4pfUQ2WqQbpG6u/5tV - wAQqOU8Pvcew5f0uurJygWbXpslysufJ9t2lS5ruyrvFnfo7ldZa9/D0xX/6XQ20a1VFE/YPKDgj7aun - 68oX6sXnBq4N0uD9vZR7K4aqf3iDepZaaZ+z6RlWZzPtuVdHJmcuNSwX0pU7k5RtqHqAOHkq8Caf41dI - BqwTvdT3k4XivwghzUwOddobqW1u5zNa52ronbk6OvxNLx24fJySS0ruIVqWh+Qo1nelJ6tiHY+nlgzU - HG2k/psHaGx+lEy7G/9K0ufOp5rUC2mGUodSp3HItuV9uS4uyoKocH/EK4CUaCagl7ABMjRSYKtIn2rO - X7JdPkOKslfuIkEQimRfCRL9vREf4oUUBYdY5lxCJBDPSP5PQMso92W/ywtIF8uFObIRYW7MLLLkgVAG - AJuCWTa2dcoYIE72nEA0/gXai29FZ8MAxwAAAABJRU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wQAADsEBuJFr7QAAAbFJREFUOE+VUqGS7CAQ3M+4X1i5ci0SGRmLRCLHIpFILHJlZCwSGYmNXBnZN0Ny + uUu9eq/eTVUXlcD0zHTP7X9CeQWbLNracPz6XShSiFPE4EfkOf+dJJeMMY4YGHKOwXRIYntXlG2CDQ4u + 0ZWktspJA/xEyC0irYHhfyAgrA60DZi2CMqeSfxOInOpoPBaMmg1sE3Dr/ZE6HAwi4Ze7ohvh8RjGG93 + ApMM4hyg6xND4VlLhI32ACcGC4rc2ZLgF4LPAQOZ7xFE4cSXmpPTnCCClaWeD5a2QFm9VyXuigmOqz3u + 9ICJ3DrbpEh3tY+rMx5MoNzIxAXvbet27lhxa++vj9Yvd0FHPOj5B5FY+GQyxyPZQHgYfX0jI4htYqfm + boT0uOpia8su1AkvBDQUDPYQUkLEpEx4vRPqNrNwvistIor3AtFBnHGb7kVOApk/TOI1QdV7t4waq38B + L1XjlWabxXJJPsV2XFmWQ2y6zx/dTle5UjUdtp/sQOE37II2BnMp1/llPaVdeSSei2WD46r9/IJDSOma + +DNEZVmSkGP3vtv02xC1DQv2ZMWPX/+I2+0TK4fIYkk16gEAAAAASUVORK5CYII= @@ -947,7 +938,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAK - 8AAACvABQqw0mAAAAAd0SU1FB9MCGhU2KcxZSDgAAAIpSURBVDhPtdJfSNNRFAfws5L+DNrcJkGEL0aK + 7QAACu0BAohJwQAAAAd0SU1FB9MCGhU2KcxZSDgAAAIpSURBVDhPtdJfSNNRFAfws5L+DNrcJkGEL0aK abq2oZWUhRGVYFbDCh3OzOafbWxuWi1nrnItM5FNiAZR9JAvBZHpcoqxFKc2beiwKUQvSUlP0mQv5bcf cmEIYj7U5/Ge873ncLn075SSPuVm8gJVUIA0lMNO109ojJ+f/DaOzo9PIL239zd3iZvqSczKf5dgSlh4 GXqOtsE7aBlqQPkLJfi1W77TNSphLWsT1YoWnk50oLHfAOPbUtR4lNB485HhSlwiM/XRbdrNWlcnNsX/ @@ -972,7 +963,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL - EQAACxEBf2RfkQAAAAd0SU1FB9MKBhQLGasV+fsAAAMxSURBVDhPbZNrSJNRGMdfQzBJkTTzk4nTTMsb + DgAACw4BQL7hQQAAAAd0SU1FB9MKBhQLGasV+fsAAAMxSURBVDhPbZNrSJNRGMdfQzBJkTTzk4nTTMsb hmgSmrPyktY+eIH64AL74sQPNqezzOaGCmKQqTPJZrQXF2YaCF3MdjGdipN5xwvLOZ1bTtStFDR9es4Y RJc//Hjfw3P+z3nOOc+h/pZYPFYhkQzbSkraeTj0LCnp5BUUtD1LSLh1GscuiBOZ94/EYqMzfpxqa790 7ezsQ2trvzU/v+W9TDZ6qFYvQVaW4AXGgxGS5E/V12uENK2xikS9vTKZ5ofRaAWt1gRjY0aYmjKDUrkI @@ -1148,7 +1139,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAFYSURBVDhPpdO/SwJhHMfxUyHv + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAFYSURBVDhPpdO/SwJhHMfxUyHv MDwzOk0QpSuzH2gOotOZRDkmkji0JUQpkUq5NOUUZGvtLYFba1tj4FJnRaQUBP0bn55H4TnusSHpAy+e 6fveHgHAv9CNEW7COyJ6Q2+FqXT6Ajx+vUxhCL2lgaCmnaNabZnw+z4+Hag3+m93bYsGgjSgJpNnKBav kc1eMvw+8kXma+8I79omDaj9QCzWQC53hVSqyfDrreeZz8IuXpMZIxAOn0DTmohGG4hEBvi9xTeYLok8 @@ -1166,7 +1157,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAD8SURBVDhPpZO/asJQHEYDgiCt + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAD8SURBVDhPpZO/asJQHEYDgiCt CKKpSEVRkOJQCQ5NHRIyOiXkFfIEyYMJbo7diji1W/0L0pfI9PX3hXpFcbjRwCHcm++cLQaAu+BTFKpC Iyd06Bp1z/NwC3QZ6DiOgziOtUiSJHvToctAz7ZtRFGEIAjO8H0/4/KeWzp0s4BlWQjDEK7rasEtHRX4 eRnh15ngMBzj8Pp+4vL8D7d0VOCrPcC+2cf2oaEFt3RUYPHUxc7sYlMyteCWjgqsPppIN22kq7oesqWj @@ -1183,7 +1174,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAEHSURBVDhPpZOxasJQGIUDglAo + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAEHSURBVDhPpZOxasJQGIUDglAo FLSCUhQlVai69wEclC6iKG4WWnAvdBbsEwndHDvnFbSCyi1VyJb1957b5HqQDgke+Aic+39niyMiF4Gk NRlNPiFw4Dq5XX8kDOf8jYGLgfK2O5D9dGbhcA8O0w/zhQMXA+7mqSu/b++inl8NHDX+6xjcwoFrBtat jvy8TGTXGxo4Ucfgdt1qnwaCIAjP4weOHfB9P6zjB44dUEqFdfzAsQNflZp815qyLLoGTtQxuIVjBxZ3 @@ -1200,7 +1191,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAInSURBVDhPpZNPSNNhHIcHQmK1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAInSURBVDhPpZNPSNNhHIcHQmK1 BFchLcsS0YZUw0CCyoMmNcOYf3Lmn81IUOriTGu0nI7ApJ9NhTnmoTSY/TFTybyY5BQvRiaRRVkjgiCM AukPVIen9x00UTs0euE5fT/Pc3tVwH8h3ypBjCA2TKQjXdWG3H4HyzEKDHcaBU6Md1feJdKVgfijfXbq J66FsI13c368i6FXVxiea8E+0cU5f/eSjXSkKwMJhl4b1aNuSoeaKRhUsI05ePSmksDzKgKzVUwHKrGP @@ -1222,7 +1213,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAADYSURBVDhPpZM7CsJAFEUDAUEQ + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAADYSURBVDhPpZM7CsJAFEUDAUEQ xU9UCIkhSgQbK3UF7kGtBK0s7V2KpaBFLAStUrqP6D4C17mSDCIWM/HBKd7wzunGAPAXnIKgJmhrQoeu YYlSrqHLgJfu2kOXgW66aw/ddyBJkvRJfejIwHATYrqLMN7eMPrge8/gLR0ZCFYH+Osz6ouTErylIwPO fA9nGaI6OyrBWzoycLd9PL0+4qarBG/pyEBk2Xi4AeJWRwne0pGBa8VC7PS0oJMFnEu5gTzQZaAiGAgm @@ -1238,7 +1229,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAFmSURBVDhPpdO9SwJxGAfwAyEI + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAFmSURBVDhPpdO9SwJxGAfwAyEI gqAXksK0zqSUEkJqKDB78ahBUzuXIMGkXWpNdKuhpT+gtTVoa2xrbQw8pVMSX4haG749z70Z0uDVwYd7 nrvf98stJwD4F74GyAhx2sQZzgrj9WQamjhJkIM0OpdJfWbm+x6c5QJPLZ5C56qIz9uCdm8VS2gVStqu zef6ztrGnTOc5QJRjcbwcZPHV/sQ79cZvGWOdUdZg7EbmvkzqHsxLhC1gkpYQvM0h85FAo1cCrVdmT5d @@ -1256,7 +1247,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAFmSURBVDhPpdO9SwJxGAfwAyEI + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAFmSURBVDhPpdO9SwJxGAfwAyEI gqAXksK0zqSUEkJqKDB78ahBUzuXIMGkXWpNdKuhpT+gtTVoa2xrbQw8pVMSX4haG749z70Z0uDVwYd7 nrvf98stJwD4F74GyAhx2sQZzgrj9WQamjhJkIM0OpdJfWbm+x6c5QJPLZ5C56qIz9uCdm8VS2gVStqu zef6ztrGnTOc5QJRjcbwcZPHV/sQ79cZvGWOdUdZg7EbmvkzqHsxLhC1gkpYQvM0h85FAo1cCrVdmT5d @@ -1274,7 +1265,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAFySURBVDhPpZPfK0NhGMdPrdRC + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAFySURBVDhPpZPfK0NhGMdPrdRC 09oPWdvZr7aFJiQzc9gkbsyNUFZ2cMP/IMmFUmPIkrWTEldcELWVSzf8E6O4onahrdTq6zzHcU6NC4en PvW+T+/nc/cyAP4FTZ2IUaRZI+SQy5jF0p+GXAo45bvmIZcCHvmueciVAtVqVV4BLwvzKKVSKKXTeOV5 eft9yFECAS4DbvIUM8vnKM3NopLPo1Io4I1PYHrpDMERAcGxnAI3dYJAeFcNsD3baIkcIjwhoBwNoby2 @@ -1293,7 +1284,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAADoSURBVDhPpZPLCwFRFIeHKY+S + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAADoSURBVDhPpZPLCwFRFIeHKY+S 0ZSyUcpONmw889pIFmRD2WHDjhWLKfKHzsJjEjW72R73N8YVWdzLqa+p0/m+xa1RiOgvMAGGzkhIAgeu Ej81u/QLcBFIHWttui7XQtxWG/cLBy4C6UOxRZfpgs790Tu94YOPPW7hwHUDZq5K1mBMx3pHCNyaucor 4DgOe1C5gcMDtm17a/GBwwOWZXlr8YHDA9qqRPq+RUGjJARu4fBAaJ6n2K5BIaMshHvLHB7wz7IU3dal @@ -1309,7 +1300,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAGFSURBVDhPpZM9SAJhHIcloTCF + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAGFSURBVDhPpZM9SAJhHIcloTCF RMsMNRVPw6zTM0KFyIZAGoJSB4doaQqiIYwgWiSHyJCIzCER+qAhjKKPoZaiGlqFplKLlqagGoTI+HWv SAdpovSDhxvu/zzbywPwL8hqWSQs8iohDnF5TYHINV7fP9hgdSMuCWh6PXEE165w9/hS+FXZiEsCOodv A2Mzh3CP72Ln+Bafua/CSfkRNx+wutfhmdyDc2QLTm8cE/OneHp+K5yVXi6X4wLGgQico9uwDMdgHoqB @@ -1328,7 +1319,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAC+SURBVDhPpZPBCoJAFEUHhCCI + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAC+SURBVDhPpZPBCoJAFEUHhCCI hMgSRJOSIikIWvTfgbuW7Vr2AWM/4Uq4vRvTrFq8sQtn4fDO2WkA/AU3EmZCGggduiaR0qDRZaB038Gj y8DGfQeP7ifQ97170o+OD3Rd5571o+MDz+MZr/0JNlur4C0dH3hUNdrqAJuWKnhLxwfurJY72EWhgrd0 fOCWZGiLLexypYK3dHygiRPYvAqCzjeQX6dzDIEuA7FQC5dA6NA1kTAWJoHQiX7+onpg3gbAKhNU+oiX @@ -1344,7 +1335,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAEcSURBVDhPY/j//z9FGATYgFgI + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAEcSURBVDhPY/j//z9FGATYgFgI iCVIxCA9IL0Moo4z9v13nLgLaCAEOE7e/R8sNm0vXgzSCzJAwa5/5//ClSeh2v+D2UXrzvw/fOsJBj4C pdeduQkyQAFkgDJUH8kApBdswJ8/f6BCqMBzzkGsOHrZ8f/Wk3ciDNCoX/PfrmsbVNv//3oNG/4bdW6F 8rCDb9++IQxQrl/5X6p2LVTq/3/uspX/+WvW/hcHGiTRiInVgIZrtaxBGPD8+XOoVuIBSA/cAMni2f9l @@ -1361,7 +1352,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAG2SURBVDhPpZOxSwJhGIeFICiK + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAG2SURBVDhPpZOxSwJhGIeFICiK IJLKNMXSQAQFB4ccNMqCEhKhwUEj2hLEzUR0ChoiDf8C/wCHgrbGtsZWudM67VIzsxzt1/d+0VFU0NHB w/sd3PN8x3ecBsC/oGuQMc6YUgk55Gq09VAItUAANNVALgVM9c1NtFIpPGQyfDaTSbTSaX7/jWyWT3LI pcBcbX0djVgMd+EwWvv76BQKfMqRCORoFPL29heaiQTIIZcHqsvLkLe28FQsot/r4aVUQvvwEPe7u6ht @@ -1381,7 +1372,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAGASURBVDhPpdNNKMNhAMfxscKi + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAGASURBVDhPpdNNKMNhAMfxscKi /Rl7ifDPlpeFGcbKmpdILLUNpTQtbho15YIoF69JuXFQcuJGLlIubtxc1d+KtZK2TK4/zzPz/PeYg+Wp T8/p9+25PAoA/0JPDqEhDBmiG7pVaLv9x/gJ8X5OeGg4Dd3SgOj0HSG4fsnBxzzndWE5aSVxhwfdNCDS gNE+doippXO4AycM3keJkaRRRMb9zMtMEM99LhowJgJW7z68s6fonDhiEO/jhF0eJuKbRMjZKwdqB/bg @@ -1400,7 +1391,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAADkSURBVDhPpZPNCwFRFEcnUzKl + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAADkSURBVDhPpZPNCwFRFEcnUzKl fKVslLCykpKsLchmIrKjKDtJsaRYKvyLimmEmt1sr/ubxhNZvMet09Sde85iajQi+gtMkIkzKUXgwNWS VrtHvwAXgczZ7NBttZbivtp4TzhwEcidmiZdZ3OyB6N3+j4fe9zCgesFjrUGXYZjslpdKXB7rNVfAdd1 +YOqDRwRcBzHX8sPHBGwbdtfyw8cEYiWlpSoHihU3EqBWzgiYBQWFKvsyeCXMni37IiAnp9SpLxTAs4z @@ -1506,7 +1497,7 @@ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - xAAADsQBlSsOGwAABZ1JREFUWEfN1llTFFcUB/D5AKlKHlKVPOQT5FFUXCIokgRlG2EGmBlkBtxwFAYV + wQAADsEBuJFr7QAABZ1JREFUWEfN1llTFFcUB/D5AKlKHlKVPOQT5FFUXCIokgRlG2EGmBlkBtxwFAYV FAFpVEAkwEUFFzSIgCsIAgISYMBhBxmIoLhUYtQqt5SpJKWxEpWTc7tvT3fPAviUnKrz2r9/33tP31b9 b8qY/+Dz2Lw7Sabc25wpd5IzZU9yMdk3hd43zkXzbeeis+ycPusGp88c5jsqYxC7n4tIo93LaVJt2N2c Zmc3F5Zsxe7g1Nt/wL7GhSRd44KTWhKCNjZ+ylih1ufd+yL2wNTz2AO3ITb3Nphyb4EpZxKM2ROAASBm @@ -1586,7 +1577,7 @@ 8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WPlR7X/aj3Y+uI5ciZUdfRvidB Tx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+lf65+ofviu18cf+mbWTUz/pL/ cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeKj3ofuz55f3q4kLyw8Bv3hPP7 - LAE+RQAAAAlwSFlzAAALEwAACxMBAJqcGAAAA1lJREFUOE9lUmlsy2EYf9//1X+7tjt1B1tW6472b223 + LAE+RQAAAAlwSFlzAAALEAAACxABrSO9dQAAA1lJREFUOE9lUmlsy2EYf9//1X+7tjt1B1tW6472b223 dp0NE3NMyBgLNjN3bAibxtwxs4khiNFI3OKDUSyORF0RIbFGWCdbMHYYX8xmFTHX5vW8c4X9kufL8/x+ z43MZvM/ZjT9NFuCWUyxJalTU4b7gqmsFgtvNBoH8AdgEIMis/zQ6tII9vIB+9I7hxxVN0o3rD2ckz11 RVRkhBFjxPyi/gue42TJ1oSMQznjHzxMZL6/TMbkbc1x8vHLV9Ld3d3X2NDw9shBh2vk8KRMjP5LIsoE @@ -1640,7 +1631,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAKJSURBVDhPpVPZTxpBHFYDGg9Q + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAKJSURBVDhPpVPZTxpBHFYDGg9Q IRrEq54YEQMaj2iMDeAR9MUzEB9M9P+BJ/8KbJs+qLi2olVrNWITkWoUqPewBqWJfcAa/PrbtbB9bif5 dmb2O+Y3M7tpAP4L4mPTbHZdT03FeIeDjzgcTACz20VE/iA5v7Xb+RvSblgsrlQAm5gAHA48jY4iQcDI CJ4nJ8VxYnz8BWNjeKb+iTjY7bgRPMmAy+HhyK+hIdwPDiJG/YXJhKhej582G+4FDAwgJnCEaH8/BO2l @@ -1710,7 +1701,7 @@ XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+ tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/ - 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEwAACxMBAJqcGAAABZdJREFUWEfFl1tMVFcU + 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEAAACxABrSO9dQAABZdJREFUWEfFl1tMVFcU hkfTpkkfGpOmbRpN06R960Of25f20bRNGp9aQKltrDVWQAEZkIuAl6IiKjrAADOMdYR6qVipiKAVuViq 4oVG6zAzaLhVYGYYhmHu079r7TNnAD0O8yKS/GzOPmev/e1/r3XORgXghUqxczE170J3qm1Z7cnWPdRO 1p5oddfMyqOtb/7niOFs+V6N8UOVSrWUtITHVB5r+qDS+PsBvs/PyWN4PMVyUn+purjsjciYpXPnY0X/ @@ -1838,7 +1829,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAArJJREFUOE9jIBYYR9YL6wbW7NMPbTyvF9pwXieo5pheYL0oVBoV6EROE4Ay4UA3 + wAAADsABataJCQAAArJJREFUOE9jIBYYR9YL6wbW7NMPbTyvF9pwXieo5pheYL0oVBoV6EROE4Ay4UA3 sDpEN6h6p25gha8WEAP5m4AGBkOlIQCowFYvuH6/fmjTAb2Qun3awdWWUCkGvaC6GEWP0sOiNpndIKzo XnJAJ6QuCirNwKAdUK2kG1RzSze41kPNt5RHL6jRB2jLTc2gajmQvIZfxdTYxpX/c3rW/MzuXvMzoWXV fy3/qqlgzSCgG1RbDdTQDeWCAdDAiUBXlYLYiu5FMzZffPP/6d///x///v9/7+3P/9W8SmeCFYIAUGE7 @@ -1865,7 +1856,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAJxAIA3kywAAACBjSFJNAABu - lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsTAAALEwEAmpwYAAADm0lE + lQAAdA4AAPGBAACFRgAAZO0AAPeGAABJ4gAAHljF0QxvAAAACXBIWXMAAAsQAAALEAGtI711AAADm0lE QVQ4T1VTa0yTZxh9d5OfbkRI8FLKpbrEZWJLS102Ycl+zVlk082pGSOGZXHZRYNLxprQIdTS2lLaMqBQ CqmDQkIKSAxS+WihtqXlIqjYdhUoLbeKwv4si8s8e7+yZdmP53u+H9855znPdx6SnZFJTn18mnzz3SUi FonJ5bLLImtnp5xhmJtuj9c1PMzcqjfo1aXnS9/OP1pAMtO5CQyPFtsTjw8/OkUufPX1zo7r1/WB+aXf @@ -1920,7 +1911,7 @@ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - xAAADsQBlSsOGwAABZ1JREFUWEfN1llTFFcUB/D5AKlKHlKVPOQT5FFUXCIokgRlG2EGmBlkBtxwFAYV + wQAADsEBuJFr7QAABZ1JREFUWEfN1llTFFcUB/D5AKlKHlKVPOQT5FFUXCIokgRlG2EGmBlkBtxwFAYV FAFpVEAkwEUFFzSIgCsIAgISYMBhBxmIoLhUYtQqt5SpJKWxEpWTc7tvT3fPAviUnKrz2r9/33tP31b9 b8qY/+Dz2Lw7Sabc25wpd5IzZU9yMdk3hd43zkXzbeeis+ycPusGp88c5jsqYxC7n4tIo93LaVJt2N2c Zmc3F5Zsxe7g1Nt/wL7GhSRd44KTWhKCNjZ+ylih1ufd+yL2wNTz2AO3ITb3Nphyb4EpZxKM2ROAASBm @@ -1959,7 +1950,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAG - tgAABrYB8zSmegAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAGESURBVDhPY0AG + swAABrMB3o7DjAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAGESURBVDhPY0AG 2toNbCrWDX4qNo2hKNiy0V3DpkENqgw3AClWtW74jxPbNNxSsmtWhSrHBEBFTRia0LCaTcMlqHJMAHT+ NlQN9WgYaIB1w2+ockygalV/H6ZZxbzqv5JuKhpO/69iUvBCYs5NM6gWZNDABDT9F9wAkyIsBqT+V7Qu +y8+8+onlUm32aEaIQDoNyWYZhBWNszBaoBM7qr/4rOv/xedc1UFqhUCgLZ7IRugpJuGoVk+oAesGYyn @@ -1978,7 +1969,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAK - 8AAACvABQqw0mAAAAAd0SU1FB9MDBhERIE/mK7IAAAI8SURBVDhPrZFNbxJRFIZv/PgNykbd6c7Elf4B + 7QAACu0BAohJwQAAAAd0SU1FB9MDBhERIE/mK7IAAAI8SURBVDhPrZFNbxJRFIZv/PgNykbd6c7Elf4B N41xrcatiV20CqSBKhObkNCFoU1LTRzaNMQSsLGh1kKDhEgNDQVrCqQGkS+ZDB+1lRRKylBgXu/AddHo gkXf5GbunDnPe+acQ05VHPflnNcrPHC5Up5AIF/Z2MjLgUBaXl2NV+bmfO7paff99fWPZ1n6SaVSuBYM /o6J4hH+p3od2Noqguc/RB2OT1cZ1lM4fHRlc7Oyy3Ihy0BD6oDcmge5OY9KBdjfB4pFoFAAZmffly0W @@ -2118,9 +2109,6 @@ AD//4AD//+AB///gAf//4AH///AD///wA/8= - - NoControl - 4, 4, 4, 4 diff --git a/LaserGRBL/PSHelper/MaterialDB.Designer.cs b/LaserGRBL/PSHelper/MaterialDB.Designer.cs index a4b2ef8cc..f5fbff6f9 100644 --- a/LaserGRBL/PSHelper/MaterialDB.Designer.cs +++ b/LaserGRBL/PSHelper/MaterialDB.Designer.cs @@ -29,7 +29,7 @@ public partial class MaterialDB : global::System.Data.DataSet { private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public MaterialDB() { this.BeginInit(); this.InitClass(); @@ -40,7 +40,7 @@ public MaterialDB() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected MaterialDB(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context, false) { if ((this.IsBinarySerialized(info, context) == true)) { @@ -76,7 +76,7 @@ protected MaterialDB(global::System.Runtime.Serialization.SerializationInfo info } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public MaterialsDataTable Materials { @@ -86,7 +86,7 @@ public MaterialsDataTable Materials { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { @@ -99,7 +99,7 @@ public MaterialsDataTable Materials { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new global::System.Data.DataTableCollection Tables { get { @@ -108,7 +108,7 @@ public MaterialsDataTable Materials { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new global::System.Data.DataRelationCollection Relations { get { @@ -117,7 +117,7 @@ public MaterialsDataTable Materials { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void InitializeDerivedDataSet() { this.BeginInit(); this.InitClass(); @@ -125,7 +125,7 @@ protected override void InitializeDerivedDataSet() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataSet Clone() { MaterialDB cln = ((MaterialDB)(base.Clone())); cln.InitVars(); @@ -134,19 +134,19 @@ protected override void InitializeDerivedDataSet() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override bool ShouldSerializeTables() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override bool ShouldSerializeRelations() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { this.Reset(); @@ -171,7 +171,7 @@ protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); @@ -180,13 +180,13 @@ protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.InitVars(true); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars(bool initTable) { this.tableMaterials = ((MaterialsDataTable)(base.Tables["Materials"])); if ((initTable == true)) { @@ -197,7 +197,7 @@ internal void InitVars(bool initTable) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.DataSetName = "MaterialDB"; this.Prefix = ""; @@ -209,13 +209,13 @@ private void InitClass() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializeMaterials() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { this.InitVars(); @@ -223,7 +223,7 @@ private void SchemaChanged(object sender, global::System.ComponentModel.Collecti } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { MaterialDB ds = new MaterialDB(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); @@ -269,7 +269,7 @@ private void SchemaChanged(object sender, global::System.ComponentModel.Collecti return type; } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void MaterialsRowChangeEventHandler(object sender, MaterialsRowChangeEvent e); /// @@ -300,7 +300,7 @@ public partial class MaterialsDataTable : global::System.Data.TypedTableBase ///Row event argument class /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class MaterialsRowChangeEvent : global::System.EventArgs { private MaterialsRow eventRow; @@ -831,14 +831,14 @@ public class MaterialsRowChangeEvent : global::System.EventArgs { private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public MaterialsRowChangeEvent(MaterialsRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public MaterialsRow Row { get { return this.eventRow; @@ -846,7 +846,7 @@ public MaterialsRow Row { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; diff --git a/LaserGRBL/PSHelper/MaterialDB.cs b/LaserGRBL/PSHelper/MaterialDB.cs index f2e1dc600..3423fa94d 100644 --- a/LaserGRBL/PSHelper/MaterialDB.cs +++ b/LaserGRBL/PSHelper/MaterialDB.cs @@ -7,178 +7,178 @@ namespace LaserGRBL.PSHelper { - partial class MaterialDB - { - partial class MaterialsDataTable - { - public override void EndInit() - { - base.EndInit(); - TableNewRow += MaterialsDataTable_TableNewRow; - } - - private void MaterialsDataTable_TableNewRow(object sender, DataTableNewRowEventArgs e) - { - //throw new NotImplementedException(); - } - - protected override void OnTableNewRow(DataTableNewRowEventArgs e) - { - base.OnTableNewRow(e); - - MaterialsRow target = e.Row as MaterialsRow; - MaterialsRow last = GetLastNotDeleted(); - - if (target != null) - { - target.id = Guid.NewGuid(); - - if (last != null) - { - target.Model = last.Model; - target.Material = last.Material; - } - } - } - - private MaterialsRow GetLastNotDeleted() - { - for (int i = Rows.Count - 1; i >= 0; i--) - if (Rows[i].RowState != DataRowState.Deleted) - return Rows[i] as MaterialsRow; - - return null; - } - - protected override void OnColumnChanging(DataColumnChangeEventArgs e) - { - if (e.Column == PowerColumn && (int)e.ProposedValue < 5) - throw new Exception("Please enter a valid power level (Min 5%)"); - if (e.Column == PowerColumn && (int)e.ProposedValue > 100) - throw new Exception("Please enter a valid power level (Max 100%)"); - - if (e.Column == SpeedColumn && (int)e.ProposedValue < 1) - throw new Exception("Please enter a valid speed (Min 1 mm/min)"); - if (e.Column == SpeedColumn && (int)e.ProposedValue > 100000) - throw new Exception("Please enter a valid speed (Max 100000 mm/min)"); - - if (e.Column == CyclesColumn && (int)e.ProposedValue < 1) - throw new Exception("Please enter a valid cycles number (Min 1 cycles)"); - if (e.Column == CyclesColumn && (int)e.ProposedValue >= 100) - throw new Exception("Please enter a valid cycles number (Max 99 cycles)"); - - base.OnColumnChanging(e); - } - - private IEnumerable EnabledRows { get => this.Where(x => x.Visible); } - - - internal object[] Models() - { - return EnabledRows.Select(x => x.Model).Distinct().OrderBy(s => s).ToArray(); - } - - internal object[] Materials(string model) - { - return EnabledRows.Where(x => x.Model == model).Select(x => x.Material).Distinct().OrderBy(s => s).ToArray(); - } - - internal object[] Thickness(string model, string material, string action) - { - return EnabledRows.Where(x => x.Model == model && x.Material == material && x.Action == action).Select(x => x.Thickness).Distinct().OrderBy(s => s).ToArray(); - } - - - internal object[] Actions(string model, string material) - { - return EnabledRows.Where(x => x.Model == model && x.Material == material).Select(x => x.Action).Distinct().OrderBy(s => s).ToArray(); - } - - internal MaterialsRow GetResult(string model, string material, string action, string thickness) - { - return EnabledRows.Where(x => x.Model == model && x.Material == material && x.Thickness == thickness && x.Action == action).First(); - } - } - - private MaterialsDataTable FromServer = new MaterialsDataTable(); - - public static MaterialDB Load() - { - MaterialDB rv = new MaterialDB(); - try - { - MaterialsDataTable user = new MaterialsDataTable() { Namespace = rv.Namespace }; - MaterialsDataTable server = new MaterialsDataTable() { Namespace = rv.Namespace }; - - if (System.IO.File.Exists(UserFile)) - user.ReadXml(UserFile); - - if (System.IO.File.Exists(ServerFile)) - server.ReadXml(ServerFile); - - foreach (var row in user) - rv.Materials.ImportRow(row); - - if (rv.Materials.Rows.Count == 0) - { - foreach (var row in server) - rv.Materials.ImportRow(row); - } - else - { - foreach (var row in server) - if (rv.Materials.FindByid(row.id) == null) - rv.FromServer.ImportRow(row); //nuove dal server - } - } - catch { } - - rv.Materials.AcceptChanges(); - - if (rv.GetNewCount() > 0) - { - rv.ImportServer(); //carica da file aggiornato - rv.SaveChanges(); //salva se c'é qualche aggiornamento - } - - return rv; - } - - internal void SaveChanges() - { - try - { - if (Materials.GetChanges() != null) - { - Materials.AcceptChanges(); - Materials.WriteXml(UserFile); - } - } - catch { } - } - - internal int GetNewCount() - { - int count = 0; - foreach (var row in FromServer) - if (Materials.FindByid(row.id) == null) - count++; - return count; - } - - internal void ImportServer() - { - try - { - foreach (var row in FromServer) - if (Materials.FindByid(row.id) == null) - Materials.ImportRow(row); //nuove dal server - } - catch { } - } - - - private static string UserFile { get => System.IO.Path.Combine(LaserGRBL.GrblCore.DataPath, "UserMaterials.psh"); } - private static string ServerFile { get => System.IO.Path.Combine(LaserGRBL.GrblCore.ExePath, "StandardMaterials.psh"); } - } + partial class MaterialDB + { + partial class MaterialsDataTable + { + public override void EndInit() + { + base.EndInit(); + TableNewRow += MaterialsDataTable_TableNewRow; + } + + private void MaterialsDataTable_TableNewRow(object sender, DataTableNewRowEventArgs e) + { + //throw new NotImplementedException(); + } + + protected override void OnTableNewRow(DataTableNewRowEventArgs e) + { + base.OnTableNewRow(e); + + MaterialsRow target = e.Row as MaterialsRow; + MaterialsRow last = GetLastNotDeleted(); + + if (target != null) + { + target.id = Guid.NewGuid(); + + if (last != null) + { + target.Model = last.Model; + target.Material = last.Material; + } + } + } + + private MaterialsRow GetLastNotDeleted() + { + for (int i = Rows.Count - 1; i >= 0; i--) + if (Rows[i].RowState != DataRowState.Deleted) + return Rows[i] as MaterialsRow; + + return null; + } + + protected override void OnColumnChanging(DataColumnChangeEventArgs e) + { + if (e.Column == PowerColumn && (int)e.ProposedValue < 5) + throw new Exception("Please enter a valid power level (Min 5%)"); + if (e.Column == PowerColumn && (int)e.ProposedValue > 100) + throw new Exception("Please enter a valid power level (Max 100%)"); + + if (e.Column == SpeedColumn && (int)e.ProposedValue < 1) + throw new Exception("Please enter a valid speed (Min 1 mm/min)"); + if (e.Column == SpeedColumn && (int)e.ProposedValue > 100000) + throw new Exception("Please enter a valid speed (Max 100000 mm/min)"); + + if (e.Column == CyclesColumn && (int)e.ProposedValue < 1) + throw new Exception("Please enter a valid cycles number (Min 1 cycles)"); + if (e.Column == CyclesColumn && (int)e.ProposedValue >= 100) + throw new Exception("Please enter a valid cycles number (Max 99 cycles)"); + + base.OnColumnChanging(e); + } + + private IEnumerable EnabledRows { get => this.Where(x => x.Visible); } + + + internal object[] Models() + { + return EnabledRows.Select(x => x.Model).Distinct().OrderBy(s => s).ToArray(); + } + + internal object[] Materials(string model) + { + return EnabledRows.Where(x => x.Model == model).Select(x => x.Material).Distinct().OrderBy(s => s).ToArray(); + } + + internal object[] Thickness(string model, string material, string action) + { + return EnabledRows.Where(x => x.Model == model && x.Material == material && x.Action == action).Select(x => x.Thickness).Distinct().OrderBy(s => s).ToArray(); + } + + + internal object[] Actions(string model, string material) + { + return EnabledRows.Where(x => x.Model == model && x.Material == material).Select(x => x.Action).Distinct().OrderBy(s => s).ToArray(); + } + + internal MaterialsRow GetResult(string model, string material, string action, string thickness) + { + return EnabledRows.Where(x => x.Model == model && x.Material == material && x.Thickness == thickness && x.Action == action).First(); + } + } + + private MaterialsDataTable FromServer = new MaterialsDataTable(); + + public static MaterialDB Load() + { + MaterialDB rv = new MaterialDB(); + try + { + MaterialsDataTable user = new MaterialsDataTable() { Namespace = rv.Namespace }; + MaterialsDataTable server = new MaterialsDataTable() { Namespace = rv.Namespace }; + + if (System.IO.File.Exists(UserFile)) + user.ReadXml(UserFile); + + if (System.IO.File.Exists(ServerFile)) + server.ReadXml(ServerFile); + + foreach (var row in user) + rv.Materials.ImportRow(row); + + if (rv.Materials.Rows.Count == 0) + { + foreach (var row in server) + rv.Materials.ImportRow(row); + } + else + { + foreach (var row in server) + if (rv.Materials.FindByid(row.id) == null) + rv.FromServer.ImportRow(row); //nuove dal server + } + } + catch { } + + rv.Materials.AcceptChanges(); + + if (rv.GetNewCount() > 0) + { + rv.ImportServer(); //carica da file aggiornato + rv.SaveChanges(); //salva se c'é qualche aggiornamento + } + + return rv; + } + + internal void SaveChanges() + { + try + { + if (Materials.GetChanges() != null) + { + Materials.AcceptChanges(); + Materials.WriteXml(UserFile); + } + } + catch { } + } + + internal int GetNewCount() + { + int count = 0; + foreach (var row in FromServer) + if (Materials.FindByid(row.id) == null) + count++; + return count; + } + + internal void ImportServer() + { + try + { + foreach (var row in FromServer) + if (Materials.FindByid(row.id) == null) + Materials.ImportRow(row); //nuove dal server + } + catch { } + } + + + private static string UserFile { get => System.IO.Path.Combine(LaserGRBL.GrblCore.DataPath, "UserMaterials.psh"); } + private static string ServerFile { get => System.IO.Path.Combine(LaserGRBL.GrblCore.ExePath, "StandardMaterials.psh"); } + } } diff --git a/LaserGRBL/RasterConverter/ImageProcessor.cs b/LaserGRBL/RasterConverter/ImageProcessor.cs index 2e80e73f5..a774d74df 100644 --- a/LaserGRBL/RasterConverter/ImageProcessor.cs +++ b/LaserGRBL/RasterConverter/ImageProcessor.cs @@ -80,6 +80,7 @@ public class ImageProcessor : ICloneable public int MaxPower; private string mFileName; + private int nLayer; private bool mAppend; GrblCore mCore; @@ -110,10 +111,11 @@ public enum Direction NewInsetFilling, } - public ImageProcessor(GrblCore core, string fileName, Size boxSize, bool append) + public ImageProcessor(GrblCore core, string fileName, Size boxSize, bool append, int nLayer) { mCore = core; mFileName = fileName; + this.nLayer = nLayer; mAppend = append; mSuspended = true; //mOriginal = new Bitmap(fileName); @@ -1052,11 +1054,11 @@ void DoTrueWork() conf.firmwareType = Settings.GetObject("Firmware Type", Firmware.Grbl); if (SelectedTool == Tool.Line2Line || SelectedTool == Tool.Dithering || SelectedTool == Tool.NoProcessing) - mCore.LoadedFile.LoadImageL2L(bmp, mFileName, conf, mAppend, mCore); + mCore.LoadedFile.LoadImageL2L(bmp, mFileName, conf, mAppend, mCore, nLayer); else if (SelectedTool == Tool.Vectorize) - mCore.LoadedFile.LoadImagePotrace(bmp, mFileName, UseSpotRemoval, (int)SpotRemoval, UseSmoothing, Smoothing, UseOptimize, Optimize, OptimizeFast, conf, mAppend, mCore); + mCore.LoadedFile.LoadImagePotrace(bmp, mFileName, UseSpotRemoval, (int)SpotRemoval, UseSmoothing, Smoothing, UseOptimize, Optimize, OptimizeFast, conf, mAppend, mCore, nLayer); else if (SelectedTool == Tool.Centerline) - mCore.LoadedFile.LoadImageCenterline(bmp, mFileName, UseCornerThreshold, CornerThreshold, UseLineThreshold, LineThreshold, conf, mAppend, mCore); + mCore.LoadedFile.LoadImageCenterline(bmp, mFileName, UseCornerThreshold, CornerThreshold, UseLineThreshold, LineThreshold, conf, mAppend, mCore, nLayer); } if (GenerationComplete != null) diff --git a/LaserGRBL/RasterConverter/RasterToLaserForm.cs b/LaserGRBL/RasterConverter/RasterToLaserForm.cs index 507a84452..899c3ac6c 100644 --- a/LaserGRBL/RasterConverter/RasterToLaserForm.cs +++ b/LaserGRBL/RasterConverter/RasterToLaserForm.cs @@ -20,14 +20,16 @@ namespace LaserGRBL.RasterConverter public partial class RasterToLaserForm : Form { GrblCore mCore; - ImageProcessor IP; + ImageProcessor IP; bool preventClose; bool supportPWM = Settings.GetObject("Support Hardware PWM", true); + private int nLayer; - private RasterToLaserForm(GrblCore core, string filename, bool append) + private RasterToLaserForm(GrblCore core, string filename, bool append, int nLayer) { InitializeComponent(); mCore = core; + this.nLayer = nLayer; UDQuality.Maximum = UDFillingQuality.Maximum = GetMaxQuality(); @@ -35,7 +37,7 @@ private RasterToLaserForm(GrblCore core, string filename, bool append) GbCenterlineOptions.ForeColor = GbConversionTool.ForeColor = GbLineToLineOptions.ForeColor = GbParameters.ForeColor = GbVectorizeOptions.ForeColor = ForeColor = ColorScheme.FormForeColor; BtnCancel.BackColor = BtnCreate.BackColor = ColorScheme.FormButtonsColor; - IP = new ImageProcessor(core, filename, GetImageSize(), append); + IP = new ImageProcessor(core, filename, GetImageSize(), append, nLayer); //PbOriginal.Image = IP.Original; ImageProcessor.PreviewReady += OnPreviewReady; ImageProcessor.PreviewBegin += OnPreviewBegin; @@ -139,16 +141,23 @@ void OnPreviewReady(Image img) private static Image CreatePaper(Image img) { - Image newimage = new Bitmap(img.Width + 6, img.Height + 6); - using (Graphics g = Graphics.FromImage(newimage)) + try + { + Image newimage = new Bitmap(img.Width + 6, img.Height + 6); + using (Graphics g = Graphics.FromImage(newimage)) + { + g.Clear(Color.Transparent); + g.FillRectangle(Brushes.Gray, 6, 6, img.Width + 2, img.Height + 2); //ombra + g.FillRectangle(Brushes.White, 0, 0, img.Width + 2, img.Height + 2); //pagina + g.DrawRectangle(Pens.LightGray, 0, 0, img.Width + 1, img.Height + 1); //bordo + g.DrawImage(img, 1, 1); //disegno + } + return newimage; + } + catch (Exception ex) { - g.Clear(Color.Transparent); - g.FillRectangle(Brushes.Gray, 6, 6, img.Width + 2, img.Height + 2); //ombra - g.FillRectangle(Brushes.White, 0, 0, img.Width + 2, img.Height + 2); //pagina - g.DrawRectangle(Pens.LightGray, 0, 0, img.Width + 1, img.Height + 1); //bordo - g.DrawImage(img, 1, 1); //disegno + return null; } - return newimage; } void WTTick(object sender, EventArgs e) @@ -158,9 +167,9 @@ void WTTick(object sender, EventArgs e) WB.Running = true; } - internal static void CreateAndShowDialog(GrblCore core, string filename, Form parent, bool append) + internal static void CreateAndShowDialog(GrblCore core, string filename, Form parent, bool append, int nLayer) { - using (RasterToLaserForm f = new RasterToLaserForm(core, filename, append)) + using (RasterToLaserForm f = new RasterToLaserForm(core, filename, append, nLayer)) f.ShowDialog(parent); } @@ -195,7 +204,7 @@ void BtnCreateClick(object sender, EventArgs e) ResumeLayout(); StoreSettings(); - Project.AddSettings(GetActualSettings()); // Store project settings + Project.AddSettings(GetActualSettings(), nLayer); // Store project settings IP.GenerateGCode(); //processo asincrono che ritorna con l'evento "OnGenerationComplete" } @@ -250,51 +259,53 @@ private void StoreSettings() private void LoadSettings() { - if ((IP.SelectedTool = Settings.GetObject("GrayScaleConversion.RasterConversionTool", ImageProcessor.Tool.Line2Line)) == ImageProcessor.Tool.Line2Line) + string layerPrefix = nLayer > 0 ? nLayer.ToString() + "." : ""; + + if ((IP.SelectedTool = Settings.GetObject(layerPrefix+"GrayScaleConversion.RasterConversionTool", ImageProcessor.Tool.Line2Line)) == ImageProcessor.Tool.Line2Line) RbLineToLineTracing.Checked = true; - else if ((IP.SelectedTool = Settings.GetObject("GrayScaleConversion.RasterConversionTool", ImageProcessor.Tool.Line2Line)) == ImageProcessor.Tool.Dithering) + else if ((IP.SelectedTool = Settings.GetObject(layerPrefix+"GrayScaleConversion.RasterConversionTool", ImageProcessor.Tool.Line2Line)) == ImageProcessor.Tool.Dithering) RbDithering.Checked = true; - else if ((IP.SelectedTool = Settings.GetObject("GrayScaleConversion.RasterConversionTool", ImageProcessor.Tool.Line2Line)) == ImageProcessor.Tool.Centerline) + else if ((IP.SelectedTool = Settings.GetObject(layerPrefix+"GrayScaleConversion.RasterConversionTool", ImageProcessor.Tool.Line2Line)) == ImageProcessor.Tool.Centerline) RbCenterline.Checked = true; else RbVectorize.Checked = true; - CbDirections.SelectedItem = IP.LineDirection = Settings.GetObject("GrayScaleConversion.Line2LineOptions.Direction", ImageProcessor.Direction.Horizontal); - UDQuality.Value = IP.Quality = Math.Min(UDQuality.Maximum, Settings.GetObject("GrayScaleConversion.Line2LineOptions.Quality", 3.0m)); - CbLinePreview.Checked = IP.LinePreview = Settings.GetObject("GrayScaleConversion.Line2LineOptions.Preview", false); - - CbSpotRemoval.Checked = IP.UseSpotRemoval = Settings.GetObject("GrayScaleConversion.VectorizeOptions.SpotRemoval.Enabled", false); - UDSpotRemoval.Value = IP.SpotRemoval = Settings.GetObject("GrayScaleConversion.VectorizeOptions.SpotRemoval.Value", 2.0m); - CbSmoothing.Checked = IP.UseSmoothing = Settings.GetObject("GrayScaleConversion.VectorizeOptions.Smooting.Enabled", false); - UDSmoothing.Value = IP.Smoothing = Settings.GetObject("GrayScaleConversion.VectorizeOptions.Smooting.Value", 1.0m); - CbOptimize.Checked = IP.UseOptimize = Settings.GetObject("GrayScaleConversion.VectorizeOptions.Optimize.Enabled", false); - CbAdaptiveQuality.Checked = IP.UseAdaptiveQuality = Settings.GetObject("GrayScaleConversion.VectorizeOptions.UseAdaptiveQuality.Enabled", false); - UDOptimize.Value = IP.Optimize = Settings.GetObject("GrayScaleConversion.VectorizeOptions.Optimize.Value", 0.2m); - CbDownSample.Checked = IP.UseDownSampling = Settings.GetObject("GrayScaleConversion.VectorizeOptions.DownSample.Enabled", false); - UDDownSample.Value = IP.DownSampling = Settings.GetObject("GrayScaleConversion.VectorizeOptions.DownSample.Value", 2.0m); - CbOptimizeFast.Checked = IP.OptimizeFast = Settings.GetObject("GrayScaleConversion.VectorizeOptions.OptimizeFast.Enabled", false); - - CbFillingDirection.SelectedItem = IP.FillingDirection = Settings.GetObject("GrayScaleConversion.VectorizeOptions.FillingDirection", ImageProcessor.Direction.None); - UDFillingQuality.Value = IP.FillingQuality = Math.Min(UDFillingQuality.Maximum, Settings.GetObject("GrayScaleConversion.VectorizeOptions.FillingQuality", 3.0m)); - - CbResize.SelectedItem = IP.Interpolation = Settings.GetObject("GrayScaleConversion.Parameters.Interpolation", InterpolationMode.HighQualityBicubic); - CbMode.SelectedItem = IP.Formula = Settings.GetObject("GrayScaleConversion.Parameters.Mode", ImageTransform.Formula.SimpleAverage); - TBRed.Value = IP.Red = Settings.GetObject("GrayScaleConversion.Parameters.R", 100); - TBGreen.Value = IP.Green = Settings.GetObject("GrayScaleConversion.Parameters.G", 100); - TBBlue.Value = IP.Blue = Settings.GetObject("GrayScaleConversion.Parameters.B", 100); - TbBright.Value = IP.Brightness = Settings.GetObject("GrayScaleConversion.Parameters.Brightness", 100); - TbContrast.Value = IP.Contrast = Settings.GetObject("GrayScaleConversion.Parameters.Contrast", 100); - CbThreshold.Checked = IP.UseThreshold = Settings.GetObject("GrayScaleConversion.Parameters.Threshold.Enabled", false); - TbThreshold.Value = IP.Threshold = Settings.GetObject("GrayScaleConversion.Parameters.Threshold.Value", 50); - TBWhiteClip.Value = IP.WhiteClip = Settings.GetObject("GrayScaleConversion.Parameters.WhiteClip", 5); - - CbDither.SelectedItem = Settings.GetObject("GrayScaleConversion.DitheringOptions.DitheringMode", ImageTransform.DitheringMode.FloydSteinberg); - - CbLineThreshold.Checked = IP.UseLineThreshold = Settings.GetObject("GrayScaleConversion.VectorizeOptions.LineThreshold.Enabled", true); - TBLineThreshold.Value = IP.LineThreshold = Settings.GetObject("GrayScaleConversion.VectorizeOptions.LineThreshold.Value", 10); - - CbCornerThreshold.Checked = IP.UseCornerThreshold = Settings.GetObject("GrayScaleConversion.VectorizeOptions.CornerThreshold.Enabled", true); - TBCornerThreshold.Value = IP.CornerThreshold = Settings.GetObject("GrayScaleConversion.VectorizeOptions.CornerThreshold.Value", 110); + CbDirections.SelectedItem = IP.LineDirection = Settings.GetObject(layerPrefix+"GrayScaleConversion.Line2LineOptions.Direction", ImageProcessor.Direction.Horizontal); + UDQuality.Value = IP.Quality = Math.Min(UDQuality.Maximum, Settings.GetObject(layerPrefix+"GrayScaleConversion.Line2LineOptions.Quality", 3.0m)); + CbLinePreview.Checked = IP.LinePreview = Settings.GetObject(layerPrefix+"GrayScaleConversion.Line2LineOptions.Preview", false); + + CbSpotRemoval.Checked = IP.UseSpotRemoval = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.SpotRemoval.Enabled", false); + UDSpotRemoval.Value = IP.SpotRemoval = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.SpotRemoval.Value", 2.0m); + CbSmoothing.Checked = IP.UseSmoothing = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.Smooting.Enabled", false); + UDSmoothing.Value = IP.Smoothing = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.Smooting.Value", 1.0m); + CbOptimize.Checked = IP.UseOptimize = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.Optimize.Enabled", false); + CbAdaptiveQuality.Checked = IP.UseAdaptiveQuality = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.UseAdaptiveQuality.Enabled", false); + UDOptimize.Value = IP.Optimize = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.Optimize.Value", 0.2m); + CbDownSample.Checked = IP.UseDownSampling = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.DownSample.Enabled", false); + UDDownSample.Value = IP.DownSampling = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.DownSample.Value", 2.0m); + CbOptimizeFast.Checked = IP.OptimizeFast = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.OptimizeFast.Enabled", false); + + CbFillingDirection.SelectedItem = IP.FillingDirection = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.FillingDirection", ImageProcessor.Direction.None); + UDFillingQuality.Value = IP.FillingQuality = Math.Min(UDFillingQuality.Maximum, Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.FillingQuality", 3.0m)); + + CbResize.SelectedItem = IP.Interpolation = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.Interpolation", InterpolationMode.HighQualityBicubic); + CbMode.SelectedItem = IP.Formula = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.Mode", ImageTransform.Formula.SimpleAverage); + TBRed.Value = IP.Red = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.R", 100); + TBGreen.Value = IP.Green = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.G", 100); + TBBlue.Value = IP.Blue = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.B", 100); + TbBright.Value = IP.Brightness = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.Brightness", 100); + TbContrast.Value = IP.Contrast = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.Contrast", 100); + CbThreshold.Checked = IP.UseThreshold = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.Threshold.Enabled", false); + TbThreshold.Value = IP.Threshold = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.Threshold.Value", 50); + TBWhiteClip.Value = IP.WhiteClip = Settings.GetObject(layerPrefix+"GrayScaleConversion.Parameters.WhiteClip", 5); + + CbDither.SelectedItem = Settings.GetObject(layerPrefix+"GrayScaleConversion.DitheringOptions.DitheringMode", ImageTransform.DitheringMode.FloydSteinberg); + + CbLineThreshold.Checked = IP.UseLineThreshold = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.LineThreshold.Enabled", true); + TBLineThreshold.Value = IP.LineThreshold = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.LineThreshold.Value", 10); + + CbCornerThreshold.Checked = IP.UseCornerThreshold = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.CornerThreshold.Enabled", true); + TBCornerThreshold.Value = IP.CornerThreshold = Settings.GetObject(layerPrefix+"GrayScaleConversion.VectorizeOptions.CornerThreshold.Value", 110); if (RbLineToLineTracing.Checked && !supportPWM) RbDithering.Checked = true; @@ -302,57 +313,58 @@ private void LoadSettings() private Dictionary GetActualSettings() { - var settings = new Dictionary (StringComparer.OrdinalIgnoreCase) + string layerPrefix = nLayer > 0 ? nLayer.ToString() + "." : ""; + var settings = new Dictionary (StringComparer.OrdinalIgnoreCase) { { - "GrayScaleConversion.RasterConversionTool", + layerPrefix+"GrayScaleConversion.RasterConversionTool", RbLineToLineTracing.Checked ? ImageProcessor.Tool.Line2Line : RbDithering.Checked ? ImageProcessor.Tool.Dithering : RbCenterline.Checked ? ImageProcessor.Tool.Centerline : ImageProcessor.Tool.Vectorize }, { - "GrayScaleConversion.Line2LineOptions.Direction", + layerPrefix+"GrayScaleConversion.Line2LineOptions.Direction", (ImageProcessor.Direction)CbDirections.SelectedItem }, - { "GrayScaleConversion.Line2LineOptions.Quality", UDQuality.Value }, - { "GrayScaleConversion.Line2LineOptions.Preview", CbLinePreview.Checked }, - { "GrayScaleConversion.VectorizeOptions.SpotRemoval.Enabled", CbSpotRemoval.Checked }, - { "GrayScaleConversion.VectorizeOptions.SpotRemoval.Value", UDSpotRemoval.Value }, - { "GrayScaleConversion.VectorizeOptions.Smooting.Enabled", CbSmoothing.Checked }, - { "GrayScaleConversion.VectorizeOptions.Smooting.Value", UDSmoothing.Value }, - { "GrayScaleConversion.VectorizeOptions.Optimize.Enabled", CbOptimize.Checked }, - { "GrayScaleConversion.VectorizeOptions.UseAdaptiveQuality.Enabled", CbAdaptiveQuality.Checked }, - { "GrayScaleConversion.VectorizeOptions.Optimize.Value", UDOptimize.Value }, - { "GrayScaleConversion.VectorizeOptions.DownSample.Enabled", CbDownSample.Checked }, - { "GrayScaleConversion.VectorizeOptions.DownSample.Value", UDDownSample.Value }, - { "GrayScaleConversion.VectorizeOptions.FillingDirection", (ImageProcessor.Direction)CbFillingDirection.SelectedItem }, - { "GrayScaleConversion.VectorizeOptions.FillingQuality", UDFillingQuality.Value }, - { "GrayScaleConversion.VectorizeOptions.OptimizeFast.Enabled", CbOptimizeFast.Checked }, - { "GrayScaleConversion.DitheringOptions.DitheringMode", (ImageTransform.DitheringMode)CbDither.SelectedItem }, - { "GrayScaleConversion.Parameters.Interpolation", (InterpolationMode)CbResize.SelectedItem }, - { "GrayScaleConversion.Parameters.Mode", (ImageTransform.Formula)CbMode.SelectedItem }, - { "GrayScaleConversion.Parameters.R", TBRed.Value }, - { "GrayScaleConversion.Parameters.G", TBGreen.Value }, - { "GrayScaleConversion.Parameters.B", TBBlue.Value }, - { "GrayScaleConversion.Parameters.Brightness", TbBright.Value }, - { "GrayScaleConversion.Parameters.Contrast", TbContrast.Value }, - { "GrayScaleConversion.Parameters.Threshold.Enabled", CbThreshold.Checked }, - { "GrayScaleConversion.Parameters.Threshold.Value", TbThreshold.Value }, - { "GrayScaleConversion.Parameters.WhiteClip", TBWhiteClip.Value }, - { "GrayScaleConversion.VectorizeOptions.BorderSpeed", IP.BorderSpeed }, - { "GrayScaleConversion.Gcode.Speed.Mark", IP.MarkSpeed }, - { "GrayScaleConversion.Gcode.LaserOptions.LaserOn", IP.LaserOn }, - { "GrayScaleConversion.Gcode.LaserOptions.LaserOff", IP.LaserOff }, - { "GrayScaleConversion.Gcode.LaserOptions.PowerMin", IP.MinPower }, - { "GrayScaleConversion.Gcode.LaserOptions.PowerMax", IP.MaxPower }, - { "GrayScaleConversion.Gcode.Offset.X", IP.TargetOffset.X }, - { "GrayScaleConversion.Gcode.Offset.Y", IP.TargetOffset.Y }, - { "GrayScaleConversion.Gcode.ImageSize.W", IP.TargetSize.Width }, - { "GrayScaleConversion.Gcode.ImageSize.H", IP.TargetSize.Height }, - { "GrayScaleConversion.VectorizeOptions.LineThreshold.Enabled", IP.UseLineThreshold }, - { "GrayScaleConversion.VectorizeOptions.LineThreshold.Value", IP.LineThreshold }, - { "GrayScaleConversion.VectorizeOptions.CornerThreshold.Enabled", IP.UseCornerThreshold }, - { "GrayScaleConversion.VectorizeOptions.CornerThreshold.Value", IP.CornerThreshold } + { layerPrefix+"GrayScaleConversion.Line2LineOptions.Quality", UDQuality.Value }, + { layerPrefix+"GrayScaleConversion.Line2LineOptions.Preview", CbLinePreview.Checked }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.SpotRemoval.Enabled", CbSpotRemoval.Checked }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.SpotRemoval.Value", UDSpotRemoval.Value }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.Smooting.Enabled", CbSmoothing.Checked }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.Smooting.Value", UDSmoothing.Value }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.Optimize.Enabled", CbOptimize.Checked }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.UseAdaptiveQuality.Enabled", CbAdaptiveQuality.Checked }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.Optimize.Value", UDOptimize.Value }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.DownSample.Enabled", CbDownSample.Checked }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.DownSample.Value", UDDownSample.Value }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.FillingDirection", (ImageProcessor.Direction)CbFillingDirection.SelectedItem }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.FillingQuality", UDFillingQuality.Value }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.OptimizeFast.Enabled", CbOptimizeFast.Checked }, + { layerPrefix+"GrayScaleConversion.DitheringOptions.DitheringMode", (ImageTransform.DitheringMode)CbDither.SelectedItem }, + { layerPrefix+"GrayScaleConversion.Parameters.Interpolation", (InterpolationMode)CbResize.SelectedItem }, + { layerPrefix+"GrayScaleConversion.Parameters.Mode", (ImageTransform.Formula)CbMode.SelectedItem }, + { layerPrefix+"GrayScaleConversion.Parameters.R", TBRed.Value }, + { layerPrefix+"GrayScaleConversion.Parameters.G", TBGreen.Value }, + { layerPrefix+"GrayScaleConversion.Parameters.B", TBBlue.Value }, + { layerPrefix+"GrayScaleConversion.Parameters.Brightness", TbBright.Value }, + { layerPrefix+"GrayScaleConversion.Parameters.Contrast", TbContrast.Value }, + { layerPrefix+"GrayScaleConversion.Parameters.Threshold.Enabled", CbThreshold.Checked }, + { layerPrefix+"GrayScaleConversion.Parameters.Threshold.Value", TbThreshold.Value }, + { layerPrefix+"GrayScaleConversion.Parameters.WhiteClip", TBWhiteClip.Value }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.BorderSpeed", IP.BorderSpeed }, + { layerPrefix+"GrayScaleConversion.Gcode.Speed.Mark", IP.MarkSpeed }, + { layerPrefix+"GrayScaleConversion.Gcode.LaserOptions.LaserOn", IP.LaserOn }, + { layerPrefix+"GrayScaleConversion.Gcode.LaserOptions.LaserOff", IP.LaserOff }, + { layerPrefix+"GrayScaleConversion.Gcode.LaserOptions.PowerMin", IP.MinPower }, + { layerPrefix+"GrayScaleConversion.Gcode.LaserOptions.PowerMax", IP.MaxPower }, + { layerPrefix+"GrayScaleConversion.Gcode.Offset.X", IP.TargetOffset.X }, + { layerPrefix+"GrayScaleConversion.Gcode.Offset.Y", IP.TargetOffset.Y }, + { layerPrefix+"GrayScaleConversion.Gcode.ImageSize.W", IP.TargetSize.Width }, + { layerPrefix+"GrayScaleConversion.Gcode.ImageSize.H", IP.TargetSize.Height }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.LineThreshold.Enabled", IP.UseLineThreshold }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.LineThreshold.Value", IP.LineThreshold }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.CornerThreshold.Enabled", IP.UseCornerThreshold }, + { layerPrefix+"GrayScaleConversion.VectorizeOptions.CornerThreshold.Value", IP.CornerThreshold } }; return settings; diff --git a/LaserGRBL/SaveOptionForm.cs b/LaserGRBL/SaveOptionForm.cs index 4487dc465..14341df5f 100644 --- a/LaserGRBL/SaveOptionForm.cs +++ b/LaserGRBL/SaveOptionForm.cs @@ -21,7 +21,7 @@ internal static void CreateAndShowDialog(Form parent, GrblCore core) using (SaveOptionForm f = new SaveOptionForm()) { if (f.ShowDialog(parent) == DialogResult.OK) - core.SaveProgram(parent, f.CBHeader.Checked, f.CBFooter.Checked, f.CBBetween.Checked, (int)f.UDCount.Value); + core.SaveProgram(parent, f.CBHeader.Checked, f.CBFooter.Checked, f.CBBetween.Checked, new int[]{(int)f.UDCount.Value,(int)f.UDCount.Value,(int)f.UDCount.Value}); } } diff --git a/LaserGRBL/SaveOptionForm.resx b/LaserGRBL/SaveOptionForm.resx index a1407ed31..df47237d7 100644 --- a/LaserGRBL/SaveOptionForm.resx +++ b/LaserGRBL/SaveOptionForm.resx @@ -112,19 +112,19 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 1 True - + GrowAndShrink @@ -143,7 +143,7 @@ NoControl - + 3, 3 @@ -160,7 +160,7 @@ CBHeader - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel2 @@ -193,7 +193,7 @@ CBFooter - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel2 @@ -217,7 +217,7 @@ UDCount - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel2 @@ -250,7 +250,7 @@ label1 - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel2 @@ -283,7 +283,7 @@ CBBetween - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel2 @@ -310,7 +310,7 @@ tableLayoutPanel2 - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 groupBox1 @@ -340,7 +340,7 @@ groupBox1 - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -375,7 +375,7 @@ NOTE: If you export gcode to re-load inside LaserGRBL it is better to use quick label2 - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -447,7 +447,7 @@ NOTE: If you export gcode to re-load inside LaserGRBL it is better to use quick BtnSave - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel3 @@ -474,7 +474,7 @@ NOTE: If you export gcode to re-load inside LaserGRBL it is better to use quick tableLayoutPanel3 - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -504,7 +504,7 @@ NOTE: If you export gcode to re-load inside LaserGRBL it is better to use quick tableLayoutPanel1 - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -515,7 +515,7 @@ NOTE: If you export gcode to re-load inside LaserGRBL it is better to use quick <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="groupBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableLayoutPanel3" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,Percent,100,AutoSize,0" /></TableLayoutSettings> - + True @@ -534,6 +534,6 @@ NOTE: If you export gcode to re-load inside LaserGRBL it is better to use quick SaveOptionForm - System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/LaserGRBL/Strings.Designer.cs b/LaserGRBL/Strings.Designer.cs index 176cd855c..2e319ffb6 100644 --- a/LaserGRBL/Strings.Designer.cs +++ b/LaserGRBL/Strings.Designer.cs @@ -19,7 +19,7 @@ namespace LaserGRBL { // tramite uno strumento quale ResGen o Visual Studio. // Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen // con l'opzione /str oppure ricompilare il progetto VS. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.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 Strings { diff --git a/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.Designer.cs b/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.Designer.cs index 240e033e3..61e4b35af 100644 --- a/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.Designer.cs +++ b/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.Designer.cs @@ -51,254 +51,254 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SvgToGCodeForm)); - this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel(); - this.GbSpeed = new System.Windows.Forms.GroupBox(); - this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); - this.LblBorderTracing = new System.Windows.Forms.Label(); - this.LblBorderTracingmm = new System.Windows.Forms.Label(); - this.IIBorderTracing = new LaserGRBL.UserControls.NumericInput.IntegerInputRanged(); - this.BtnPSHelper = new LaserGRBL.UserControls.ImageButton(); - this.GbLaser = new System.Windows.Forms.GroupBox(); - this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel(); - this.BtnModulationInfo = new LaserGRBL.UserControls.ImageButton(); - this.LblSmin = new System.Windows.Forms.Label(); - this.IIMinPower = new LaserGRBL.UserControls.NumericInput.IntegerInputRanged(); - this.label18 = new System.Windows.Forms.Label(); - this.BtnOnOffInfo = new LaserGRBL.UserControls.ImageButton(); - this.CBLaserON = new System.Windows.Forms.ComboBox(); - this.LblSmax = new System.Windows.Forms.Label(); - this.IIMaxPower = new LaserGRBL.UserControls.NumericInput.IntegerInputRanged(); - this.LblMinPerc = new System.Windows.Forms.Label(); - this.LblMaxPerc = new System.Windows.Forms.Label(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.BtnCancel = new System.Windows.Forms.Button(); - this.BtnCreate = new System.Windows.Forms.Button(); - this.TT = new System.Windows.Forms.ToolTip(this.components); - this.tableLayoutPanel9.SuspendLayout(); - this.GbSpeed.SuspendLayout(); - this.tableLayoutPanel6.SuspendLayout(); - this.GbLaser.SuspendLayout(); - this.tableLayoutPanel7.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // tableLayoutPanel9 - // - resources.ApplyResources(this.tableLayoutPanel9, "tableLayoutPanel9"); - this.tableLayoutPanel9.Controls.Add(this.GbSpeed, 0, 0); - this.tableLayoutPanel9.Controls.Add(this.GbLaser, 0, 1); - this.tableLayoutPanel9.Controls.Add(this.tableLayoutPanel1, 0, 3); - this.tableLayoutPanel9.Name = "tableLayoutPanel9"; - // - // GbSpeed - // - resources.ApplyResources(this.GbSpeed, "GbSpeed"); - this.GbSpeed.Controls.Add(this.tableLayoutPanel6); - this.GbSpeed.Name = "GbSpeed"; - this.GbSpeed.TabStop = false; - // - // tableLayoutPanel6 - // - resources.ApplyResources(this.tableLayoutPanel6, "tableLayoutPanel6"); - this.tableLayoutPanel6.Controls.Add(this.LblBorderTracing, 0, 0); - this.tableLayoutPanel6.Controls.Add(this.LblBorderTracingmm, 2, 0); - this.tableLayoutPanel6.Controls.Add(this.IIBorderTracing, 1, 0); - this.tableLayoutPanel6.Controls.Add(this.BtnPSHelper, 3, 0); - this.tableLayoutPanel6.Name = "tableLayoutPanel6"; - // - // LblBorderTracing - // - resources.ApplyResources(this.LblBorderTracing, "LblBorderTracing"); - this.LblBorderTracing.Name = "LblBorderTracing"; - // - // LblBorderTracingmm - // - resources.ApplyResources(this.LblBorderTracingmm, "LblBorderTracingmm"); - this.LblBorderTracingmm.Name = "LblBorderTracingmm"; - // - // IIBorderTracing - // - resources.ApplyResources(this.IIBorderTracing, "IIBorderTracing"); - this.IIBorderTracing.CurrentValue = 1000; - this.IIBorderTracing.ForcedText = null; - this.IIBorderTracing.ForceMinMax = false; - this.IIBorderTracing.MaxValue = 4000; - this.IIBorderTracing.MinValue = 1; - this.IIBorderTracing.Name = "IIBorderTracing"; - this.IIBorderTracing.NormalBorderColor = System.Drawing.SystemColors.ActiveBorder; - this.IIBorderTracing.CurrentValueChanged += new LaserGRBL.UserControls.NumericInput.IntegerInputBase.CurrentValueChangedEventHandler(this.IIBorderTracingCurrentValueChanged); - // - // BtnPSHelper - // - this.BtnPSHelper.AltImage = null; - resources.ApplyResources(this.BtnPSHelper, "BtnPSHelper"); - this.BtnPSHelper.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnPSHelper.Caption = null; - this.BtnPSHelper.Coloration = System.Drawing.Color.Empty; - this.BtnPSHelper.Image = ((System.Drawing.Image)(resources.GetObject("BtnPSHelper.Image"))); - this.BtnPSHelper.Name = "BtnPSHelper"; - this.BtnPSHelper.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.TT.SetToolTip(this.BtnPSHelper, resources.GetString("BtnPSHelper.ToolTip")); - this.BtnPSHelper.UseAltImage = false; - this.BtnPSHelper.Click += new System.EventHandler(this.BtnPSHelper_Click); - // - // GbLaser - // - resources.ApplyResources(this.GbLaser, "GbLaser"); - this.GbLaser.Controls.Add(this.tableLayoutPanel7); - this.GbLaser.Name = "GbLaser"; - this.GbLaser.TabStop = false; - // - // tableLayoutPanel7 - // - resources.ApplyResources(this.tableLayoutPanel7, "tableLayoutPanel7"); - this.tableLayoutPanel7.Controls.Add(this.BtnModulationInfo, 3, 1); - this.tableLayoutPanel7.Controls.Add(this.LblSmin, 0, 1); - this.tableLayoutPanel7.Controls.Add(this.IIMinPower, 1, 1); - this.tableLayoutPanel7.Controls.Add(this.label18, 0, 0); - this.tableLayoutPanel7.Controls.Add(this.BtnOnOffInfo, 3, 0); - this.tableLayoutPanel7.Controls.Add(this.CBLaserON, 1, 0); - this.tableLayoutPanel7.Controls.Add(this.LblSmax, 0, 2); - this.tableLayoutPanel7.Controls.Add(this.IIMaxPower, 1, 2); - this.tableLayoutPanel7.Controls.Add(this.LblMinPerc, 2, 1); - this.tableLayoutPanel7.Controls.Add(this.LblMaxPerc, 2, 2); - this.tableLayoutPanel7.Name = "tableLayoutPanel7"; - // - // BtnModulationInfo - // - this.BtnModulationInfo.AltImage = null; - resources.ApplyResources(this.BtnModulationInfo, "BtnModulationInfo"); - this.BtnModulationInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnModulationInfo.Caption = null; - this.BtnModulationInfo.Coloration = System.Drawing.Color.Empty; - this.BtnModulationInfo.Image = ((System.Drawing.Image)(resources.GetObject("BtnModulationInfo.Image"))); - this.BtnModulationInfo.Name = "BtnModulationInfo"; - this.tableLayoutPanel7.SetRowSpan(this.BtnModulationInfo, 2); - this.BtnModulationInfo.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.TT.SetToolTip(this.BtnModulationInfo, resources.GetString("BtnModulationInfo.ToolTip")); - this.BtnModulationInfo.UseAltImage = false; - this.BtnModulationInfo.Click += new System.EventHandler(this.BtnModulationInfo_Click); - // - // LblSmin - // - resources.ApplyResources(this.LblSmin, "LblSmin"); - this.LblSmin.Name = "LblSmin"; - // - // IIMinPower - // - resources.ApplyResources(this.IIMinPower, "IIMinPower"); - this.IIMinPower.ForcedText = null; - this.IIMinPower.ForceMinMax = false; - this.IIMinPower.MaxValue = 999; - this.IIMinPower.MinValue = 0; - this.IIMinPower.Name = "IIMinPower"; - this.IIMinPower.NormalBorderColor = System.Drawing.SystemColors.ActiveBorder; - this.IIMinPower.CurrentValueChanged += new LaserGRBL.UserControls.NumericInput.IntegerInputBase.CurrentValueChangedEventHandler(this.IIMinPowerCurrentValueChanged); - // - // label18 - // - resources.ApplyResources(this.label18, "label18"); - this.label18.Name = "label18"; - // - // BtnOnOffInfo - // - this.BtnOnOffInfo.AltImage = null; - resources.ApplyResources(this.BtnOnOffInfo, "BtnOnOffInfo"); - this.BtnOnOffInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnOnOffInfo.Caption = null; - this.BtnOnOffInfo.Coloration = System.Drawing.Color.Empty; - this.BtnOnOffInfo.Image = ((System.Drawing.Image)(resources.GetObject("BtnOnOffInfo.Image"))); - this.BtnOnOffInfo.Name = "BtnOnOffInfo"; - this.BtnOnOffInfo.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.TT.SetToolTip(this.BtnOnOffInfo, resources.GetString("BtnOnOffInfo.ToolTip")); - this.BtnOnOffInfo.UseAltImage = false; - this.BtnOnOffInfo.Click += new System.EventHandler(this.BtnOnOffInfo_Click); - // - // CBLaserON - // - this.tableLayoutPanel7.SetColumnSpan(this.CBLaserON, 2); - resources.ApplyResources(this.CBLaserON, "CBLaserON"); - this.CBLaserON.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CBLaserON.FormattingEnabled = true; - this.CBLaserON.Name = "CBLaserON"; - this.CBLaserON.SelectedIndexChanged += new System.EventHandler(this.CBLaserON_SelectedIndexChanged); - // - // LblSmax - // - resources.ApplyResources(this.LblSmax, "LblSmax"); - this.LblSmax.Name = "LblSmax"; - // - // IIMaxPower - // - resources.ApplyResources(this.IIMaxPower, "IIMaxPower"); - this.IIMaxPower.CurrentValue = 1000; - this.IIMaxPower.ForcedText = null; - this.IIMaxPower.ForceMinMax = false; - this.IIMaxPower.MaxValue = 1000; - this.IIMaxPower.MinValue = 1; - this.IIMaxPower.Name = "IIMaxPower"; - this.IIMaxPower.NormalBorderColor = System.Drawing.SystemColors.ActiveBorder; - this.IIMaxPower.CurrentValueChanged += new LaserGRBL.UserControls.NumericInput.IntegerInputBase.CurrentValueChangedEventHandler(this.IIMaxPowerCurrentValueChanged); - // - // LblMinPerc - // - resources.ApplyResources(this.LblMinPerc, "LblMinPerc"); - this.LblMinPerc.Name = "LblMinPerc"; - // - // LblMaxPerc - // - resources.ApplyResources(this.LblMaxPerc, "LblMaxPerc"); - this.LblMaxPerc.Name = "LblMaxPerc"; - // - // tableLayoutPanel1 - // - resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); - this.tableLayoutPanel1.Controls.Add(this.BtnCancel, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.BtnCreate, 2, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - // - // BtnCancel - // - this.BtnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - resources.ApplyResources(this.BtnCancel, "BtnCancel"); - this.BtnCancel.Name = "BtnCancel"; - this.BtnCancel.UseVisualStyleBackColor = true; - // - // BtnCreate - // - this.BtnCreate.DialogResult = System.Windows.Forms.DialogResult.OK; - resources.ApplyResources(this.BtnCreate, "BtnCreate"); - this.BtnCreate.Name = "BtnCreate"; - this.BtnCreate.UseVisualStyleBackColor = true; - // - // TT - // - this.TT.AutoPopDelay = 10000; - this.TT.InitialDelay = 500; - this.TT.ReshowDelay = 100; - // - // SvgToGCodeForm - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tableLayoutPanel9); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Name = "SvgToGCodeForm"; - this.tableLayoutPanel9.ResumeLayout(false); - this.tableLayoutPanel9.PerformLayout(); - this.GbSpeed.ResumeLayout(false); - this.GbSpeed.PerformLayout(); - this.tableLayoutPanel6.ResumeLayout(false); - this.tableLayoutPanel6.PerformLayout(); - this.GbLaser.ResumeLayout(false); - this.GbLaser.PerformLayout(); - this.tableLayoutPanel7.ResumeLayout(false); - this.tableLayoutPanel7.PerformLayout(); - this.tableLayoutPanel1.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SvgToGCodeForm)); + this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel(); + this.GbSpeed = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); + this.LblBorderTracing = new System.Windows.Forms.Label(); + this.LblBorderTracingmm = new System.Windows.Forms.Label(); + this.IIBorderTracing = new LaserGRBL.UserControls.NumericInput.IntegerInputRanged(); + this.BtnPSHelper = new LaserGRBL.UserControls.ImageButton(); + this.GbLaser = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel(); + this.BtnModulationInfo = new LaserGRBL.UserControls.ImageButton(); + this.LblSmin = new System.Windows.Forms.Label(); + this.IIMinPower = new LaserGRBL.UserControls.NumericInput.IntegerInputRanged(); + this.label18 = new System.Windows.Forms.Label(); + this.BtnOnOffInfo = new LaserGRBL.UserControls.ImageButton(); + this.CBLaserON = new System.Windows.Forms.ComboBox(); + this.LblSmax = new System.Windows.Forms.Label(); + this.IIMaxPower = new LaserGRBL.UserControls.NumericInput.IntegerInputRanged(); + this.LblMinPerc = new System.Windows.Forms.Label(); + this.LblMaxPerc = new System.Windows.Forms.Label(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.BtnCancel = new System.Windows.Forms.Button(); + this.BtnCreate = new System.Windows.Forms.Button(); + this.TT = new System.Windows.Forms.ToolTip(this.components); + this.tableLayoutPanel9.SuspendLayout(); + this.GbSpeed.SuspendLayout(); + this.tableLayoutPanel6.SuspendLayout(); + this.GbLaser.SuspendLayout(); + this.tableLayoutPanel7.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel9 + // + resources.ApplyResources(this.tableLayoutPanel9, "tableLayoutPanel9"); + this.tableLayoutPanel9.Controls.Add(this.GbSpeed, 0, 0); + this.tableLayoutPanel9.Controls.Add(this.GbLaser, 0, 1); + this.tableLayoutPanel9.Controls.Add(this.tableLayoutPanel1, 0, 3); + this.tableLayoutPanel9.Name = "tableLayoutPanel9"; + // + // GbSpeed + // + resources.ApplyResources(this.GbSpeed, "GbSpeed"); + this.GbSpeed.Controls.Add(this.tableLayoutPanel6); + this.GbSpeed.Name = "GbSpeed"; + this.GbSpeed.TabStop = false; + // + // tableLayoutPanel6 + // + resources.ApplyResources(this.tableLayoutPanel6, "tableLayoutPanel6"); + this.tableLayoutPanel6.Controls.Add(this.LblBorderTracing, 0, 0); + this.tableLayoutPanel6.Controls.Add(this.LblBorderTracingmm, 2, 0); + this.tableLayoutPanel6.Controls.Add(this.IIBorderTracing, 1, 0); + this.tableLayoutPanel6.Controls.Add(this.BtnPSHelper, 3, 0); + this.tableLayoutPanel6.Name = "tableLayoutPanel6"; + // + // LblBorderTracing + // + resources.ApplyResources(this.LblBorderTracing, "LblBorderTracing"); + this.LblBorderTracing.Name = "LblBorderTracing"; + // + // LblBorderTracingmm + // + resources.ApplyResources(this.LblBorderTracingmm, "LblBorderTracingmm"); + this.LblBorderTracingmm.Name = "LblBorderTracingmm"; + // + // IIBorderTracing + // + resources.ApplyResources(this.IIBorderTracing, "IIBorderTracing"); + this.IIBorderTracing.CurrentValue = 1000; + this.IIBorderTracing.ForcedText = null; + this.IIBorderTracing.ForceMinMax = false; + this.IIBorderTracing.MaxValue = 4000; + this.IIBorderTracing.MinValue = 1; + this.IIBorderTracing.Name = "IIBorderTracing"; + this.IIBorderTracing.NormalBorderColor = System.Drawing.SystemColors.ActiveBorder; + this.IIBorderTracing.CurrentValueChanged += new LaserGRBL.UserControls.NumericInput.IntegerInputBase.CurrentValueChangedEventHandler(this.IIBorderTracingCurrentValueChanged); + // + // BtnPSHelper + // + this.BtnPSHelper.AltImage = null; + resources.ApplyResources(this.BtnPSHelper, "BtnPSHelper"); + this.BtnPSHelper.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnPSHelper.Caption = null; + this.BtnPSHelper.Coloration = System.Drawing.Color.Empty; + this.BtnPSHelper.Image = ((System.Drawing.Image)(resources.GetObject("BtnPSHelper.Image"))); + this.BtnPSHelper.Name = "BtnPSHelper"; + this.BtnPSHelper.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.TT.SetToolTip(this.BtnPSHelper, resources.GetString("BtnPSHelper.ToolTip")); + this.BtnPSHelper.UseAltImage = false; + this.BtnPSHelper.Click += new System.EventHandler(this.BtnPSHelper_Click); + // + // GbLaser + // + resources.ApplyResources(this.GbLaser, "GbLaser"); + this.GbLaser.Controls.Add(this.tableLayoutPanel7); + this.GbLaser.Name = "GbLaser"; + this.GbLaser.TabStop = false; + // + // tableLayoutPanel7 + // + resources.ApplyResources(this.tableLayoutPanel7, "tableLayoutPanel7"); + this.tableLayoutPanel7.Controls.Add(this.BtnModulationInfo, 3, 1); + this.tableLayoutPanel7.Controls.Add(this.LblSmin, 0, 1); + this.tableLayoutPanel7.Controls.Add(this.IIMinPower, 1, 1); + this.tableLayoutPanel7.Controls.Add(this.label18, 0, 0); + this.tableLayoutPanel7.Controls.Add(this.BtnOnOffInfo, 3, 0); + this.tableLayoutPanel7.Controls.Add(this.CBLaserON, 1, 0); + this.tableLayoutPanel7.Controls.Add(this.LblSmax, 0, 2); + this.tableLayoutPanel7.Controls.Add(this.IIMaxPower, 1, 2); + this.tableLayoutPanel7.Controls.Add(this.LblMinPerc, 2, 1); + this.tableLayoutPanel7.Controls.Add(this.LblMaxPerc, 2, 2); + this.tableLayoutPanel7.Name = "tableLayoutPanel7"; + // + // BtnModulationInfo + // + this.BtnModulationInfo.AltImage = null; + resources.ApplyResources(this.BtnModulationInfo, "BtnModulationInfo"); + this.BtnModulationInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnModulationInfo.Caption = null; + this.BtnModulationInfo.Coloration = System.Drawing.Color.Empty; + this.BtnModulationInfo.Image = ((System.Drawing.Image)(resources.GetObject("BtnModulationInfo.Image"))); + this.BtnModulationInfo.Name = "BtnModulationInfo"; + this.tableLayoutPanel7.SetRowSpan(this.BtnModulationInfo, 2); + this.BtnModulationInfo.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.TT.SetToolTip(this.BtnModulationInfo, resources.GetString("BtnModulationInfo.ToolTip")); + this.BtnModulationInfo.UseAltImage = false; + this.BtnModulationInfo.Click += new System.EventHandler(this.BtnModulationInfo_Click); + // + // LblSmin + // + resources.ApplyResources(this.LblSmin, "LblSmin"); + this.LblSmin.Name = "LblSmin"; + // + // IIMinPower + // + resources.ApplyResources(this.IIMinPower, "IIMinPower"); + this.IIMinPower.ForcedText = null; + this.IIMinPower.ForceMinMax = false; + this.IIMinPower.MaxValue = 999; + this.IIMinPower.MinValue = 0; + this.IIMinPower.Name = "IIMinPower"; + this.IIMinPower.NormalBorderColor = System.Drawing.SystemColors.ActiveBorder; + this.IIMinPower.CurrentValueChanged += new LaserGRBL.UserControls.NumericInput.IntegerInputBase.CurrentValueChangedEventHandler(this.IIMinPowerCurrentValueChanged); + // + // label18 + // + resources.ApplyResources(this.label18, "label18"); + this.label18.Name = "label18"; + // + // BtnOnOffInfo + // + this.BtnOnOffInfo.AltImage = null; + resources.ApplyResources(this.BtnOnOffInfo, "BtnOnOffInfo"); + this.BtnOnOffInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOnOffInfo.Caption = null; + this.BtnOnOffInfo.Coloration = System.Drawing.Color.Empty; + this.BtnOnOffInfo.Image = ((System.Drawing.Image)(resources.GetObject("BtnOnOffInfo.Image"))); + this.BtnOnOffInfo.Name = "BtnOnOffInfo"; + this.BtnOnOffInfo.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.TT.SetToolTip(this.BtnOnOffInfo, resources.GetString("BtnOnOffInfo.ToolTip")); + this.BtnOnOffInfo.UseAltImage = false; + this.BtnOnOffInfo.Click += new System.EventHandler(this.BtnOnOffInfo_Click); + // + // CBLaserON + // + this.tableLayoutPanel7.SetColumnSpan(this.CBLaserON, 2); + resources.ApplyResources(this.CBLaserON, "CBLaserON"); + this.CBLaserON.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CBLaserON.FormattingEnabled = true; + this.CBLaserON.Name = "CBLaserON"; + this.CBLaserON.SelectedIndexChanged += new System.EventHandler(this.CBLaserON_SelectedIndexChanged); + // + // LblSmax + // + resources.ApplyResources(this.LblSmax, "LblSmax"); + this.LblSmax.Name = "LblSmax"; + // + // IIMaxPower + // + resources.ApplyResources(this.IIMaxPower, "IIMaxPower"); + this.IIMaxPower.CurrentValue = 1000; + this.IIMaxPower.ForcedText = null; + this.IIMaxPower.ForceMinMax = false; + this.IIMaxPower.MaxValue = 1000; + this.IIMaxPower.MinValue = 1; + this.IIMaxPower.Name = "IIMaxPower"; + this.IIMaxPower.NormalBorderColor = System.Drawing.SystemColors.ActiveBorder; + this.IIMaxPower.CurrentValueChanged += new LaserGRBL.UserControls.NumericInput.IntegerInputBase.CurrentValueChangedEventHandler(this.IIMaxPowerCurrentValueChanged); + // + // LblMinPerc + // + resources.ApplyResources(this.LblMinPerc, "LblMinPerc"); + this.LblMinPerc.Name = "LblMinPerc"; + // + // LblMaxPerc + // + resources.ApplyResources(this.LblMaxPerc, "LblMaxPerc"); + this.LblMaxPerc.Name = "LblMaxPerc"; + // + // tableLayoutPanel1 + // + resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); + this.tableLayoutPanel1.Controls.Add(this.BtnCancel, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.BtnCreate, 2, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + // + // BtnCancel + // + this.BtnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + resources.ApplyResources(this.BtnCancel, "BtnCancel"); + this.BtnCancel.Name = "BtnCancel"; + this.BtnCancel.UseVisualStyleBackColor = true; + // + // BtnCreate + // + this.BtnCreate.DialogResult = System.Windows.Forms.DialogResult.OK; + resources.ApplyResources(this.BtnCreate, "BtnCreate"); + this.BtnCreate.Name = "BtnCreate"; + this.BtnCreate.UseVisualStyleBackColor = true; + // + // TT + // + this.TT.AutoPopDelay = 10000; + this.TT.InitialDelay = 500; + this.TT.ReshowDelay = 100; + // + // SvgToGCodeForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tableLayoutPanel9); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "SvgToGCodeForm"; + this.tableLayoutPanel9.ResumeLayout(false); + this.tableLayoutPanel9.PerformLayout(); + this.GbSpeed.ResumeLayout(false); + this.GbSpeed.PerformLayout(); + this.tableLayoutPanel6.ResumeLayout(false); + this.tableLayoutPanel6.PerformLayout(); + this.GbLaser.ResumeLayout(false); + this.GbLaser.PerformLayout(); + this.tableLayoutPanel7.ResumeLayout(false); + this.tableLayoutPanel7.PerformLayout(); + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.cs b/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.cs index cdd369d17..f1b6c8497 100644 --- a/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.cs +++ b/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.cs @@ -34,7 +34,7 @@ public override string ToString() } } - internal static void CreateAndShowDialog(GrblCore core, string filename, Form parent, bool append) + internal static void CreateAndShowDialog(GrblCore core, string filename, Form parent, bool append, int nLayer) { using (SvgToGCodeForm f = new SvgToGCodeForm(core, filename, append)) { @@ -46,7 +46,7 @@ internal static void CreateAndShowDialog(GrblCore core, string filename, Form pa Settings.SetObject("GrayScaleConversion.Gcode.LaserOptions.PowerMin", f.IIMinPower.CurrentValue); Settings.SetObject("GrayScaleConversion.Gcode.LaserOptions.LaserOn", (f.CBLaserON.SelectedItem as ComboboxItem).Value); - core.LoadedFile.LoadImportedSVG(filename, append, core); + core.LoadedFile.LoadImportedSVG(filename, append, core, nLayer); } } } diff --git a/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.resx b/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.resx index 62731b9af..da4686d92 100644 --- a/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.resx +++ b/LaserGRBL/SvgConverter/ConvertSizeAndOptionForm.resx @@ -229,7 +229,7 @@ IIBorderTracing - LaserGRBL.UserControls.NumericInput.IntegerInputRanged, LaserGRBL, Version=4.5.1.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.NumericInput.IntegerInputRanged, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel6 @@ -243,7 +243,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6 - JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACrUlE + JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsQAAALEAGtI711AAACrUlE QVQ4T6WO60uTYRjG3/+kz0F9iMjEMnClhZonEMdi1WxoHoZzMzE3DTwhKttCN0MqZROdluiMSkQdw8OG ZjrJaZ42Z21NrWnbxJ2eq/d1JH7wQ+ED1/PcXPf1/O6bAnAmnWr+j44LaftaWNFnDzf22OZrOtevngw1 dC6zZL3rqzKtJVys+ERbJwClrfPDtCDtWGEa+OkDGTS5iWpwc1emnoqVa5dGjF8PyYoTGJ07gFRpQE1z @@ -277,7 +277,7 @@ BtnPSHelper - LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.5.1.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel6 @@ -394,7 +394,7 @@ Click for more information... BtnModulationInfo - LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.5.1.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel7 @@ -451,7 +451,7 @@ Click for more information... IIMinPower - LaserGRBL.UserControls.NumericInput.IntegerInputRanged, LaserGRBL, Version=4.5.1.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.NumericInput.IntegerInputRanged, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel7 @@ -530,7 +530,7 @@ Click for more information... BtnOnOffInfo - LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.5.1.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.ImageButton, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel7 @@ -611,7 +611,7 @@ Click for more information... IIMaxPower - LaserGRBL.UserControls.NumericInput.IntegerInputRanged, LaserGRBL, Version=4.5.1.0, Culture=neutral, PublicKeyToken=null + LaserGRBL.UserControls.NumericInput.IntegerInputRanged, LaserGRBL, Version=4.8.1.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel7 diff --git a/LaserGRBL/Tools/Project.cs b/LaserGRBL/Tools/Project.cs index cef6541f1..736622499 100644 --- a/LaserGRBL/Tools/Project.cs +++ b/LaserGRBL/Tools/Project.cs @@ -23,7 +23,7 @@ public static class Project /// /// Holds the actual project settings /// - public static List> ProjectSettings = new List>(); + public static List>[] ProjectSettings = new List>[] { new List>(), new List>(),new List>() }; #endregion @@ -33,23 +33,29 @@ public static class Project /// Add new settings /// /// Dictionary holding the new settings - public static void AddSettings(Dictionary settings) + public static void AddSettings(Dictionary settings, int nLayer) { if (settings == null) return; // Add image to dictionary - settings.Add("ImageName", Path.GetFileName(Settings.GetObject("Core.LastOpenFile", null))); - settings.Add("ImageBase64", ConvertImageToBase64(Settings.GetObject("Core.LastOpenFile", null))); + string layerSuffix = nLayer > 0 ? nLayer.ToString() : ""; + string lastOpenFile = Settings.GetObject("Core.LastOpenFile" + layerSuffix, null); + string lastOpenFileName = Path.GetFileName(lastOpenFile); + if (lastOpenFileName != null) + { + settings.Add("ImageName", lastOpenFileName); + settings.Add("ImageBase64", ConvertImageToBase64(lastOpenFile)); + } - ProjectSettings.Add(settings); + ProjectSettings[nLayer].Add(settings); } /// /// Clear all project settings (has to be done if file new file is opened or last file is reloaded) /// - public static void ClearSettings() + public static void ClearSettings(int nLayer) { - ProjectSettings.Clear(); + ProjectSettings[nLayer].Clear(); } /// @@ -72,16 +78,17 @@ public static void StoreSettings(string filename) /// /// Filepath to the project /// Settings of the project - public static List> LoadProject(string filename) + public static List>[] LoadProject(string filename) { - if (string.IsNullOrEmpty(filename)) return new List>(); - if (!File.Exists(filename)) return new List>(); + List>[] _new = new List>[] { new List>(), new List>(), new List>() }; + if (string.IsNullOrEmpty(filename)) return _new; + if (!File.Exists(filename)) return _new; - List> project; + List>[] project; using (var fs = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.None)) { - project = (List>)Formatter.Deserialize(fs); + project = (List>[])Formatter.Deserialize(fs); fs.Close(); } @@ -95,6 +102,7 @@ public static List> LoadProject(string filename) /// private static string ConvertImageToBase64(string imagePath) { + if (imagePath == null) return ""; using (var image = Image.FromFile(imagePath)) { using (var m = new MemoryStream()) diff --git a/LaserGRBL/UserControls/GrblPanel.cs b/LaserGRBL/UserControls/GrblPanel.cs index 4c8740358..672c8a23b 100644 --- a/LaserGRBL/UserControls/GrblPanel.cs +++ b/LaserGRBL/UserControls/GrblPanel.cs @@ -132,14 +132,20 @@ public void SetComProgram(GrblCore core) Core = core; Core.OnFileLoading += OnFileLoading; Core.OnFileLoaded += OnFileLoaded; + Core.OnLayerEnabledChange += OnMultiEnabledChange; } - void OnFileLoading(long elapsed, string filename) + void OnFileLoading(long elapsed, string filename, int nLayer) { AbortCreation(); } - void OnFileLoaded(long elapsed, string filename) + void OnFileLoaded(long elapsed, string filename, int nLayer) + { + RecreateBMP(); + } + + void OnMultiEnabledChange(Boolean current, int nLayer) { RecreateBMP(); } @@ -186,7 +192,12 @@ private void DoTheWork() g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit; if (Core != null /*&& Core.HasProgram*/) - Core.LoadedFile.DrawOnGraphics(g, wSize); + { + for (int jLayer = 0; jLayer < 3; jLayer++) + { + Core.LoadedFile.DrawOnGraphics(g, wSize, jLayer, Core.LayerEnabled()); + } + } mLastMatrix = g.Transform; } From a5c45ac8b599ee7da37a522c713c34fd0ba3a507 Mon Sep 17 00:00:00 2001 From: arkypita Date: Sat, 4 Jun 2022 09:35:57 +0200 Subject: [PATCH 2/6] switch back to .net 4.0 --- LaserGRBL/App.config | 2 +- LaserGRBL/LaserGRBL.csproj | 4 +- LaserGRBL/PSHelper/MaterialDB.Designer.cs | 142 ++++----- LaserGRBL/PSHelper/MaterialDB.cs | 348 +++++++++++----------- LaserGRBL/Strings.Designer.cs | 226 +++++++------- 5 files changed, 361 insertions(+), 361 deletions(-) diff --git a/LaserGRBL/App.config b/LaserGRBL/App.config index dd7ba6f6c..bf4f2cc01 100644 --- a/LaserGRBL/App.config +++ b/LaserGRBL/App.config @@ -14,6 +14,6 @@ - + diff --git a/LaserGRBL/LaserGRBL.csproj b/LaserGRBL/LaserGRBL.csproj index 269f3449d..d96966bf9 100644 --- a/LaserGRBL/LaserGRBL.csproj +++ b/LaserGRBL/LaserGRBL.csproj @@ -9,7 +9,7 @@ Properties LaserGRBL LaserGRBL - v4.8 + v4.0 512 True False @@ -123,7 +123,7 @@ true - true + false diff --git a/LaserGRBL/PSHelper/MaterialDB.Designer.cs b/LaserGRBL/PSHelper/MaterialDB.Designer.cs index f5fbff6f9..a4b2ef8cc 100644 --- a/LaserGRBL/PSHelper/MaterialDB.Designer.cs +++ b/LaserGRBL/PSHelper/MaterialDB.Designer.cs @@ -29,7 +29,7 @@ public partial class MaterialDB : global::System.Data.DataSet { private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public MaterialDB() { this.BeginInit(); this.InitClass(); @@ -40,7 +40,7 @@ public MaterialDB() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected MaterialDB(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context, false) { if ((this.IsBinarySerialized(info, context) == true)) { @@ -76,7 +76,7 @@ protected MaterialDB(global::System.Runtime.Serialization.SerializationInfo info } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public MaterialsDataTable Materials { @@ -86,7 +86,7 @@ public MaterialsDataTable Materials { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { @@ -99,7 +99,7 @@ public MaterialsDataTable Materials { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new global::System.Data.DataTableCollection Tables { get { @@ -108,7 +108,7 @@ public MaterialsDataTable Materials { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new global::System.Data.DataRelationCollection Relations { get { @@ -117,7 +117,7 @@ public MaterialsDataTable Materials { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void InitializeDerivedDataSet() { this.BeginInit(); this.InitClass(); @@ -125,7 +125,7 @@ protected override void InitializeDerivedDataSet() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public override global::System.Data.DataSet Clone() { MaterialDB cln = ((MaterialDB)(base.Clone())); cln.InitVars(); @@ -134,19 +134,19 @@ protected override void InitializeDerivedDataSet() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override bool ShouldSerializeTables() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override bool ShouldSerializeRelations() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { this.Reset(); @@ -171,7 +171,7 @@ protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); @@ -180,13 +180,13 @@ protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] internal void InitVars() { this.InitVars(true); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] internal void InitVars(bool initTable) { this.tableMaterials = ((MaterialsDataTable)(base.Tables["Materials"])); if ((initTable == true)) { @@ -197,7 +197,7 @@ internal void InitVars(bool initTable) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitClass() { this.DataSetName = "MaterialDB"; this.Prefix = ""; @@ -209,13 +209,13 @@ private void InitClass() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private bool ShouldSerializeMaterials() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { this.InitVars(); @@ -223,7 +223,7 @@ private void SchemaChanged(object sender, global::System.ComponentModel.Collecti } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { MaterialDB ds = new MaterialDB(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); @@ -269,7 +269,7 @@ private void SchemaChanged(object sender, global::System.ComponentModel.Collecti return type; } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public delegate void MaterialsRowChangeEventHandler(object sender, MaterialsRowChangeEvent e); /// @@ -300,7 +300,7 @@ public partial class MaterialsDataTable : global::System.Data.TypedTableBase ///Row event argument class /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public class MaterialsRowChangeEvent : global::System.EventArgs { private MaterialsRow eventRow; @@ -831,14 +831,14 @@ public class MaterialsRowChangeEvent : global::System.EventArgs { private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public MaterialsRowChangeEvent(MaterialsRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public MaterialsRow Row { get { return this.eventRow; @@ -846,7 +846,7 @@ public MaterialsRow Row { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; diff --git a/LaserGRBL/PSHelper/MaterialDB.cs b/LaserGRBL/PSHelper/MaterialDB.cs index 3423fa94d..f2e1dc600 100644 --- a/LaserGRBL/PSHelper/MaterialDB.cs +++ b/LaserGRBL/PSHelper/MaterialDB.cs @@ -7,178 +7,178 @@ namespace LaserGRBL.PSHelper { - partial class MaterialDB - { - partial class MaterialsDataTable - { - public override void EndInit() - { - base.EndInit(); - TableNewRow += MaterialsDataTable_TableNewRow; - } - - private void MaterialsDataTable_TableNewRow(object sender, DataTableNewRowEventArgs e) - { - //throw new NotImplementedException(); - } - - protected override void OnTableNewRow(DataTableNewRowEventArgs e) - { - base.OnTableNewRow(e); - - MaterialsRow target = e.Row as MaterialsRow; - MaterialsRow last = GetLastNotDeleted(); - - if (target != null) - { - target.id = Guid.NewGuid(); - - if (last != null) - { - target.Model = last.Model; - target.Material = last.Material; - } - } - } - - private MaterialsRow GetLastNotDeleted() - { - for (int i = Rows.Count - 1; i >= 0; i--) - if (Rows[i].RowState != DataRowState.Deleted) - return Rows[i] as MaterialsRow; - - return null; - } - - protected override void OnColumnChanging(DataColumnChangeEventArgs e) - { - if (e.Column == PowerColumn && (int)e.ProposedValue < 5) - throw new Exception("Please enter a valid power level (Min 5%)"); - if (e.Column == PowerColumn && (int)e.ProposedValue > 100) - throw new Exception("Please enter a valid power level (Max 100%)"); - - if (e.Column == SpeedColumn && (int)e.ProposedValue < 1) - throw new Exception("Please enter a valid speed (Min 1 mm/min)"); - if (e.Column == SpeedColumn && (int)e.ProposedValue > 100000) - throw new Exception("Please enter a valid speed (Max 100000 mm/min)"); - - if (e.Column == CyclesColumn && (int)e.ProposedValue < 1) - throw new Exception("Please enter a valid cycles number (Min 1 cycles)"); - if (e.Column == CyclesColumn && (int)e.ProposedValue >= 100) - throw new Exception("Please enter a valid cycles number (Max 99 cycles)"); - - base.OnColumnChanging(e); - } - - private IEnumerable EnabledRows { get => this.Where(x => x.Visible); } - - - internal object[] Models() - { - return EnabledRows.Select(x => x.Model).Distinct().OrderBy(s => s).ToArray(); - } - - internal object[] Materials(string model) - { - return EnabledRows.Where(x => x.Model == model).Select(x => x.Material).Distinct().OrderBy(s => s).ToArray(); - } - - internal object[] Thickness(string model, string material, string action) - { - return EnabledRows.Where(x => x.Model == model && x.Material == material && x.Action == action).Select(x => x.Thickness).Distinct().OrderBy(s => s).ToArray(); - } - - - internal object[] Actions(string model, string material) - { - return EnabledRows.Where(x => x.Model == model && x.Material == material).Select(x => x.Action).Distinct().OrderBy(s => s).ToArray(); - } - - internal MaterialsRow GetResult(string model, string material, string action, string thickness) - { - return EnabledRows.Where(x => x.Model == model && x.Material == material && x.Thickness == thickness && x.Action == action).First(); - } - } - - private MaterialsDataTable FromServer = new MaterialsDataTable(); - - public static MaterialDB Load() - { - MaterialDB rv = new MaterialDB(); - try - { - MaterialsDataTable user = new MaterialsDataTable() { Namespace = rv.Namespace }; - MaterialsDataTable server = new MaterialsDataTable() { Namespace = rv.Namespace }; - - if (System.IO.File.Exists(UserFile)) - user.ReadXml(UserFile); - - if (System.IO.File.Exists(ServerFile)) - server.ReadXml(ServerFile); - - foreach (var row in user) - rv.Materials.ImportRow(row); - - if (rv.Materials.Rows.Count == 0) - { - foreach (var row in server) - rv.Materials.ImportRow(row); - } - else - { - foreach (var row in server) - if (rv.Materials.FindByid(row.id) == null) - rv.FromServer.ImportRow(row); //nuove dal server - } - } - catch { } - - rv.Materials.AcceptChanges(); - - if (rv.GetNewCount() > 0) - { - rv.ImportServer(); //carica da file aggiornato - rv.SaveChanges(); //salva se c'é qualche aggiornamento - } - - return rv; - } - - internal void SaveChanges() - { - try - { - if (Materials.GetChanges() != null) - { - Materials.AcceptChanges(); - Materials.WriteXml(UserFile); - } - } - catch { } - } - - internal int GetNewCount() - { - int count = 0; - foreach (var row in FromServer) - if (Materials.FindByid(row.id) == null) - count++; - return count; - } - - internal void ImportServer() - { - try - { - foreach (var row in FromServer) - if (Materials.FindByid(row.id) == null) - Materials.ImportRow(row); //nuove dal server - } - catch { } - } - - - private static string UserFile { get => System.IO.Path.Combine(LaserGRBL.GrblCore.DataPath, "UserMaterials.psh"); } - private static string ServerFile { get => System.IO.Path.Combine(LaserGRBL.GrblCore.ExePath, "StandardMaterials.psh"); } - } + partial class MaterialDB + { + partial class MaterialsDataTable + { + public override void EndInit() + { + base.EndInit(); + TableNewRow += MaterialsDataTable_TableNewRow; + } + + private void MaterialsDataTable_TableNewRow(object sender, DataTableNewRowEventArgs e) + { + //throw new NotImplementedException(); + } + + protected override void OnTableNewRow(DataTableNewRowEventArgs e) + { + base.OnTableNewRow(e); + + MaterialsRow target = e.Row as MaterialsRow; + MaterialsRow last = GetLastNotDeleted(); + + if (target != null) + { + target.id = Guid.NewGuid(); + + if (last != null) + { + target.Model = last.Model; + target.Material = last.Material; + } + } + } + + private MaterialsRow GetLastNotDeleted() + { + for (int i = Rows.Count - 1; i >= 0; i--) + if (Rows[i].RowState != DataRowState.Deleted) + return Rows[i] as MaterialsRow; + + return null; + } + + protected override void OnColumnChanging(DataColumnChangeEventArgs e) + { + if (e.Column == PowerColumn && (int)e.ProposedValue < 5) + throw new Exception("Please enter a valid power level (Min 5%)"); + if (e.Column == PowerColumn && (int)e.ProposedValue > 100) + throw new Exception("Please enter a valid power level (Max 100%)"); + + if (e.Column == SpeedColumn && (int)e.ProposedValue < 1) + throw new Exception("Please enter a valid speed (Min 1 mm/min)"); + if (e.Column == SpeedColumn && (int)e.ProposedValue > 100000) + throw new Exception("Please enter a valid speed (Max 100000 mm/min)"); + + if (e.Column == CyclesColumn && (int)e.ProposedValue < 1) + throw new Exception("Please enter a valid cycles number (Min 1 cycles)"); + if (e.Column == CyclesColumn && (int)e.ProposedValue >= 100) + throw new Exception("Please enter a valid cycles number (Max 99 cycles)"); + + base.OnColumnChanging(e); + } + + private IEnumerable EnabledRows { get => this.Where(x => x.Visible); } + + + internal object[] Models() + { + return EnabledRows.Select(x => x.Model).Distinct().OrderBy(s => s).ToArray(); + } + + internal object[] Materials(string model) + { + return EnabledRows.Where(x => x.Model == model).Select(x => x.Material).Distinct().OrderBy(s => s).ToArray(); + } + + internal object[] Thickness(string model, string material, string action) + { + return EnabledRows.Where(x => x.Model == model && x.Material == material && x.Action == action).Select(x => x.Thickness).Distinct().OrderBy(s => s).ToArray(); + } + + + internal object[] Actions(string model, string material) + { + return EnabledRows.Where(x => x.Model == model && x.Material == material).Select(x => x.Action).Distinct().OrderBy(s => s).ToArray(); + } + + internal MaterialsRow GetResult(string model, string material, string action, string thickness) + { + return EnabledRows.Where(x => x.Model == model && x.Material == material && x.Thickness == thickness && x.Action == action).First(); + } + } + + private MaterialsDataTable FromServer = new MaterialsDataTable(); + + public static MaterialDB Load() + { + MaterialDB rv = new MaterialDB(); + try + { + MaterialsDataTable user = new MaterialsDataTable() { Namespace = rv.Namespace }; + MaterialsDataTable server = new MaterialsDataTable() { Namespace = rv.Namespace }; + + if (System.IO.File.Exists(UserFile)) + user.ReadXml(UserFile); + + if (System.IO.File.Exists(ServerFile)) + server.ReadXml(ServerFile); + + foreach (var row in user) + rv.Materials.ImportRow(row); + + if (rv.Materials.Rows.Count == 0) + { + foreach (var row in server) + rv.Materials.ImportRow(row); + } + else + { + foreach (var row in server) + if (rv.Materials.FindByid(row.id) == null) + rv.FromServer.ImportRow(row); //nuove dal server + } + } + catch { } + + rv.Materials.AcceptChanges(); + + if (rv.GetNewCount() > 0) + { + rv.ImportServer(); //carica da file aggiornato + rv.SaveChanges(); //salva se c'é qualche aggiornamento + } + + return rv; + } + + internal void SaveChanges() + { + try + { + if (Materials.GetChanges() != null) + { + Materials.AcceptChanges(); + Materials.WriteXml(UserFile); + } + } + catch { } + } + + internal int GetNewCount() + { + int count = 0; + foreach (var row in FromServer) + if (Materials.FindByid(row.id) == null) + count++; + return count; + } + + internal void ImportServer() + { + try + { + foreach (var row in FromServer) + if (Materials.FindByid(row.id) == null) + Materials.ImportRow(row); //nuove dal server + } + catch { } + } + + + private static string UserFile { get => System.IO.Path.Combine(LaserGRBL.GrblCore.DataPath, "UserMaterials.psh"); } + private static string ServerFile { get => System.IO.Path.Combine(LaserGRBL.GrblCore.ExePath, "StandardMaterials.psh"); } + } } diff --git a/LaserGRBL/Strings.Designer.cs b/LaserGRBL/Strings.Designer.cs index 5f0a05b01..cb4347361 100644 --- a/LaserGRBL/Strings.Designer.cs +++ b/LaserGRBL/Strings.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Il codice è stato generato da uno strumento. +// Versione runtime:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se +// il codice viene rigenerato. // //------------------------------------------------------------------------------ @@ -13,13 +13,13 @@ namespace LaserGRBL { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + // Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder. + // tramite uno strumento quale ResGen o Visual Studio. + // Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen + // con l'opzione /str oppure ricompilare il progetto VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Strings { @@ -33,7 +33,7 @@ internal Strings() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Strings() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le + /// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ internal Strings() { } /// - /// Looks up a localized string similar to Right click here to add custom buttons. + /// Cerca una stringa localizzata simile a Right click here to add custom buttons. /// internal static string AddCustomButtonsHint { get { @@ -70,7 +70,7 @@ internal static string AddCustomButtonsHint { } /// - /// Looks up a localized string similar to Abort current job?. + /// Cerca una stringa localizzata simile a Abort current job?. /// internal static string BoxAbortProgramConfirm { get { @@ -79,7 +79,7 @@ internal static string BoxAbortProgramConfirm { } /// - /// Looks up a localized string similar to Automatic update failed! + /// Cerca una stringa localizzata simile a Automatic update failed! ///Please manually download the new version from lasergrbl site.. /// internal static string BoxAutoUpdateFailed { @@ -89,7 +89,7 @@ internal static string BoxAutoUpdateFailed { } /// - /// Looks up a localized string similar to Update require administrator privilege!. + /// Cerca una stringa localizzata simile a Update require administrator privilege!. /// internal static string BoxAutoUpdateRequireAdmin { get { @@ -98,7 +98,7 @@ internal static string BoxAutoUpdateRequireAdmin { } /// - /// Looks up a localized string similar to Update result. + /// Cerca una stringa localizzata simile a Update result. /// internal static string BoxAutoUpdateResult { get { @@ -107,7 +107,7 @@ internal static string BoxAutoUpdateResult { } /// - /// Looks up a localized string similar to Update success!. + /// Cerca una stringa localizzata simile a Update success!. /// internal static string BoxAutoUpdateSuccess { get { @@ -116,7 +116,7 @@ internal static string BoxAutoUpdateSuccess { } /// - /// Looks up a localized string similar to There are some changes that have not been applied. + /// Cerca una stringa localizzata simile a There are some changes that have not been applied. ///Do you want to rewrite the configuration?. /// internal static string BoxConfigDetectedChanges { @@ -126,7 +126,7 @@ internal static string BoxConfigDetectedChanges { } /// - /// Looks up a localized string similar to Changes detected!. + /// Cerca una stringa localizzata simile a Changes detected!. /// internal static string BoxConfigDetectedChangesTitle { get { @@ -135,7 +135,7 @@ internal static string BoxConfigDetectedChangesTitle { } /// - /// Looks up a localized string similar to Cannot connect to device. + /// Cerca una stringa localizzata simile a Cannot connect to device. /// internal static string BoxConnectErrorTitle { get { @@ -144,7 +144,7 @@ internal static string BoxConnectErrorTitle { } /// - /// Looks up a localized string similar to Please provide GCode commands. + /// Cerca una stringa localizzata simile a Please provide GCode commands. /// internal static string BoxCustomButtonPleaseGCodeText { get { @@ -153,7 +153,7 @@ internal static string BoxCustomButtonPleaseGCodeText { } /// - /// Looks up a localized string similar to Please provide tooltip text. + /// Cerca una stringa localizzata simile a Please provide tooltip text. /// internal static string BoxCustomButtonPleaseToolTipText { get { @@ -162,7 +162,7 @@ internal static string BoxCustomButtonPleaseToolTipText { } /// - /// Looks up a localized string similar to Missing field. + /// Cerca una stringa localizzata simile a Missing field. /// internal static string BoxCustomButtonPleaseToolTipTitle { get { @@ -171,7 +171,7 @@ internal static string BoxCustomButtonPleaseToolTipTitle { } /// - /// Looks up a localized string similar to Are you sure to delete selected button?. + /// Cerca una stringa localizzata simile a Are you sure to delete selected button?. /// internal static string BoxDeleteCustomButtonText { get { @@ -180,7 +180,7 @@ internal static string BoxDeleteCustomButtonText { } /// - /// Looks up a localized string similar to Delete custom button. + /// Cerca una stringa localizzata simile a Delete custom button. /// internal static string BoxDeleteCustomButtonTitle { get { @@ -189,7 +189,7 @@ internal static string BoxDeleteCustomButtonTitle { } /// - /// Looks up a localized string similar to Error exporting config!. + /// Cerca una stringa localizzata simile a Error exporting config!. /// internal static string BoxExportConfigError { get { @@ -198,7 +198,7 @@ internal static string BoxExportConfigError { } /// - /// Looks up a localized string similar to Error. + /// Cerca una stringa localizzata simile a Error. /// internal static string BoxExportConfigErrorTitle { get { @@ -207,7 +207,7 @@ internal static string BoxExportConfigErrorTitle { } /// - /// Looks up a localized string similar to File does not exist!. + /// Cerca una stringa localizzata simile a File does not exist!. /// internal static string BoxExportConfigFileNotFound { get { @@ -216,7 +216,7 @@ internal static string BoxExportConfigFileNotFound { } /// - /// Looks up a localized string similar to {0} Config exported successfully!. + /// Cerca una stringa localizzata simile a {0} Config exported successfully!. /// internal static string BoxExportConfigSuccess { get { @@ -225,7 +225,7 @@ internal static string BoxExportConfigSuccess { } /// - /// Looks up a localized string similar to Success. + /// Cerca una stringa localizzata simile a Success. /// internal static string BoxExportConfigSuccessTitle { get { @@ -234,7 +234,7 @@ internal static string BoxExportConfigSuccessTitle { } /// - /// Looks up a localized string similar to Error reading file!. + /// Cerca una stringa localizzata simile a Error reading file!. /// internal static string BoxImportConfigFileError { get { @@ -243,7 +243,7 @@ internal static string BoxImportConfigFileError { } /// - /// Looks up a localized string similar to {0} Config imported with {1} errors!. + /// Cerca una stringa localizzata simile a {0} Config imported with {1} errors!. /// internal static string BoxImportConfigWithError { get { @@ -252,7 +252,7 @@ internal static string BoxImportConfigWithError { } /// - /// Looks up a localized string similar to {0} Config imported successfully!. + /// Cerca una stringa localizzata simile a {0} Config imported successfully!. /// internal static string BoxImportConfigWithoutError { get { @@ -261,7 +261,7 @@ internal static string BoxImportConfigWithoutError { } /// - /// Looks up a localized string similar to Import custom button. + /// Cerca una stringa localizzata simile a Import custom button. /// internal static string BoxImportCustomButtonCaption { get { @@ -270,7 +270,7 @@ internal static string BoxImportCustomButtonCaption { } /// - /// Looks up a localized string similar to Remove actual buttons? Select yes to remove, no to keep.. + /// Cerca una stringa localizzata simile a Remove actual buttons? Select yes to remove, no to keep.. /// internal static string BoxImportCustomButtonClearText { get { @@ -279,7 +279,7 @@ internal static string BoxImportCustomButtonClearText { } /// - /// Looks up a localized string similar to Confirmation. + /// Cerca una stringa localizzata simile a Confirmation. /// internal static string BoxImportCustomButtonrCaption { get { @@ -288,7 +288,7 @@ internal static string BoxImportCustomButtonrCaption { } /// - /// Looks up a localized string similar to Error reading config!. + /// Cerca una stringa localizzata simile a Error reading config!. /// internal static string BoxReadConfigError { get { @@ -297,7 +297,7 @@ internal static string BoxReadConfigError { } /// - /// Looks up a localized string similar to Showing cached values.... + /// Cerca una stringa localizzata simile a Showing cached values.... /// internal static string BoxReadConfigPleaseConnect { get { @@ -306,7 +306,7 @@ internal static string BoxReadConfigPleaseConnect { } /// - /// Looks up a localized string similar to {0} Config read successfully!. + /// Cerca una stringa localizzata simile a {0} Config read successfully!. /// internal static string BoxReadConfigSuccess { get { @@ -315,7 +315,7 @@ internal static string BoxReadConfigSuccess { } /// - /// Looks up a localized string similar to Test notification has been sent, please check your phone!. + /// Cerca una stringa localizzata simile a Test notification has been sent, please check your phone!. /// internal static string BoxTelegramSettingText { get { @@ -324,7 +324,7 @@ internal static string BoxTelegramSettingText { } /// - /// Looks up a localized string similar to Telegram notification. + /// Cerca una stringa localizzata simile a Telegram notification. /// internal static string BoxTelegramSettingTitle { get { @@ -333,7 +333,7 @@ internal static string BoxTelegramSettingTitle { } /// - /// Looks up a localized string similar to No changes... nothing to write!. + /// Cerca una stringa localizzata simile a No changes... nothing to write!. /// internal static string BoxWriteConfigNoChange { get { @@ -342,7 +342,7 @@ internal static string BoxWriteConfigNoChange { } /// - /// Looks up a localized string similar to {0} Config written with {1} errors!. + /// Cerca una stringa localizzata simile a {0} Config written with {1} errors!. /// internal static string BoxWriteConfigWithError { get { @@ -351,7 +351,7 @@ internal static string BoxWriteConfigWithError { } /// - /// Looks up a localized string similar to {0} Config written successfully!. + /// Cerca una stringa localizzata simile a {0} Config written successfully!. /// internal static string BoxWriteConfigWithoutError { get { @@ -360,7 +360,7 @@ internal static string BoxWriteConfigWithoutError { } /// - /// Looks up a localized string similar to Connect. + /// Cerca una stringa localizzata simile a Connect. /// internal static string BtnConnectTT { get { @@ -369,7 +369,7 @@ internal static string BtnConnectTT { } /// - /// Looks up a localized string similar to Disconnect. + /// Cerca una stringa localizzata simile a Disconnect. /// internal static string BtnDisconnectTT { get { @@ -378,7 +378,7 @@ internal static string BtnDisconnectTT { } /// - /// Looks up a localized string similar to Edit button. + /// Cerca una stringa localizzata simile a Edit button. /// internal static string CustomButtonEdit { get { @@ -387,7 +387,7 @@ internal static string CustomButtonEdit { } /// - /// Looks up a localized string similar to Remove button. + /// Cerca una stringa localizzata simile a Remove button. /// internal static string CustomButtonRemove { get { @@ -396,7 +396,7 @@ internal static string CustomButtonRemove { } /// - /// Looks up a localized string similar to Diagonal (old). + /// Cerca una stringa localizzata simile a Diagonal (old). /// internal static string DirectionDiagonal { get { @@ -405,7 +405,7 @@ internal static string DirectionDiagonal { } /// - /// Looks up a localized string similar to Horizontal (old). + /// Cerca una stringa localizzata simile a Horizontal (old). /// internal static string DirectionHorizontal { get { @@ -414,7 +414,7 @@ internal static string DirectionHorizontal { } /// - /// Looks up a localized string similar to Cross Fill. + /// Cerca una stringa localizzata simile a Cross Fill. /// internal static string DirectionNewCross { get { @@ -423,7 +423,7 @@ internal static string DirectionNewCross { } /// - /// Looks up a localized string similar to Diagonal. + /// Cerca una stringa localizzata simile a Diagonal. /// internal static string DirectionNewDiagonal { get { @@ -432,7 +432,7 @@ internal static string DirectionNewDiagonal { } /// - /// Looks up a localized string similar to Diagonal Cross Fill. + /// Cerca una stringa localizzata simile a Diagonal Cross Fill. /// internal static string DirectionNewDiagonalCross { get { @@ -441,7 +441,7 @@ internal static string DirectionNewDiagonalCross { } /// - /// Looks up a localized string similar to Diagonal Grid. + /// Cerca una stringa localizzata simile a Diagonal Grid. /// internal static string DirectionNewDiagonalGrid { get { @@ -450,7 +450,7 @@ internal static string DirectionNewDiagonalGrid { } /// - /// Looks up a localized string similar to Grid. + /// Cerca una stringa localizzata simile a Grid. /// internal static string DirectionNewGrid { get { @@ -459,7 +459,7 @@ internal static string DirectionNewGrid { } /// - /// Looks up a localized string similar to Hilbert. + /// Cerca una stringa localizzata simile a Hilbert. /// internal static string DirectionNewHilbert { get { @@ -468,7 +468,7 @@ internal static string DirectionNewHilbert { } /// - /// Looks up a localized string similar to Horizontal. + /// Cerca una stringa localizzata simile a Horizontal. /// internal static string DirectionNewHorizontal { get { @@ -477,7 +477,7 @@ internal static string DirectionNewHorizontal { } /// - /// Looks up a localized string similar to Inset Filling. + /// Cerca una stringa localizzata simile a Inset Filling. /// internal static string DirectionNewInsetFilling { get { @@ -486,7 +486,7 @@ internal static string DirectionNewInsetFilling { } /// - /// Looks up a localized string similar to Diagonal Reversed. + /// Cerca una stringa localizzata simile a Diagonal Reversed. /// internal static string DirectionNewReverseDiagonal { get { @@ -495,7 +495,7 @@ internal static string DirectionNewReverseDiagonal { } /// - /// Looks up a localized string similar to Squares. + /// Cerca una stringa localizzata simile a Squares. /// internal static string DirectionNewSquares { get { @@ -504,7 +504,7 @@ internal static string DirectionNewSquares { } /// - /// Looks up a localized string similar to Vertical. + /// Cerca una stringa localizzata simile a Vertical. /// internal static string DirectionNewVertical { get { @@ -513,7 +513,7 @@ internal static string DirectionNewVertical { } /// - /// Looks up a localized string similar to Zig Zag. + /// Cerca una stringa localizzata simile a Zig Zag. /// internal static string DirectionNewZigZag { get { @@ -522,7 +522,7 @@ internal static string DirectionNewZigZag { } /// - /// Looks up a localized string similar to No Filling. + /// Cerca una stringa localizzata simile a No Filling. /// internal static string DirectionNone { get { @@ -531,7 +531,7 @@ internal static string DirectionNone { } /// - /// Looks up a localized string similar to Vertical (old). + /// Cerca una stringa localizzata simile a Vertical (old). /// internal static string DirectionVertical { get { @@ -540,7 +540,7 @@ internal static string DirectionVertical { } /// - /// Looks up a localized string similar to File transfer in progress. Disconnect anyway?. + /// Cerca una stringa localizzata simile a File transfer in progress. Disconnect anyway?. /// internal static string DisconnectAnyway { get { @@ -549,7 +549,7 @@ internal static string DisconnectAnyway { } /// - /// Looks up a localized string similar to Dithering Options. + /// Cerca una stringa localizzata simile a Dithering Options. /// internal static string DitheringOptions { get { @@ -558,7 +558,7 @@ internal static string DitheringOptions { } /// - /// Looks up a localized string similar to File transfer in progress. Exit anyway?. + /// Cerca una stringa localizzata simile a File transfer in progress. Exit anyway?. /// internal static string ExitAnyway { get { @@ -567,7 +567,7 @@ internal static string ExitAnyway { } /// - /// Looks up a localized string similar to Restart required. + /// Cerca una stringa localizzata simile a Restart required. /// internal static string FirmwareRequireRestart { get { @@ -576,7 +576,7 @@ internal static string FirmwareRequireRestart { } /// - /// Looks up a localized string similar to Restart is required to apply Firmware type changes. Restart now?. + /// Cerca una stringa localizzata simile a Restart is required to apply Firmware type changes. Restart now?. /// internal static string FirmwareRequireRestartNow { get { @@ -585,7 +585,7 @@ internal static string FirmwareRequireRestartNow { } /// - /// Looks up a localized string similar to Custom. + /// Cerca una stringa localizzata simile a Custom. /// internal static string FormulaCustom { get { @@ -594,7 +594,7 @@ internal static string FormulaCustom { } /// - /// Looks up a localized string similar to OpticalCorrect. + /// Cerca una stringa localizzata simile a OpticalCorrect. /// internal static string FormulaOpticalCorrect { get { @@ -603,7 +603,7 @@ internal static string FormulaOpticalCorrect { } /// - /// Looks up a localized string similar to SimpleAverage. + /// Cerca una stringa localizzata simile a SimpleAverage. /// internal static string FormulaSimpleAverage { get { @@ -612,7 +612,7 @@ internal static string FormulaSimpleAverage { } /// - /// Looks up a localized string similar to WeightAverage. + /// Cerca una stringa localizzata simile a WeightAverage. /// internal static string FormulaWeightAverage { get { @@ -621,7 +621,7 @@ internal static string FormulaWeightAverage { } /// - /// Looks up a localized string similar to Smooth (HQ Bicubic). + /// Cerca una stringa localizzata simile a Smooth (HQ Bicubic). /// internal static string InterpolationModeHighQualityBicubic { get { @@ -630,7 +630,7 @@ internal static string InterpolationModeHighQualityBicubic { } /// - /// Looks up a localized string similar to Sharp (NearestNeighbor). + /// Cerca una stringa localizzata simile a Sharp (NearestNeighbor). /// internal static string InterpolationModeNearestNeighbor { get { @@ -639,7 +639,7 @@ internal static string InterpolationModeNearestNeighbor { } /// - /// Looks up a localized string similar to Restart required. + /// Cerca una stringa localizzata simile a Restart required. /// internal static string LanguageRequireRestart { get { @@ -648,7 +648,7 @@ internal static string LanguageRequireRestart { } /// - /// Looks up a localized string similar to Require application restart, restart now?. + /// Cerca una stringa localizzata simile a Require application restart, restart now?. /// internal static string LanguageRequireRestartNow { get { @@ -657,7 +657,7 @@ internal static string LanguageRequireRestartNow { } /// - /// Looks up a localized string similar to Line To Line Options. + /// Cerca una stringa localizzata simile a Line To Line Options. /// internal static string Line2LineOptions { get { @@ -666,7 +666,7 @@ internal static string Line2LineOptions { } /// - /// Looks up a localized string similar to Alarm. + /// Cerca una stringa localizzata simile a Alarm. /// internal static string MacStatusAlarm { get { @@ -675,7 +675,7 @@ internal static string MacStatusAlarm { } /// - /// Looks up a localized string similar to Check. + /// Cerca una stringa localizzata simile a Check. /// internal static string MacStatusCheck { get { @@ -684,7 +684,7 @@ internal static string MacStatusCheck { } /// - /// Looks up a localized string similar to Connecting. + /// Cerca una stringa localizzata simile a Connecting. /// internal static string MacStatusConnecting { get { @@ -693,7 +693,7 @@ internal static string MacStatusConnecting { } /// - /// Looks up a localized string similar to Disconnected. + /// Cerca una stringa localizzata simile a Disconnected. /// internal static string MacStatusDisconnected { get { @@ -702,7 +702,7 @@ internal static string MacStatusDisconnected { } /// - /// Looks up a localized string similar to Door. + /// Cerca una stringa localizzata simile a Door. /// internal static string MacStatusDoor { get { @@ -711,7 +711,7 @@ internal static string MacStatusDoor { } /// - /// Looks up a localized string similar to Hold. + /// Cerca una stringa localizzata simile a Hold. /// internal static string MacStatusHold { get { @@ -720,7 +720,7 @@ internal static string MacStatusHold { } /// - /// Looks up a localized string similar to Home. + /// Cerca una stringa localizzata simile a Home. /// internal static string MacStatusHome { get { @@ -729,7 +729,7 @@ internal static string MacStatusHome { } /// - /// Looks up a localized string similar to Idle. + /// Cerca una stringa localizzata simile a Idle. /// internal static string MacStatusIdle { get { @@ -738,7 +738,7 @@ internal static string MacStatusIdle { } /// - /// Looks up a localized string similar to Jog. + /// Cerca una stringa localizzata simile a Jog. /// internal static string MacStatusJog { get { @@ -747,7 +747,7 @@ internal static string MacStatusJog { } /// - /// Looks up a localized string similar to Run. + /// Cerca una stringa localizzata simile a Run. /// internal static string MacStatusRun { get { @@ -756,7 +756,7 @@ internal static string MacStatusRun { } /// - /// Looks up a localized string similar to Unknown. + /// Cerca una stringa localizzata simile a Unknown. /// internal static string MacStatusUnknown { get { @@ -765,7 +765,7 @@ internal static string MacStatusUnknown { } /// - /// Looks up a localized string similar to Estimated Time:. + /// Cerca una stringa localizzata simile a Estimated Time:. /// internal static string MainFormEstimatedTime { get { @@ -774,7 +774,7 @@ internal static string MainFormEstimatedTime { } /// - /// Looks up a localized string similar to Projected Time:. + /// Cerca una stringa localizzata simile a Projected Time:. /// internal static string MainFormProjectedTime { get { @@ -783,7 +783,7 @@ internal static string MainFormProjectedTime { } /// - /// Looks up a localized string similar to Cannot open a new file now.. + /// Cerca una stringa localizzata simile a Cannot open a new file now.. /// internal static string MsgboxCannotOpenFileNow { get { @@ -792,7 +792,7 @@ internal static string MsgboxCannotOpenFileNow { } /// - /// Looks up a localized string similar to Error connecting your engraver. + /// Cerca una stringa localizzata simile a Error connecting your engraver. ///If you need help click on "?" button.. /// internal static string ProblemConnectingText { @@ -802,7 +802,7 @@ internal static string ProblemConnectingText { } /// - /// Looks up a localized string similar to Problem with connection?. + /// Cerca una stringa localizzata simile a Problem with connection?. /// internal static string ProblemConnectingTitle { get { @@ -811,7 +811,7 @@ internal static string ProblemConnectingTitle { } /// - /// Looks up a localized string similar to It seems that the current position is no longer known by Grbl. + /// Cerca una stringa localizzata simile a It seems that the current position is no longer known by Grbl. ///Without the Homing Procedure ($H) the result may not be reliable. ///Continue anyway?. /// @@ -822,7 +822,7 @@ internal static string ResumeJobHomingRequired { } /// - /// Looks up a localized string similar to Unknown position. + /// Cerca una stringa localizzata simile a Unknown position. /// internal static string ResumeJobHomingRequiredTitle { get { @@ -831,7 +831,7 @@ internal static string ResumeJobHomingRequiredTitle { } /// - /// Looks up a localized string similar to Speed:. + /// Cerca una stringa localizzata simile a Speed:. /// internal static string SpeedSliderToolTip { get { @@ -840,7 +840,7 @@ internal static string SpeedSliderToolTip { } /// - /// Looks up a localized string similar to Step:. + /// Cerca una stringa localizzata simile a Step:. /// internal static string StepSliderToolTip { get { @@ -849,7 +849,7 @@ internal static string StepSliderToolTip { } /// - /// Looks up a localized string similar to This file type is not supported.. + /// Cerca una stringa localizzata simile a This file type is not supported.. /// internal static string UnsupportedFiletype { get { @@ -858,7 +858,7 @@ internal static string UnsupportedFiletype { } /// - /// Looks up a localized string similar to If the buffer is blocked, it is because there was some communication problem with your engraver. If you press "OK" LaserGRBL will ignore the full buffer and send the next commands. If this happens often, you should try to understand the causes of this problem. + /// Cerca una stringa localizzata simile a If the buffer is blocked, it is because there was some communication problem with your engraver. If you press "OK" LaserGRBL will ignore the full buffer and send the next commands. If this happens often, you should try to understand the causes of this problem. ///Click "?" for more information.. /// internal static string WarnBufferStuckUnlockText { @@ -868,7 +868,7 @@ internal static string WarnBufferStuckUnlockText { } /// - /// Looks up a localized string similar to Unlock buffer. + /// Cerca una stringa localizzata simile a Unlock buffer. /// internal static string WarnBufferStuckUnlockTitle { get { @@ -877,7 +877,7 @@ internal static string WarnBufferStuckUnlockTitle { } /// - /// Looks up a localized string similar to Centerline option is not compatible with your PC. + /// Cerca una stringa localizzata simile a Centerline option is not compatible with your PC. ///64bit OS is needed!. /// internal static string WarnCenterline64bit { @@ -887,7 +887,7 @@ internal static string WarnCenterline64bit { } /// - /// Looks up a localized string similar to Line2Line option is not compatible with your engraver or with your configuration. PWM-able laser is needed, and PWM support should be enabled in LaserGRBL settings.. + /// Cerca una stringa localizzata simile a Line2Line option is not compatible with your engraver or with your configuration. PWM-able laser is needed, and PWM support should be enabled in LaserGRBL settings.. /// internal static string WarnLine2LinePWM { get { @@ -896,7 +896,7 @@ internal static string WarnLine2LinePWM { } /// - /// Looks up a localized string similar to Warning. + /// Cerca una stringa localizzata simile a Warning. /// internal static string WarnMessageBoxHeader { get { @@ -905,7 +905,7 @@ internal static string WarnMessageBoxHeader { } /// - /// Looks up a localized string similar to You have set negative offsets, but your engraver is set to use positive space with soft limit alarm enabled ($20=1). + /// Cerca una stringa localizzata simile a You have set negative offsets, but your engraver is set to use positive space with soft limit alarm enabled ($20=1). /// ///This could generate a soft-limit error. Are you sure of the entered values?. /// @@ -916,7 +916,7 @@ internal static string WarnSoftLimitNS { } /// - /// Looks up a localized string similar to You have set a size and offset that makes the job larger than the workspace configured in your engraver ({0}mm x {1}mm). + /// Cerca una stringa localizzata simile a You have set a size and offset that makes the job larger than the workspace configured in your engraver ({0}mm x {1}mm). ///Grbl Parameters $130 and $131. /// ///This could generate a soft-limit error or the machine could crash into the axes boundary. Are you sure of the entered values?. @@ -928,7 +928,7 @@ internal static string WarnSoftLimitOOB { } /// - /// Looks up a localized string similar to Job boundary confirmation. + /// Cerca una stringa localizzata simile a Job boundary confirmation. /// internal static string WarnSoftLimitTitle { get { @@ -937,7 +937,7 @@ internal static string WarnSoftLimitTitle { } /// - /// Looks up a localized string similar to Freely assigning the width and height of the work can lead to distortion of the image. Do you want to continue?. + /// Cerca una stringa localizzata simile a Freely assigning the width and height of the work can lead to distortion of the image. Do you want to continue?. /// internal static string WarnUnlockProportionText { get { @@ -946,7 +946,7 @@ internal static string WarnUnlockProportionText { } /// - /// Looks up a localized string similar to Warning. + /// Cerca una stringa localizzata simile a Warning. /// internal static string WarnUnlockProportionTitle { get { @@ -955,7 +955,7 @@ internal static string WarnUnlockProportionTitle { } /// - /// Looks up a localized string similar to "M4 Dynamic Laser Power Mode" has been set, but your engraver doesn't seem to support it. + /// Cerca una stringa localizzata simile a "M4 Dynamic Laser Power Mode" has been set, but your engraver doesn't seem to support it. ///Only engravers with grbl version >= 1.1 with "laser mode" enabled ($32=1) can take advantage of M4 option.. /// internal static string WarnWrongLaserMode { @@ -965,7 +965,7 @@ internal static string WarnWrongLaserMode { } /// - /// Looks up a localized string similar to Warning. + /// Cerca una stringa localizzata simile a Warning. /// internal static string WarnWrongLaserModeTitle { get { From 216002b50eebc1f3f2973d13464a4086e5ab6356 Mon Sep 17 00:00:00 2001 From: vniacob Date: Sat, 4 Jun 2022 15:37:54 +0200 Subject: [PATCH 3/6] Revision on gcode export, deletion of useless code --- LaserGRBL/App.config | 2 +- LaserGRBL/ConnectLogForm.Designer.cs | 444 +++++++++++++-------------- LaserGRBL/ConnectLogForm.cs | 14 +- LaserGRBL/ConnectLogForm.resx | 12 +- LaserGRBL/Core/GrblCore.cs | 8 +- LaserGRBL/GrblFile.cs | 10 +- LaserGRBL/HotKeysManager.cs | 2 +- LaserGRBL/LaserGRBL.csproj | 4 +- LaserGRBL/MainForm.cs | 4 +- LaserGRBL/SaveOptionForm.Designer.cs | 226 ++++++-------- LaserGRBL/SaveOptionForm.cs | 5 +- LaserGRBL/SaveOptionForm.resx | 65 +--- LaserGRBL/Strings.Designer.cs | 2 +- 13 files changed, 357 insertions(+), 441 deletions(-) diff --git a/LaserGRBL/App.config b/LaserGRBL/App.config index bf4f2cc01..dd7ba6f6c 100644 --- a/LaserGRBL/App.config +++ b/LaserGRBL/App.config @@ -14,6 +14,6 @@ - + diff --git a/LaserGRBL/ConnectLogForm.Designer.cs b/LaserGRBL/ConnectLogForm.Designer.cs index c4a17bd2b..0ac01850e 100644 --- a/LaserGRBL/ConnectLogForm.Designer.cs +++ b/LaserGRBL/ConnectLogForm.Designer.cs @@ -58,32 +58,18 @@ private void InitializeComponent() this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.GBCommands = new System.Windows.Forms.Panel(); this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); - this.TxtManualCommand = new LaserGRBL.UserControls.GrblTextBox(); - this.CmdLog = new LaserGRBL.UserControls.CommandLog(); this.GBFile = new System.Windows.Forms.Panel(); this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); - this.BtnFileAppend2 = new LaserGRBL.UserControls.ImageButton(); - this.BtnFileAppend1 = new LaserGRBL.UserControls.ImageButton(); - this.BtnFileAppend = new LaserGRBL.UserControls.ImageButton(); this.chkFileEnable2 = new System.Windows.Forms.CheckBox(); this.chkFileEnable1 = new System.Windows.Forms.CheckBox(); this.UDLoopCounter2 = new System.Windows.Forms.NumericUpDown(); this.UDLoopCounter1 = new System.Windows.Forms.NumericUpDown(); - this.btnFileSetup2 = new LaserGRBL.UserControls.ImageButton(); - this.btnFileSetup1 = new LaserGRBL.UserControls.ImageButton(); - this.btnFileSetup = new LaserGRBL.UserControls.ImageButton(); - this.BtnOpen2 = new LaserGRBL.UserControls.ImageButton(); this.TbFileName2 = new System.Windows.Forms.TextBox(); - this.BtnOpen1 = new LaserGRBL.UserControls.ImageButton(); this.TbFileName1 = new System.Windows.Forms.TextBox(); this.LblFilename = new System.Windows.Forms.Label(); this.TbFileName = new System.Windows.Forms.TextBox(); - this.PB = new LaserGRBL.UserControls.DoubleProgressBar(); - this.BtnOpen = new LaserGRBL.UserControls.ImageButton(); this.LblFilename1 = new System.Windows.Forms.Label(); this.UDLoopCounter = new System.Windows.Forms.NumericUpDown(); - this.BtnRunProgram = new LaserGRBL.UserControls.ImageButton(); - this.BtnAbortProgram = new LaserGRBL.UserControls.ImageButton(); this.LblFilename2 = new System.Windows.Forms.Label(); this.LblProgress = new System.Windows.Forms.Label(); this.chkFileEnable = new System.Windows.Forms.CheckBox(); @@ -97,8 +83,22 @@ private void InitializeComponent() this.LblAddress = new System.Windows.Forms.Label(); this.TxtAddress = new System.Windows.Forms.TextBox(); this.TxtEmulator = new System.Windows.Forms.TextBox(); - this.BtnConnectDisconnect = new LaserGRBL.UserControls.ImageButton(); this.TT = new System.Windows.Forms.ToolTip(this.components); + this.TxtManualCommand = new LaserGRBL.UserControls.GrblTextBox(); + this.CmdLog = new LaserGRBL.UserControls.CommandLog(); + this.BtnFileAppend2 = new LaserGRBL.UserControls.ImageButton(); + this.BtnFileAppend1 = new LaserGRBL.UserControls.ImageButton(); + this.BtnFileAppend = new LaserGRBL.UserControls.ImageButton(); + this.btnFileSetup2 = new LaserGRBL.UserControls.ImageButton(); + this.btnFileSetup1 = new LaserGRBL.UserControls.ImageButton(); + this.btnFileSetup = new LaserGRBL.UserControls.ImageButton(); + this.BtnOpen2 = new LaserGRBL.UserControls.ImageButton(); + this.BtnOpen1 = new LaserGRBL.UserControls.ImageButton(); + this.PB = new LaserGRBL.UserControls.DoubleProgressBar(); + this.BtnOpen = new LaserGRBL.UserControls.ImageButton(); + this.BtnRunProgram = new LaserGRBL.UserControls.ImageButton(); + this.BtnAbortProgram = new LaserGRBL.UserControls.ImageButton(); + this.BtnConnectDisconnect = new LaserGRBL.UserControls.ImageButton(); this.tableLayoutPanel1.SuspendLayout(); this.GBCommands.SuspendLayout(); this.tableLayoutPanel6.SuspendLayout(); @@ -132,24 +132,6 @@ private void InitializeComponent() this.tableLayoutPanel6.Controls.Add(this.CmdLog, 0, 1); this.tableLayoutPanel6.Name = "tableLayoutPanel6"; // - // TxtManualCommand - // - resources.ApplyResources(this.TxtManualCommand, "TxtManualCommand"); - this.TxtManualCommand.Name = "TxtManualCommand"; - this.TxtManualCommand.WaterMarkActiveForeColor = System.Drawing.Color.Gray; - this.TxtManualCommand.WaterMarkFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.TxtManualCommand.WaterMarkForeColor = System.Drawing.Color.LightGray; - this.TxtManualCommand.CommandEntered += new LaserGRBL.UserControls.GrblTextBox.CommandEnteredDlg(this.TxtManualCommandCommandEntered); - this.TxtManualCommand.Enter += new System.EventHandler(this.TxtManualCommand_Enter); - this.TxtManualCommand.Leave += new System.EventHandler(this.TxtManualCommand_Leave); - // - // CmdLog - // - this.CmdLog.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - resources.ApplyResources(this.CmdLog, "CmdLog"); - this.CmdLog.Name = "CmdLog"; - this.CmdLog.TabStop = false; - // // GBFile // resources.ApplyResources(this.GBFile, "GBFile"); @@ -186,51 +168,6 @@ private void InitializeComponent() this.tableLayoutPanel5.Controls.Add(this.chkFileEnable, 6, 0); this.tableLayoutPanel5.Name = "tableLayoutPanel5"; // - // BtnFileAppend2 - // - this.BtnFileAppend2.AltImage = null; - this.BtnFileAppend2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnFileAppend2.Caption = null; - this.BtnFileAppend2.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnFileAppend2, "BtnFileAppend2"); - this.BtnFileAppend2.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend2.Image"))); - this.BtnFileAppend2.Name = "BtnFileAppend2"; - this.BtnFileAppend2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnFileAppend2.TabStop = false; - this.TT.SetToolTip(this.BtnFileAppend2, resources.GetString("BtnFileAppend2.ToolTip")); - this.BtnFileAppend2.UseAltImage = false; - this.BtnFileAppend2.Click += new System.EventHandler(this.BtnFileAppend2_Click); - // - // BtnFileAppend1 - // - this.BtnFileAppend1.AltImage = null; - this.BtnFileAppend1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnFileAppend1.Caption = null; - this.BtnFileAppend1.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnFileAppend1, "BtnFileAppend1"); - this.BtnFileAppend1.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend1.Image"))); - this.BtnFileAppend1.Name = "BtnFileAppend1"; - this.BtnFileAppend1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnFileAppend1.TabStop = false; - this.TT.SetToolTip(this.BtnFileAppend1, resources.GetString("BtnFileAppend1.ToolTip")); - this.BtnFileAppend1.UseAltImage = false; - this.BtnFileAppend1.Click += new System.EventHandler(this.BtnFileAppend1_Click); - // - // BtnFileAppend - // - this.BtnFileAppend.AltImage = null; - this.BtnFileAppend.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnFileAppend.Caption = null; - this.BtnFileAppend.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnFileAppend, "BtnFileAppend"); - this.BtnFileAppend.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend.Image"))); - this.BtnFileAppend.Name = "BtnFileAppend"; - this.BtnFileAppend.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnFileAppend.TabStop = false; - this.TT.SetToolTip(this.BtnFileAppend, resources.GetString("BtnFileAppend.ToolTip")); - this.BtnFileAppend.UseAltImage = false; - this.BtnFileAppend.Click += new System.EventHandler(this.BtnFileAppend_Click); - // // chkFileEnable2 // resources.ApplyResources(this.chkFileEnable2, "chkFileEnable2"); @@ -293,66 +230,6 @@ private void InitializeComponent() 0}); this.UDLoopCounter1.ValueChanged += new System.EventHandler(this.UDLoopCounter1_ValueChanged); // - // btnFileSetup2 - // - this.btnFileSetup2.AltImage = null; - this.btnFileSetup2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnFileSetup2.Caption = null; - this.btnFileSetup2.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.btnFileSetup2, "btnFileSetup2"); - this.btnFileSetup2.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup2.Image"))); - this.btnFileSetup2.Name = "btnFileSetup2"; - this.btnFileSetup2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.btnFileSetup2.TabStop = false; - this.TT.SetToolTip(this.btnFileSetup2, resources.GetString("btnFileSetup2.ToolTip")); - this.btnFileSetup2.UseAltImage = false; - this.btnFileSetup2.Click += new System.EventHandler(this.BtnReOpen2_Click); - // - // btnFileSetup1 - // - this.btnFileSetup1.AltImage = null; - this.btnFileSetup1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnFileSetup1.Caption = null; - this.btnFileSetup1.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.btnFileSetup1, "btnFileSetup1"); - this.btnFileSetup1.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup1.Image"))); - this.btnFileSetup1.Name = "btnFileSetup1"; - this.btnFileSetup1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.btnFileSetup1.TabStop = false; - this.TT.SetToolTip(this.btnFileSetup1, resources.GetString("btnFileSetup1.ToolTip")); - this.btnFileSetup1.UseAltImage = false; - this.btnFileSetup1.Click += new System.EventHandler(this.BtnReOpen1_Click); - // - // btnFileSetup - // - this.btnFileSetup.AltImage = null; - this.btnFileSetup.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnFileSetup.Caption = null; - this.btnFileSetup.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.btnFileSetup, "btnFileSetup"); - this.btnFileSetup.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup.Image"))); - this.btnFileSetup.Name = "btnFileSetup"; - this.btnFileSetup.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.btnFileSetup.TabStop = false; - this.TT.SetToolTip(this.btnFileSetup, resources.GetString("btnFileSetup.ToolTip")); - this.btnFileSetup.UseAltImage = false; - this.btnFileSetup.Click += new System.EventHandler(this.BtnReOpenClick); - // - // BtnOpen2 - // - this.BtnOpen2.AltImage = null; - this.BtnOpen2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnOpen2.Caption = null; - this.BtnOpen2.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnOpen2, "BtnOpen2"); - this.BtnOpen2.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen2.Image"))); - this.BtnOpen2.Name = "BtnOpen2"; - this.BtnOpen2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnOpen2.TabStop = false; - this.TT.SetToolTip(this.BtnOpen2, resources.GetString("BtnOpen2.ToolTip")); - this.BtnOpen2.UseAltImage = false; - this.BtnOpen2.Click += new System.EventHandler(this.BtnOpen2_Click); - // // TbFileName2 // resources.ApplyResources(this.TbFileName2, "TbFileName2"); @@ -362,21 +239,6 @@ private void InitializeComponent() this.TbFileName2.MouseEnter += new System.EventHandler(this.TbFileName2_MouseEnter); this.TbFileName2.MouseLeave += new System.EventHandler(this.TbFileName2_MouseLeave); // - // BtnOpen1 - // - this.BtnOpen1.AltImage = null; - this.BtnOpen1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnOpen1.Caption = null; - this.BtnOpen1.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnOpen1, "BtnOpen1"); - this.BtnOpen1.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen1.Image"))); - this.BtnOpen1.Name = "BtnOpen1"; - this.BtnOpen1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnOpen1.TabStop = false; - this.TT.SetToolTip(this.BtnOpen1, resources.GetString("BtnOpen1.ToolTip")); - this.BtnOpen1.UseAltImage = false; - this.BtnOpen1.Click += new System.EventHandler(this.BtnOpen1_Click); - // // TbFileName1 // resources.ApplyResources(this.TbFileName1, "TbFileName1"); @@ -400,42 +262,6 @@ private void InitializeComponent() this.TbFileName.MouseEnter += new System.EventHandler(this.TbFileName_MouseEnter); this.TbFileName.MouseLeave += new System.EventHandler(this.TbFileName_MouseLeave); // - // PB - // - this.PB.BarColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.PB.BorderColor = System.Drawing.Color.Black; - this.tableLayoutPanel5.SetColumnSpan(this.PB, 4); - resources.ApplyResources(this.PB, "PB"); - this.PB.DrawProgressString = true; - this.PB.FillColor = System.Drawing.Color.White; - this.PB.FillStyle = LaserGRBL.UserControls.FillStyles.Solid; - this.PB.ForeColor = System.Drawing.Color.Black; - this.PB.Maximum = 100D; - this.PB.Minimum = 0D; - this.PB.Name = "PB"; - this.PB.PercString = null; - this.PB.ProgressStringDecimals = 0; - this.PB.Reverse = false; - this.PB.Step = 10D; - this.PB.ThrowExceprion = false; - this.PB.Value = 0D; - this.PB.Load += new System.EventHandler(this.PB_Load); - // - // BtnOpen - // - this.BtnOpen.AltImage = null; - this.BtnOpen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnOpen.Caption = null; - this.BtnOpen.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnOpen, "BtnOpen"); - this.BtnOpen.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen.Image"))); - this.BtnOpen.Name = "BtnOpen"; - this.BtnOpen.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnOpen.TabStop = false; - this.TT.SetToolTip(this.BtnOpen, resources.GetString("BtnOpen.ToolTip")); - this.BtnOpen.UseAltImage = false; - this.BtnOpen.Click += new System.EventHandler(this.BtnOpenClick); - // // LblFilename1 // resources.ApplyResources(this.LblFilename1, "LblFilename1"); @@ -463,36 +289,6 @@ private void InitializeComponent() 0}); this.UDLoopCounter.ValueChanged += new System.EventHandler(this.UDLoopCounter_ValueChanged); // - // BtnRunProgram - // - this.BtnRunProgram.AltImage = null; - this.BtnRunProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnRunProgram.Caption = null; - this.BtnRunProgram.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnRunProgram, "BtnRunProgram"); - this.BtnRunProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnRunProgram.Image"))); - this.BtnRunProgram.Name = "BtnRunProgram"; - this.BtnRunProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnRunProgram.TabStop = false; - this.TT.SetToolTip(this.BtnRunProgram, resources.GetString("BtnRunProgram.ToolTip")); - this.BtnRunProgram.UseAltImage = false; - this.BtnRunProgram.Click += new System.EventHandler(this.BtnRunProgramClick); - // - // BtnAbortProgram - // - this.BtnAbortProgram.AltImage = null; - resources.ApplyResources(this.BtnAbortProgram, "BtnAbortProgram"); - this.BtnAbortProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnAbortProgram.Caption = null; - this.BtnAbortProgram.Coloration = System.Drawing.Color.Empty; - this.BtnAbortProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnAbortProgram.Image"))); - this.BtnAbortProgram.Name = "BtnAbortProgram"; - this.BtnAbortProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnAbortProgram.TabStop = false; - this.TT.SetToolTip(this.BtnAbortProgram, resources.GetString("BtnAbortProgram.ToolTip")); - this.BtnAbortProgram.UseAltImage = false; - this.BtnAbortProgram.Click += new System.EventHandler(this.BtnAbortProgram_Click); - // // LblFilename2 // resources.ApplyResources(this.LblFilename2, "LblFilename2"); @@ -583,6 +379,210 @@ private void InitializeComponent() this.tableLayoutPanel4.SetColumnSpan(this.TxtEmulator, 3); this.TxtEmulator.Name = "TxtEmulator"; // + // TxtManualCommand + // + resources.ApplyResources(this.TxtManualCommand, "TxtManualCommand"); + this.TxtManualCommand.Name = "TxtManualCommand"; + this.TxtManualCommand.WaterMarkActiveForeColor = System.Drawing.Color.Gray; + this.TxtManualCommand.WaterMarkFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TxtManualCommand.WaterMarkForeColor = System.Drawing.Color.LightGray; + this.TxtManualCommand.CommandEntered += new LaserGRBL.UserControls.GrblTextBox.CommandEnteredDlg(this.TxtManualCommandCommandEntered); + this.TxtManualCommand.Enter += new System.EventHandler(this.TxtManualCommand_Enter); + this.TxtManualCommand.Leave += new System.EventHandler(this.TxtManualCommand_Leave); + // + // CmdLog + // + this.CmdLog.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + resources.ApplyResources(this.CmdLog, "CmdLog"); + this.CmdLog.Name = "CmdLog"; + this.CmdLog.TabStop = false; + // + // BtnFileAppend2 + // + this.BtnFileAppend2.AltImage = null; + this.BtnFileAppend2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnFileAppend2.Caption = null; + this.BtnFileAppend2.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnFileAppend2, "BtnFileAppend2"); + this.BtnFileAppend2.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend2.Image"))); + this.BtnFileAppend2.Name = "BtnFileAppend2"; + this.BtnFileAppend2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnFileAppend2.TabStop = false; + this.TT.SetToolTip(this.BtnFileAppend2, resources.GetString("BtnFileAppend2.ToolTip")); + this.BtnFileAppend2.UseAltImage = false; + this.BtnFileAppend2.Click += new System.EventHandler(this.BtnFileAppend2_Click); + // + // BtnFileAppend1 + // + this.BtnFileAppend1.AltImage = null; + this.BtnFileAppend1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnFileAppend1.Caption = null; + this.BtnFileAppend1.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnFileAppend1, "BtnFileAppend1"); + this.BtnFileAppend1.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend1.Image"))); + this.BtnFileAppend1.Name = "BtnFileAppend1"; + this.BtnFileAppend1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnFileAppend1.TabStop = false; + this.TT.SetToolTip(this.BtnFileAppend1, resources.GetString("BtnFileAppend1.ToolTip")); + this.BtnFileAppend1.UseAltImage = false; + this.BtnFileAppend1.Click += new System.EventHandler(this.BtnFileAppend1_Click); + // + // BtnFileAppend + // + this.BtnFileAppend.AltImage = null; + this.BtnFileAppend.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnFileAppend.Caption = null; + this.BtnFileAppend.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnFileAppend, "BtnFileAppend"); + this.BtnFileAppend.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend.Image"))); + this.BtnFileAppend.Name = "BtnFileAppend"; + this.BtnFileAppend.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnFileAppend.TabStop = false; + this.TT.SetToolTip(this.BtnFileAppend, resources.GetString("BtnFileAppend.ToolTip")); + this.BtnFileAppend.UseAltImage = false; + this.BtnFileAppend.Click += new System.EventHandler(this.BtnFileAppend_Click); + // + // btnFileSetup2 + // + this.btnFileSetup2.AltImage = null; + this.btnFileSetup2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnFileSetup2.Caption = null; + this.btnFileSetup2.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.btnFileSetup2, "btnFileSetup2"); + this.btnFileSetup2.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup2.Image"))); + this.btnFileSetup2.Name = "btnFileSetup2"; + this.btnFileSetup2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.btnFileSetup2.TabStop = false; + this.TT.SetToolTip(this.btnFileSetup2, resources.GetString("btnFileSetup2.ToolTip")); + this.btnFileSetup2.UseAltImage = false; + this.btnFileSetup2.Click += new System.EventHandler(this.BtnReOpen2_Click); + // + // btnFileSetup1 + // + this.btnFileSetup1.AltImage = null; + this.btnFileSetup1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnFileSetup1.Caption = null; + this.btnFileSetup1.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.btnFileSetup1, "btnFileSetup1"); + this.btnFileSetup1.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup1.Image"))); + this.btnFileSetup1.Name = "btnFileSetup1"; + this.btnFileSetup1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.btnFileSetup1.TabStop = false; + this.TT.SetToolTip(this.btnFileSetup1, resources.GetString("btnFileSetup1.ToolTip")); + this.btnFileSetup1.UseAltImage = false; + this.btnFileSetup1.Click += new System.EventHandler(this.BtnReOpen1_Click); + // + // btnFileSetup + // + this.btnFileSetup.AltImage = null; + this.btnFileSetup.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnFileSetup.Caption = null; + this.btnFileSetup.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.btnFileSetup, "btnFileSetup"); + this.btnFileSetup.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup.Image"))); + this.btnFileSetup.Name = "btnFileSetup"; + this.btnFileSetup.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.btnFileSetup.TabStop = false; + this.TT.SetToolTip(this.btnFileSetup, resources.GetString("btnFileSetup.ToolTip")); + this.btnFileSetup.UseAltImage = false; + this.btnFileSetup.Click += new System.EventHandler(this.BtnReOpenClick); + // + // BtnOpen2 + // + this.BtnOpen2.AltImage = null; + this.BtnOpen2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOpen2.Caption = null; + this.BtnOpen2.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnOpen2, "BtnOpen2"); + this.BtnOpen2.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen2.Image"))); + this.BtnOpen2.Name = "BtnOpen2"; + this.BtnOpen2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnOpen2.TabStop = false; + this.TT.SetToolTip(this.BtnOpen2, resources.GetString("BtnOpen2.ToolTip")); + this.BtnOpen2.UseAltImage = false; + this.BtnOpen2.Click += new System.EventHandler(this.BtnOpen2_Click); + // + // BtnOpen1 + // + this.BtnOpen1.AltImage = null; + this.BtnOpen1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOpen1.Caption = null; + this.BtnOpen1.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnOpen1, "BtnOpen1"); + this.BtnOpen1.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen1.Image"))); + this.BtnOpen1.Name = "BtnOpen1"; + this.BtnOpen1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnOpen1.TabStop = false; + this.TT.SetToolTip(this.BtnOpen1, resources.GetString("BtnOpen1.ToolTip")); + this.BtnOpen1.UseAltImage = false; + this.BtnOpen1.Click += new System.EventHandler(this.BtnOpen1_Click); + // + // PB + // + this.PB.BarColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); + this.PB.BorderColor = System.Drawing.Color.Black; + this.tableLayoutPanel5.SetColumnSpan(this.PB, 4); + resources.ApplyResources(this.PB, "PB"); + this.PB.DrawProgressString = true; + this.PB.FillColor = System.Drawing.Color.White; + this.PB.FillStyle = LaserGRBL.UserControls.FillStyles.Solid; + this.PB.ForeColor = System.Drawing.Color.Black; + this.PB.Maximum = 100D; + this.PB.Minimum = 0D; + this.PB.Name = "PB"; + this.PB.PercString = null; + this.PB.ProgressStringDecimals = 0; + this.PB.Reverse = false; + this.PB.Step = 10D; + this.PB.ThrowExceprion = false; + this.PB.Value = 0D; + this.PB.Load += new System.EventHandler(this.PB_Load); + // + // BtnOpen + // + this.BtnOpen.AltImage = null; + this.BtnOpen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOpen.Caption = null; + this.BtnOpen.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnOpen, "BtnOpen"); + this.BtnOpen.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen.Image"))); + this.BtnOpen.Name = "BtnOpen"; + this.BtnOpen.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnOpen.TabStop = false; + this.TT.SetToolTip(this.BtnOpen, resources.GetString("BtnOpen.ToolTip")); + this.BtnOpen.UseAltImage = false; + this.BtnOpen.Click += new System.EventHandler(this.BtnOpenClick); + // + // BtnRunProgram + // + this.BtnRunProgram.AltImage = null; + this.BtnRunProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnRunProgram.Caption = null; + this.BtnRunProgram.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnRunProgram, "BtnRunProgram"); + this.BtnRunProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnRunProgram.Image"))); + this.BtnRunProgram.Name = "BtnRunProgram"; + this.BtnRunProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnRunProgram.TabStop = false; + this.TT.SetToolTip(this.BtnRunProgram, resources.GetString("BtnRunProgram.ToolTip")); + this.BtnRunProgram.UseAltImage = false; + this.BtnRunProgram.Click += new System.EventHandler(this.BtnRunProgramClick); + // + // BtnAbortProgram + // + this.BtnAbortProgram.AltImage = null; + resources.ApplyResources(this.BtnAbortProgram, "BtnAbortProgram"); + this.BtnAbortProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnAbortProgram.Caption = null; + this.BtnAbortProgram.Coloration = System.Drawing.Color.Empty; + this.BtnAbortProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnAbortProgram.Image"))); + this.BtnAbortProgram.Name = "BtnAbortProgram"; + this.BtnAbortProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnAbortProgram.TabStop = false; + this.TT.SetToolTip(this.BtnAbortProgram, resources.GetString("BtnAbortProgram.ToolTip")); + this.BtnAbortProgram.UseAltImage = false; + this.BtnAbortProgram.Click += new System.EventHandler(this.BtnAbortProgram_Click); + // // BtnConnectDisconnect // this.BtnConnectDisconnect.AltImage = ((System.Drawing.Image)(resources.GetObject("BtnConnectDisconnect.AltImage"))); @@ -631,7 +631,6 @@ private void InitializeComponent() private System.Windows.Forms.TextBox TxtAddress; private System.Windows.Forms.Panel GBFile; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5; - private System.Windows.Forms.NumericUpDown UDLoopCounter; private System.Windows.Forms.Label LblEmulator; private System.Windows.Forms.TextBox TxtEmulator; private UserControls.ImageButton BtnAbortProgram; @@ -646,11 +645,12 @@ private void InitializeComponent() private System.Windows.Forms.Label LblFilename2; private System.Windows.Forms.CheckBox chkFileEnable2; private System.Windows.Forms.CheckBox chkFileEnable1; - private System.Windows.Forms.NumericUpDown UDLoopCounter2; - private System.Windows.Forms.NumericUpDown UDLoopCounter1; private System.Windows.Forms.CheckBox chkFileEnable; private UserControls.ImageButton BtnFileAppend; private UserControls.ImageButton BtnFileAppend2; private UserControls.ImageButton BtnFileAppend1; + public System.Windows.Forms.NumericUpDown UDLoopCounter; + public System.Windows.Forms.NumericUpDown UDLoopCounter2; + public System.Windows.Forms.NumericUpDown UDLoopCounter1; } } diff --git a/LaserGRBL/ConnectLogForm.cs b/LaserGRBL/ConnectLogForm.cs index 770221893..72c509b61 100644 --- a/LaserGRBL/ConnectLogForm.cs +++ b/LaserGRBL/ConnectLogForm.cs @@ -335,6 +335,7 @@ private void ITcpPort_CurrentValueChanged(object sender, int NewValue, bool ByUs private void UDLoopCounter_ValueChanged(object sender, EventArgs e) { Core.LoopCount(0, UDLoopCounter.Value); + ((MainForm)ParentForm).TimerUpdate(); } internal void OnColorChange() @@ -439,14 +440,16 @@ private void BtnReOpen2_Click(object sender, EventArgs e) private void UDLoopCounter1_ValueChanged(object sender, EventArgs e) { Core.LoopCount(1, UDLoopCounter1.Value); + ((MainForm)ParentForm).TimerUpdate(); } - private void UDLoopCounter2_ValueChanged(object sender, EventArgs e) + private void UDLoopCounter2_ValueChanged(object sender, EventArgs e) { Core.LoopCount(2, UDLoopCounter2.Value); + ((MainForm)ParentForm).TimerUpdate(); } - private void BtnFileAppend_Click(object sender, EventArgs e) + private void BtnFileAppend_Click(object sender, EventArgs e) { Core.OpenFile(ParentForm, null, true); } @@ -464,16 +467,19 @@ private void BtnFileAppend2_Click(object sender, EventArgs e) private void chkFileEnable_CheckedChanged(object sender, EventArgs e) { Core.LayerEnabled(0, chkFileEnable.Checked); + ((MainForm)ParentForm).TimerUpdate(); } private void chkFileEnable1_CheckedChanged(object sender, EventArgs e) { Core.LayerEnabled(1, chkFileEnable1.Checked); + ((MainForm)ParentForm).TimerUpdate(); } - private void chkFileEnable2_CheckedChanged(object sender, EventArgs e) + private void chkFileEnable2_CheckedChanged(object sender, EventArgs e) { Core.LayerEnabled(2, chkFileEnable2.Checked); + ((MainForm)ParentForm).TimerUpdate(); } - } + } } diff --git a/LaserGRBL/ConnectLogForm.resx b/LaserGRBL/ConnectLogForm.resx index 5903164dc..a4f778ab1 100644 --- a/LaserGRBL/ConnectLogForm.resx +++ b/LaserGRBL/ConnectLogForm.resx @@ -288,9 +288,9 @@ 27 - + 17, 17 - + Append File @@ -1819,12 +1819,12 @@ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="GBCommands" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="GBFile" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="GBConnection" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,Percent,100" /></TableLayoutSettings> - + True - - + + 39 - + 6, 13 diff --git a/LaserGRBL/Core/GrblCore.cs b/LaserGRBL/Core/GrblCore.cs index 76b220553..869e10e7e 100644 --- a/LaserGRBL/Core/GrblCore.cs +++ b/LaserGRBL/Core/GrblCore.cs @@ -293,7 +293,7 @@ public int OrturFWVersionNumber private int mTarOvRapids; private int mTarOvPower; - private decimal[] mLoopCount = { 1, 1, 1 }; + private int[] mLoopCount = { 1, 1, 1 }; private bool[] layerEnabled = { true, true, true }; protected Tools.PeriodicEventTimer QueryTimer; @@ -743,7 +743,7 @@ private ImageCodecInfo GetEncoder(ImageFormat format) return null; } - public void SaveProgram(Form parent, bool header, bool footer, bool between, int[] cycles) + public void SaveProgram(Form parent, bool header, bool footer, bool between) { if (HasProgram) { @@ -783,7 +783,7 @@ public void SaveProgram(Form parent, bool header, bool footer, bool between, int } if (filename != null) - file.SaveGCODE(filename, header, footer, between, cycles, this); + file.SaveGCODE(filename, header, footer, between, mLoopCount, this); } } @@ -2387,7 +2387,7 @@ public decimal LoopCount(int nLayer) } public void LoopCount(int nLayer, decimal value) { - mLoopCount[nLayer] = value; + mLoopCount[nLayer] = (int)value; if (OnLoopCountChange != null) { OnLoopCountChange(mLoopCount[nLayer], nLayer); diff --git a/LaserGRBL/GrblFile.cs b/LaserGRBL/GrblFile.cs index ecadf3b9b..fec7d6011 100644 --- a/LaserGRBL/GrblFile.cs +++ b/LaserGRBL/GrblFile.cs @@ -52,17 +52,13 @@ public void SaveGCODE(string filename, bool header, bool footer, bool between, i for (int j = 0; j < 3; j++) { - if (between && j > 0) - EvaluateAddLines(core, sw, Settings.GetObject("GCode.CustomPasses", GrblCore.GCODE_STD_PASSES)); - for (int i = 0; i < cycles[j]; i++) { + if (between && i > 0) + EvaluateAddLines(core, sw, Settings.GetObject("GCode.CustomPasses", GrblCore.GCODE_STD_PASSES)); + foreach (GrblCommand cmd in list[j]) sw.WriteLine(cmd.Command); - - - if (between && i < cycles[j] - 1) - EvaluateAddLines(core, sw, Settings.GetObject("GCode.CustomPasses", GrblCore.GCODE_STD_PASSES)); } } diff --git a/LaserGRBL/HotKeysManager.cs b/LaserGRBL/HotKeysManager.cs index c99d04f65..d479c09d1 100644 --- a/LaserGRBL/HotKeysManager.cs +++ b/LaserGRBL/HotKeysManager.cs @@ -233,7 +233,7 @@ private bool PerformAction(Form parent, HotKey.Actions action) case HotKey.Actions.ReopenLastFile: mCore.ReOpenFile(Application.OpenForms[0], 0); break; case HotKey.Actions.SaveFile: - mCore.SaveProgram(parent, false, false, false, new int[] { 1, 1, 1 }); break; + mCore.SaveProgram(parent, false, false, false); break; case HotKey.Actions.ExecuteFile: mCore.RunProgram(parent); break; case HotKey.Actions.AbortFile: diff --git a/LaserGRBL/LaserGRBL.csproj b/LaserGRBL/LaserGRBL.csproj index d96966bf9..34696643d 100644 --- a/LaserGRBL/LaserGRBL.csproj +++ b/LaserGRBL/LaserGRBL.csproj @@ -9,7 +9,7 @@ Properties LaserGRBL LaserGRBL - v4.0 + v4.8 512 True False @@ -101,6 +101,7 @@ prompt false MinimumRecommendedRules.ruleset + false bin\x86\Release\ @@ -112,6 +113,7 @@ false 7.3 prompt + false 8B428C6A03EDEE10B26DA36832B096675C63C73C diff --git a/LaserGRBL/MainForm.cs b/LaserGRBL/MainForm.cs index 1ee3cee90..ffab25f2d 100644 --- a/LaserGRBL/MainForm.cs +++ b/LaserGRBL/MainForm.cs @@ -262,7 +262,7 @@ private void UpdateTimer_Tick(object sender, EventArgs e) JogForm.Enabled = Core.JogEnabled; } - private void TimerUpdate() + public void TimerUpdate() { SuspendLayout(); TTTStatus.Text = GrblCore.TranslateEnum(Core.MachineStatus); @@ -448,7 +448,7 @@ private void MnDisconnect_Click(object sender, EventArgs e) } void MnSaveProgramClick(object sender, EventArgs e) { - Core.SaveProgram(this, false, false, false, new int[]{ 1, 1, 1}); + Core.SaveProgram(this, false, false, false); } private void MnAdvancedSave_Click(object sender, EventArgs e) diff --git a/LaserGRBL/SaveOptionForm.Designer.cs b/LaserGRBL/SaveOptionForm.Designer.cs index 710eec59d..fc50624c8 100644 --- a/LaserGRBL/SaveOptionForm.Designer.cs +++ b/LaserGRBL/SaveOptionForm.Designer.cs @@ -28,132 +28,104 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SaveOptionForm)); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.label2 = new System.Windows.Forms.Label(); - this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); - this.BtnSave = new System.Windows.Forms.Button(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.CBHeader = new System.Windows.Forms.CheckBox(); - this.CBFooter = new System.Windows.Forms.CheckBox(); - this.UDCount = new System.Windows.Forms.NumericUpDown(); - this.label1 = new System.Windows.Forms.Label(); - this.CBBetween = new System.Windows.Forms.CheckBox(); - this.tableLayoutPanel1.SuspendLayout(); - this.tableLayoutPanel3.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.UDCount)).BeginInit(); - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); - this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel3, 0, 2); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - // - // label2 - // - resources.ApplyResources(this.label2, "label2"); - this.label2.Name = "label2"; - // - // tableLayoutPanel3 - // - resources.ApplyResources(this.tableLayoutPanel3, "tableLayoutPanel3"); - this.tableLayoutPanel3.Controls.Add(this.BtnSave, 1, 0); - this.tableLayoutPanel3.Name = "tableLayoutPanel3"; - // - // BtnSave - // - this.BtnSave.DialogResult = System.Windows.Forms.DialogResult.OK; - resources.ApplyResources(this.BtnSave, "BtnSave"); - this.BtnSave.Name = "BtnSave"; - this.BtnSave.UseVisualStyleBackColor = true; - // - // groupBox1 - // - resources.ApplyResources(this.groupBox1, "groupBox1"); - this.groupBox1.Controls.Add(this.tableLayoutPanel2); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.TabStop = false; - // - // tableLayoutPanel2 - // - resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2"); - this.tableLayoutPanel2.Controls.Add(this.CBHeader, 0, 0); - this.tableLayoutPanel2.Controls.Add(this.CBFooter, 0, 2); - this.tableLayoutPanel2.Controls.Add(this.UDCount, 1, 1); - this.tableLayoutPanel2.Controls.Add(this.label1, 0, 1); - this.tableLayoutPanel2.Controls.Add(this.CBBetween, 2, 1); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - // - // CBHeader - // - resources.ApplyResources(this.CBHeader, "CBHeader"); - this.CBHeader.Checked = true; - this.CBHeader.CheckState = System.Windows.Forms.CheckState.Checked; - this.tableLayoutPanel2.SetColumnSpan(this.CBHeader, 2); - this.CBHeader.Name = "CBHeader"; - this.CBHeader.UseVisualStyleBackColor = true; - // - // CBFooter - // - resources.ApplyResources(this.CBFooter, "CBFooter"); - this.CBFooter.Checked = true; - this.CBFooter.CheckState = System.Windows.Forms.CheckState.Checked; - this.tableLayoutPanel2.SetColumnSpan(this.CBFooter, 2); - this.CBFooter.Name = "CBFooter"; - this.CBFooter.UseVisualStyleBackColor = true; - // - // UDCount - // - resources.ApplyResources(this.UDCount, "UDCount"); - this.UDCount.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.UDCount.Name = "UDCount"; - this.UDCount.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label1 - // - resources.ApplyResources(this.label1, "label1"); - this.label1.Name = "label1"; - // - // CBBetween - // - resources.ApplyResources(this.CBBetween, "CBBetween"); - this.CBBetween.Checked = true; - this.CBBetween.CheckState = System.Windows.Forms.CheckState.Checked; - this.CBBetween.Name = "CBBetween"; - this.CBBetween.UseVisualStyleBackColor = true; - // - // SaveOptionForm - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tableLayoutPanel1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "SaveOptionForm"; - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.tableLayoutPanel3.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.tableLayoutPanel2.ResumeLayout(false); - this.tableLayoutPanel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.UDCount)).EndInit(); - this.ResumeLayout(false); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SaveOptionForm)); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.CBHeader = new System.Windows.Forms.CheckBox(); + this.CBFooter = new System.Windows.Forms.CheckBox(); + this.CBBetween = new System.Windows.Forms.CheckBox(); + this.label2 = new System.Windows.Forms.Label(); + this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); + this.BtnSave = new System.Windows.Forms.Button(); + this.tableLayoutPanel1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.tableLayoutPanel3.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); + this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel3, 0, 2); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + // + // groupBox1 + // + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Controls.Add(this.tableLayoutPanel2); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // tableLayoutPanel2 + // + resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2"); + this.tableLayoutPanel2.Controls.Add(this.CBHeader, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.CBFooter, 0, 2); + this.tableLayoutPanel2.Controls.Add(this.CBBetween, 0, 1); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + // + // CBHeader + // + resources.ApplyResources(this.CBHeader, "CBHeader"); + this.CBHeader.Checked = true; + this.CBHeader.CheckState = System.Windows.Forms.CheckState.Checked; + this.CBHeader.Name = "CBHeader"; + this.CBHeader.UseVisualStyleBackColor = true; + // + // CBFooter + // + resources.ApplyResources(this.CBFooter, "CBFooter"); + this.CBFooter.Checked = true; + this.CBFooter.CheckState = System.Windows.Forms.CheckState.Checked; + this.CBFooter.Name = "CBFooter"; + this.CBFooter.UseVisualStyleBackColor = true; + // + // CBBetween + // + resources.ApplyResources(this.CBBetween, "CBBetween"); + this.CBBetween.Checked = true; + this.CBBetween.CheckState = System.Windows.Forms.CheckState.Checked; + this.CBBetween.Name = "CBBetween"; + this.CBBetween.UseVisualStyleBackColor = true; + // + // label2 + // + resources.ApplyResources(this.label2, "label2"); + this.label2.Name = "label2"; + // + // tableLayoutPanel3 + // + resources.ApplyResources(this.tableLayoutPanel3, "tableLayoutPanel3"); + this.tableLayoutPanel3.Controls.Add(this.BtnSave, 1, 0); + this.tableLayoutPanel3.Name = "tableLayoutPanel3"; + // + // BtnSave + // + this.BtnSave.DialogResult = System.Windows.Forms.DialogResult.OK; + resources.ApplyResources(this.BtnSave, "BtnSave"); + this.BtnSave.Name = "BtnSave"; + this.BtnSave.UseVisualStyleBackColor = true; + // + // SaveOptionForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tableLayoutPanel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "SaveOptionForm"; + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.tableLayoutPanel2.ResumeLayout(false); + this.tableLayoutPanel2.PerformLayout(); + this.tableLayoutPanel3.ResumeLayout(false); + this.ResumeLayout(false); } @@ -167,8 +139,6 @@ private void InitializeComponent() private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.CheckBox CBHeader; private System.Windows.Forms.CheckBox CBFooter; - private System.Windows.Forms.NumericUpDown UDCount; - private System.Windows.Forms.Label label1; private System.Windows.Forms.CheckBox CBBetween; } } \ No newline at end of file diff --git a/LaserGRBL/SaveOptionForm.cs b/LaserGRBL/SaveOptionForm.cs index 14341df5f..c94763b87 100644 --- a/LaserGRBL/SaveOptionForm.cs +++ b/LaserGRBL/SaveOptionForm.cs @@ -21,9 +21,8 @@ internal static void CreateAndShowDialog(Form parent, GrblCore core) using (SaveOptionForm f = new SaveOptionForm()) { if (f.ShowDialog(parent) == DialogResult.OK) - core.SaveProgram(parent, f.CBHeader.Checked, f.CBFooter.Checked, f.CBBetween.Checked, new int[]{(int)f.UDCount.Value,(int)f.UDCount.Value,(int)f.UDCount.Value}); + core.SaveProgram(parent, f.CBHeader.Checked, f.CBFooter.Checked, f.CBBetween.Checked); } } - - } + } } diff --git a/LaserGRBL/SaveOptionForm.resx b/LaserGRBL/SaveOptionForm.resx index df47237d7..eeca1e2b0 100644 --- a/LaserGRBL/SaveOptionForm.resx +++ b/LaserGRBL/SaveOptionForm.resx @@ -132,7 +132,7 @@ True - 3 + 1 Left @@ -201,63 +201,6 @@ 1 - - Left - - - 50, 26 - - - 61, 20 - - - 3 - - - UDCount - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 2 - - - Left - - - True - - - NoControl - - - 3, 29 - - - 41, 13 - - - 4 - - - Passes - - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 3 - Left @@ -268,7 +211,7 @@ NoControl - 117, 27 + 3, 27 174, 17 @@ -289,7 +232,7 @@ tableLayoutPanel2 - 4 + 2 Fill @@ -319,7 +262,7 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="CBHeader" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="CBFooter" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="UDCount" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="label1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="CBBetween" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,50,AutoSize,50,Absolute,436" /><Rows Styles="AutoSize,0,Absolute,26,AutoSize,0" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="CBHeader" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="CBFooter" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="CBBetween" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Absolute,20,Absolute,20" /><Rows Styles="AutoSize,0,Absolute,26,AutoSize,0,Absolute,20,Absolute,20" /></TableLayoutSettings> Fill diff --git a/LaserGRBL/Strings.Designer.cs b/LaserGRBL/Strings.Designer.cs index cb4347361..ba7904fa9 100644 --- a/LaserGRBL/Strings.Designer.cs +++ b/LaserGRBL/Strings.Designer.cs @@ -19,7 +19,7 @@ namespace LaserGRBL { // tramite uno strumento quale ResGen o Visual Studio. // Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen // con l'opzione /str oppure ricompilare il progetto VS. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.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 Strings { From d74a97e01bb5b938118794a3968536436f156a7c Mon Sep 17 00:00:00 2001 From: vniacob Date: Sat, 4 Jun 2022 16:24:43 +0200 Subject: [PATCH 4/6] Fixes after verifications for: - Saving as GCODE (fast e not) - Now estimated time update correctly on loop and abilitation modification --- LaserGRBL/ConnectLogForm.Designer.cs | 438 +++++++++++++-------------- LaserGRBL/ConnectLogForm.cs | 7 +- LaserGRBL/Core/GrblCore.cs | 10 +- LaserGRBL/GrblFile.cs | 18 +- 4 files changed, 237 insertions(+), 236 deletions(-) diff --git a/LaserGRBL/ConnectLogForm.Designer.cs b/LaserGRBL/ConnectLogForm.Designer.cs index 0ac01850e..3d96920cd 100644 --- a/LaserGRBL/ConnectLogForm.Designer.cs +++ b/LaserGRBL/ConnectLogForm.Designer.cs @@ -58,18 +58,32 @@ private void InitializeComponent() this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.GBCommands = new System.Windows.Forms.Panel(); this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); + this.TxtManualCommand = new LaserGRBL.UserControls.GrblTextBox(); + this.CmdLog = new LaserGRBL.UserControls.CommandLog(); this.GBFile = new System.Windows.Forms.Panel(); this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); + this.BtnFileAppend2 = new LaserGRBL.UserControls.ImageButton(); + this.BtnFileAppend1 = new LaserGRBL.UserControls.ImageButton(); + this.BtnFileAppend = new LaserGRBL.UserControls.ImageButton(); this.chkFileEnable2 = new System.Windows.Forms.CheckBox(); this.chkFileEnable1 = new System.Windows.Forms.CheckBox(); this.UDLoopCounter2 = new System.Windows.Forms.NumericUpDown(); this.UDLoopCounter1 = new System.Windows.Forms.NumericUpDown(); + this.btnFileSetup2 = new LaserGRBL.UserControls.ImageButton(); + this.btnFileSetup1 = new LaserGRBL.UserControls.ImageButton(); + this.btnFileSetup = new LaserGRBL.UserControls.ImageButton(); + this.BtnOpen2 = new LaserGRBL.UserControls.ImageButton(); this.TbFileName2 = new System.Windows.Forms.TextBox(); + this.BtnOpen1 = new LaserGRBL.UserControls.ImageButton(); this.TbFileName1 = new System.Windows.Forms.TextBox(); this.LblFilename = new System.Windows.Forms.Label(); this.TbFileName = new System.Windows.Forms.TextBox(); + this.PB = new LaserGRBL.UserControls.DoubleProgressBar(); + this.BtnOpen = new LaserGRBL.UserControls.ImageButton(); this.LblFilename1 = new System.Windows.Forms.Label(); this.UDLoopCounter = new System.Windows.Forms.NumericUpDown(); + this.BtnRunProgram = new LaserGRBL.UserControls.ImageButton(); + this.BtnAbortProgram = new LaserGRBL.UserControls.ImageButton(); this.LblFilename2 = new System.Windows.Forms.Label(); this.LblProgress = new System.Windows.Forms.Label(); this.chkFileEnable = new System.Windows.Forms.CheckBox(); @@ -83,22 +97,8 @@ private void InitializeComponent() this.LblAddress = new System.Windows.Forms.Label(); this.TxtAddress = new System.Windows.Forms.TextBox(); this.TxtEmulator = new System.Windows.Forms.TextBox(); - this.TT = new System.Windows.Forms.ToolTip(this.components); - this.TxtManualCommand = new LaserGRBL.UserControls.GrblTextBox(); - this.CmdLog = new LaserGRBL.UserControls.CommandLog(); - this.BtnFileAppend2 = new LaserGRBL.UserControls.ImageButton(); - this.BtnFileAppend1 = new LaserGRBL.UserControls.ImageButton(); - this.BtnFileAppend = new LaserGRBL.UserControls.ImageButton(); - this.btnFileSetup2 = new LaserGRBL.UserControls.ImageButton(); - this.btnFileSetup1 = new LaserGRBL.UserControls.ImageButton(); - this.btnFileSetup = new LaserGRBL.UserControls.ImageButton(); - this.BtnOpen2 = new LaserGRBL.UserControls.ImageButton(); - this.BtnOpen1 = new LaserGRBL.UserControls.ImageButton(); - this.PB = new LaserGRBL.UserControls.DoubleProgressBar(); - this.BtnOpen = new LaserGRBL.UserControls.ImageButton(); - this.BtnRunProgram = new LaserGRBL.UserControls.ImageButton(); - this.BtnAbortProgram = new LaserGRBL.UserControls.ImageButton(); this.BtnConnectDisconnect = new LaserGRBL.UserControls.ImageButton(); + this.TT = new System.Windows.Forms.ToolTip(this.components); this.tableLayoutPanel1.SuspendLayout(); this.GBCommands.SuspendLayout(); this.tableLayoutPanel6.SuspendLayout(); @@ -132,6 +132,24 @@ private void InitializeComponent() this.tableLayoutPanel6.Controls.Add(this.CmdLog, 0, 1); this.tableLayoutPanel6.Name = "tableLayoutPanel6"; // + // TxtManualCommand + // + resources.ApplyResources(this.TxtManualCommand, "TxtManualCommand"); + this.TxtManualCommand.Name = "TxtManualCommand"; + this.TxtManualCommand.WaterMarkActiveForeColor = System.Drawing.Color.Gray; + this.TxtManualCommand.WaterMarkFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TxtManualCommand.WaterMarkForeColor = System.Drawing.Color.LightGray; + this.TxtManualCommand.CommandEntered += new LaserGRBL.UserControls.GrblTextBox.CommandEnteredDlg(this.TxtManualCommandCommandEntered); + this.TxtManualCommand.Enter += new System.EventHandler(this.TxtManualCommand_Enter); + this.TxtManualCommand.Leave += new System.EventHandler(this.TxtManualCommand_Leave); + // + // CmdLog + // + this.CmdLog.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + resources.ApplyResources(this.CmdLog, "CmdLog"); + this.CmdLog.Name = "CmdLog"; + this.CmdLog.TabStop = false; + // // GBFile // resources.ApplyResources(this.GBFile, "GBFile"); @@ -168,6 +186,51 @@ private void InitializeComponent() this.tableLayoutPanel5.Controls.Add(this.chkFileEnable, 6, 0); this.tableLayoutPanel5.Name = "tableLayoutPanel5"; // + // BtnFileAppend2 + // + this.BtnFileAppend2.AltImage = null; + this.BtnFileAppend2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnFileAppend2.Caption = null; + this.BtnFileAppend2.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnFileAppend2, "BtnFileAppend2"); + this.BtnFileAppend2.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend2.Image"))); + this.BtnFileAppend2.Name = "BtnFileAppend2"; + this.BtnFileAppend2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnFileAppend2.TabStop = false; + this.TT.SetToolTip(this.BtnFileAppend2, resources.GetString("BtnFileAppend2.ToolTip")); + this.BtnFileAppend2.UseAltImage = false; + this.BtnFileAppend2.Click += new System.EventHandler(this.BtnFileAppend2_Click); + // + // BtnFileAppend1 + // + this.BtnFileAppend1.AltImage = null; + this.BtnFileAppend1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnFileAppend1.Caption = null; + this.BtnFileAppend1.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnFileAppend1, "BtnFileAppend1"); + this.BtnFileAppend1.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend1.Image"))); + this.BtnFileAppend1.Name = "BtnFileAppend1"; + this.BtnFileAppend1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnFileAppend1.TabStop = false; + this.TT.SetToolTip(this.BtnFileAppend1, resources.GetString("BtnFileAppend1.ToolTip")); + this.BtnFileAppend1.UseAltImage = false; + this.BtnFileAppend1.Click += new System.EventHandler(this.BtnFileAppend1_Click); + // + // BtnFileAppend + // + this.BtnFileAppend.AltImage = null; + this.BtnFileAppend.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnFileAppend.Caption = null; + this.BtnFileAppend.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnFileAppend, "BtnFileAppend"); + this.BtnFileAppend.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend.Image"))); + this.BtnFileAppend.Name = "BtnFileAppend"; + this.BtnFileAppend.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnFileAppend.TabStop = false; + this.TT.SetToolTip(this.BtnFileAppend, resources.GetString("BtnFileAppend.ToolTip")); + this.BtnFileAppend.UseAltImage = false; + this.BtnFileAppend.Click += new System.EventHandler(this.BtnFileAppend_Click); + // // chkFileEnable2 // resources.ApplyResources(this.chkFileEnable2, "chkFileEnable2"); @@ -230,6 +293,66 @@ private void InitializeComponent() 0}); this.UDLoopCounter1.ValueChanged += new System.EventHandler(this.UDLoopCounter1_ValueChanged); // + // btnFileSetup2 + // + this.btnFileSetup2.AltImage = null; + this.btnFileSetup2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnFileSetup2.Caption = null; + this.btnFileSetup2.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.btnFileSetup2, "btnFileSetup2"); + this.btnFileSetup2.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup2.Image"))); + this.btnFileSetup2.Name = "btnFileSetup2"; + this.btnFileSetup2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.btnFileSetup2.TabStop = false; + this.TT.SetToolTip(this.btnFileSetup2, resources.GetString("btnFileSetup2.ToolTip")); + this.btnFileSetup2.UseAltImage = false; + this.btnFileSetup2.Click += new System.EventHandler(this.BtnReOpen2_Click); + // + // btnFileSetup1 + // + this.btnFileSetup1.AltImage = null; + this.btnFileSetup1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnFileSetup1.Caption = null; + this.btnFileSetup1.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.btnFileSetup1, "btnFileSetup1"); + this.btnFileSetup1.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup1.Image"))); + this.btnFileSetup1.Name = "btnFileSetup1"; + this.btnFileSetup1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.btnFileSetup1.TabStop = false; + this.TT.SetToolTip(this.btnFileSetup1, resources.GetString("btnFileSetup1.ToolTip")); + this.btnFileSetup1.UseAltImage = false; + this.btnFileSetup1.Click += new System.EventHandler(this.BtnReOpen1_Click); + // + // btnFileSetup + // + this.btnFileSetup.AltImage = null; + this.btnFileSetup.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnFileSetup.Caption = null; + this.btnFileSetup.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.btnFileSetup, "btnFileSetup"); + this.btnFileSetup.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup.Image"))); + this.btnFileSetup.Name = "btnFileSetup"; + this.btnFileSetup.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.btnFileSetup.TabStop = false; + this.TT.SetToolTip(this.btnFileSetup, resources.GetString("btnFileSetup.ToolTip")); + this.btnFileSetup.UseAltImage = false; + this.btnFileSetup.Click += new System.EventHandler(this.BtnReOpenClick); + // + // BtnOpen2 + // + this.BtnOpen2.AltImage = null; + this.BtnOpen2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOpen2.Caption = null; + this.BtnOpen2.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnOpen2, "BtnOpen2"); + this.BtnOpen2.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen2.Image"))); + this.BtnOpen2.Name = "BtnOpen2"; + this.BtnOpen2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnOpen2.TabStop = false; + this.TT.SetToolTip(this.BtnOpen2, resources.GetString("BtnOpen2.ToolTip")); + this.BtnOpen2.UseAltImage = false; + this.BtnOpen2.Click += new System.EventHandler(this.BtnOpen2_Click); + // // TbFileName2 // resources.ApplyResources(this.TbFileName2, "TbFileName2"); @@ -239,6 +362,21 @@ private void InitializeComponent() this.TbFileName2.MouseEnter += new System.EventHandler(this.TbFileName2_MouseEnter); this.TbFileName2.MouseLeave += new System.EventHandler(this.TbFileName2_MouseLeave); // + // BtnOpen1 + // + this.BtnOpen1.AltImage = null; + this.BtnOpen1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOpen1.Caption = null; + this.BtnOpen1.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnOpen1, "BtnOpen1"); + this.BtnOpen1.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen1.Image"))); + this.BtnOpen1.Name = "BtnOpen1"; + this.BtnOpen1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnOpen1.TabStop = false; + this.TT.SetToolTip(this.BtnOpen1, resources.GetString("BtnOpen1.ToolTip")); + this.BtnOpen1.UseAltImage = false; + this.BtnOpen1.Click += new System.EventHandler(this.BtnOpen1_Click); + // // TbFileName1 // resources.ApplyResources(this.TbFileName1, "TbFileName1"); @@ -262,6 +400,42 @@ private void InitializeComponent() this.TbFileName.MouseEnter += new System.EventHandler(this.TbFileName_MouseEnter); this.TbFileName.MouseLeave += new System.EventHandler(this.TbFileName_MouseLeave); // + // PB + // + this.PB.BarColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); + this.PB.BorderColor = System.Drawing.Color.Black; + this.tableLayoutPanel5.SetColumnSpan(this.PB, 4); + resources.ApplyResources(this.PB, "PB"); + this.PB.DrawProgressString = true; + this.PB.FillColor = System.Drawing.Color.White; + this.PB.FillStyle = LaserGRBL.UserControls.FillStyles.Solid; + this.PB.ForeColor = System.Drawing.Color.Black; + this.PB.Maximum = 100D; + this.PB.Minimum = 0D; + this.PB.Name = "PB"; + this.PB.PercString = null; + this.PB.ProgressStringDecimals = 0; + this.PB.Reverse = false; + this.PB.Step = 10D; + this.PB.ThrowExceprion = false; + this.PB.Value = 0D; + this.PB.Load += new System.EventHandler(this.PB_Load); + // + // BtnOpen + // + this.BtnOpen.AltImage = null; + this.BtnOpen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnOpen.Caption = null; + this.BtnOpen.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnOpen, "BtnOpen"); + this.BtnOpen.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen.Image"))); + this.BtnOpen.Name = "BtnOpen"; + this.BtnOpen.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnOpen.TabStop = false; + this.TT.SetToolTip(this.BtnOpen, resources.GetString("BtnOpen.ToolTip")); + this.BtnOpen.UseAltImage = false; + this.BtnOpen.Click += new System.EventHandler(this.BtnOpenClick); + // // LblFilename1 // resources.ApplyResources(this.LblFilename1, "LblFilename1"); @@ -289,6 +463,36 @@ private void InitializeComponent() 0}); this.UDLoopCounter.ValueChanged += new System.EventHandler(this.UDLoopCounter_ValueChanged); // + // BtnRunProgram + // + this.BtnRunProgram.AltImage = null; + this.BtnRunProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnRunProgram.Caption = null; + this.BtnRunProgram.Coloration = System.Drawing.Color.Empty; + resources.ApplyResources(this.BtnRunProgram, "BtnRunProgram"); + this.BtnRunProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnRunProgram.Image"))); + this.BtnRunProgram.Name = "BtnRunProgram"; + this.BtnRunProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnRunProgram.TabStop = false; + this.TT.SetToolTip(this.BtnRunProgram, resources.GetString("BtnRunProgram.ToolTip")); + this.BtnRunProgram.UseAltImage = false; + this.BtnRunProgram.Click += new System.EventHandler(this.BtnRunProgramClick); + // + // BtnAbortProgram + // + this.BtnAbortProgram.AltImage = null; + resources.ApplyResources(this.BtnAbortProgram, "BtnAbortProgram"); + this.BtnAbortProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.BtnAbortProgram.Caption = null; + this.BtnAbortProgram.Coloration = System.Drawing.Color.Empty; + this.BtnAbortProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnAbortProgram.Image"))); + this.BtnAbortProgram.Name = "BtnAbortProgram"; + this.BtnAbortProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; + this.BtnAbortProgram.TabStop = false; + this.TT.SetToolTip(this.BtnAbortProgram, resources.GetString("BtnAbortProgram.ToolTip")); + this.BtnAbortProgram.UseAltImage = false; + this.BtnAbortProgram.Click += new System.EventHandler(this.BtnAbortProgram_Click); + // // LblFilename2 // resources.ApplyResources(this.LblFilename2, "LblFilename2"); @@ -379,210 +583,6 @@ private void InitializeComponent() this.tableLayoutPanel4.SetColumnSpan(this.TxtEmulator, 3); this.TxtEmulator.Name = "TxtEmulator"; // - // TxtManualCommand - // - resources.ApplyResources(this.TxtManualCommand, "TxtManualCommand"); - this.TxtManualCommand.Name = "TxtManualCommand"; - this.TxtManualCommand.WaterMarkActiveForeColor = System.Drawing.Color.Gray; - this.TxtManualCommand.WaterMarkFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.TxtManualCommand.WaterMarkForeColor = System.Drawing.Color.LightGray; - this.TxtManualCommand.CommandEntered += new LaserGRBL.UserControls.GrblTextBox.CommandEnteredDlg(this.TxtManualCommandCommandEntered); - this.TxtManualCommand.Enter += new System.EventHandler(this.TxtManualCommand_Enter); - this.TxtManualCommand.Leave += new System.EventHandler(this.TxtManualCommand_Leave); - // - // CmdLog - // - this.CmdLog.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - resources.ApplyResources(this.CmdLog, "CmdLog"); - this.CmdLog.Name = "CmdLog"; - this.CmdLog.TabStop = false; - // - // BtnFileAppend2 - // - this.BtnFileAppend2.AltImage = null; - this.BtnFileAppend2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnFileAppend2.Caption = null; - this.BtnFileAppend2.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnFileAppend2, "BtnFileAppend2"); - this.BtnFileAppend2.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend2.Image"))); - this.BtnFileAppend2.Name = "BtnFileAppend2"; - this.BtnFileAppend2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnFileAppend2.TabStop = false; - this.TT.SetToolTip(this.BtnFileAppend2, resources.GetString("BtnFileAppend2.ToolTip")); - this.BtnFileAppend2.UseAltImage = false; - this.BtnFileAppend2.Click += new System.EventHandler(this.BtnFileAppend2_Click); - // - // BtnFileAppend1 - // - this.BtnFileAppend1.AltImage = null; - this.BtnFileAppend1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnFileAppend1.Caption = null; - this.BtnFileAppend1.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnFileAppend1, "BtnFileAppend1"); - this.BtnFileAppend1.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend1.Image"))); - this.BtnFileAppend1.Name = "BtnFileAppend1"; - this.BtnFileAppend1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnFileAppend1.TabStop = false; - this.TT.SetToolTip(this.BtnFileAppend1, resources.GetString("BtnFileAppend1.ToolTip")); - this.BtnFileAppend1.UseAltImage = false; - this.BtnFileAppend1.Click += new System.EventHandler(this.BtnFileAppend1_Click); - // - // BtnFileAppend - // - this.BtnFileAppend.AltImage = null; - this.BtnFileAppend.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnFileAppend.Caption = null; - this.BtnFileAppend.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnFileAppend, "BtnFileAppend"); - this.BtnFileAppend.Image = ((System.Drawing.Image)(resources.GetObject("BtnFileAppend.Image"))); - this.BtnFileAppend.Name = "BtnFileAppend"; - this.BtnFileAppend.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnFileAppend.TabStop = false; - this.TT.SetToolTip(this.BtnFileAppend, resources.GetString("BtnFileAppend.ToolTip")); - this.BtnFileAppend.UseAltImage = false; - this.BtnFileAppend.Click += new System.EventHandler(this.BtnFileAppend_Click); - // - // btnFileSetup2 - // - this.btnFileSetup2.AltImage = null; - this.btnFileSetup2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnFileSetup2.Caption = null; - this.btnFileSetup2.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.btnFileSetup2, "btnFileSetup2"); - this.btnFileSetup2.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup2.Image"))); - this.btnFileSetup2.Name = "btnFileSetup2"; - this.btnFileSetup2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.btnFileSetup2.TabStop = false; - this.TT.SetToolTip(this.btnFileSetup2, resources.GetString("btnFileSetup2.ToolTip")); - this.btnFileSetup2.UseAltImage = false; - this.btnFileSetup2.Click += new System.EventHandler(this.BtnReOpen2_Click); - // - // btnFileSetup1 - // - this.btnFileSetup1.AltImage = null; - this.btnFileSetup1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnFileSetup1.Caption = null; - this.btnFileSetup1.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.btnFileSetup1, "btnFileSetup1"); - this.btnFileSetup1.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup1.Image"))); - this.btnFileSetup1.Name = "btnFileSetup1"; - this.btnFileSetup1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.btnFileSetup1.TabStop = false; - this.TT.SetToolTip(this.btnFileSetup1, resources.GetString("btnFileSetup1.ToolTip")); - this.btnFileSetup1.UseAltImage = false; - this.btnFileSetup1.Click += new System.EventHandler(this.BtnReOpen1_Click); - // - // btnFileSetup - // - this.btnFileSetup.AltImage = null; - this.btnFileSetup.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnFileSetup.Caption = null; - this.btnFileSetup.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.btnFileSetup, "btnFileSetup"); - this.btnFileSetup.Image = ((System.Drawing.Image)(resources.GetObject("btnFileSetup.Image"))); - this.btnFileSetup.Name = "btnFileSetup"; - this.btnFileSetup.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.btnFileSetup.TabStop = false; - this.TT.SetToolTip(this.btnFileSetup, resources.GetString("btnFileSetup.ToolTip")); - this.btnFileSetup.UseAltImage = false; - this.btnFileSetup.Click += new System.EventHandler(this.BtnReOpenClick); - // - // BtnOpen2 - // - this.BtnOpen2.AltImage = null; - this.BtnOpen2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnOpen2.Caption = null; - this.BtnOpen2.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnOpen2, "BtnOpen2"); - this.BtnOpen2.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen2.Image"))); - this.BtnOpen2.Name = "BtnOpen2"; - this.BtnOpen2.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnOpen2.TabStop = false; - this.TT.SetToolTip(this.BtnOpen2, resources.GetString("BtnOpen2.ToolTip")); - this.BtnOpen2.UseAltImage = false; - this.BtnOpen2.Click += new System.EventHandler(this.BtnOpen2_Click); - // - // BtnOpen1 - // - this.BtnOpen1.AltImage = null; - this.BtnOpen1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnOpen1.Caption = null; - this.BtnOpen1.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnOpen1, "BtnOpen1"); - this.BtnOpen1.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen1.Image"))); - this.BtnOpen1.Name = "BtnOpen1"; - this.BtnOpen1.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnOpen1.TabStop = false; - this.TT.SetToolTip(this.BtnOpen1, resources.GetString("BtnOpen1.ToolTip")); - this.BtnOpen1.UseAltImage = false; - this.BtnOpen1.Click += new System.EventHandler(this.BtnOpen1_Click); - // - // PB - // - this.PB.BarColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.PB.BorderColor = System.Drawing.Color.Black; - this.tableLayoutPanel5.SetColumnSpan(this.PB, 4); - resources.ApplyResources(this.PB, "PB"); - this.PB.DrawProgressString = true; - this.PB.FillColor = System.Drawing.Color.White; - this.PB.FillStyle = LaserGRBL.UserControls.FillStyles.Solid; - this.PB.ForeColor = System.Drawing.Color.Black; - this.PB.Maximum = 100D; - this.PB.Minimum = 0D; - this.PB.Name = "PB"; - this.PB.PercString = null; - this.PB.ProgressStringDecimals = 0; - this.PB.Reverse = false; - this.PB.Step = 10D; - this.PB.ThrowExceprion = false; - this.PB.Value = 0D; - this.PB.Load += new System.EventHandler(this.PB_Load); - // - // BtnOpen - // - this.BtnOpen.AltImage = null; - this.BtnOpen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnOpen.Caption = null; - this.BtnOpen.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnOpen, "BtnOpen"); - this.BtnOpen.Image = ((System.Drawing.Image)(resources.GetObject("BtnOpen.Image"))); - this.BtnOpen.Name = "BtnOpen"; - this.BtnOpen.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnOpen.TabStop = false; - this.TT.SetToolTip(this.BtnOpen, resources.GetString("BtnOpen.ToolTip")); - this.BtnOpen.UseAltImage = false; - this.BtnOpen.Click += new System.EventHandler(this.BtnOpenClick); - // - // BtnRunProgram - // - this.BtnRunProgram.AltImage = null; - this.BtnRunProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnRunProgram.Caption = null; - this.BtnRunProgram.Coloration = System.Drawing.Color.Empty; - resources.ApplyResources(this.BtnRunProgram, "BtnRunProgram"); - this.BtnRunProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnRunProgram.Image"))); - this.BtnRunProgram.Name = "BtnRunProgram"; - this.BtnRunProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnRunProgram.TabStop = false; - this.TT.SetToolTip(this.BtnRunProgram, resources.GetString("BtnRunProgram.ToolTip")); - this.BtnRunProgram.UseAltImage = false; - this.BtnRunProgram.Click += new System.EventHandler(this.BtnRunProgramClick); - // - // BtnAbortProgram - // - this.BtnAbortProgram.AltImage = null; - resources.ApplyResources(this.BtnAbortProgram, "BtnAbortProgram"); - this.BtnAbortProgram.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.BtnAbortProgram.Caption = null; - this.BtnAbortProgram.Coloration = System.Drawing.Color.Empty; - this.BtnAbortProgram.Image = ((System.Drawing.Image)(resources.GetObject("BtnAbortProgram.Image"))); - this.BtnAbortProgram.Name = "BtnAbortProgram"; - this.BtnAbortProgram.SizingMode = LaserGRBL.UserControls.ImageButton.SizingModes.FixedSize; - this.BtnAbortProgram.TabStop = false; - this.TT.SetToolTip(this.BtnAbortProgram, resources.GetString("BtnAbortProgram.ToolTip")); - this.BtnAbortProgram.UseAltImage = false; - this.BtnAbortProgram.Click += new System.EventHandler(this.BtnAbortProgram_Click); - // // BtnConnectDisconnect // this.BtnConnectDisconnect.AltImage = ((System.Drawing.Image)(resources.GetObject("BtnConnectDisconnect.AltImage"))); diff --git a/LaserGRBL/ConnectLogForm.cs b/LaserGRBL/ConnectLogForm.cs index 72c509b61..5b26b0d36 100644 --- a/LaserGRBL/ConnectLogForm.cs +++ b/LaserGRBL/ConnectLogForm.cs @@ -19,7 +19,6 @@ public partial class ConnectLogForm : System.Windows.Forms.UserControl public ComWrapper.WrapperType currentWrapper; GrblCore Core; - GrblFile File; private string[] mLoadedFileName = new string[3]; public ConnectLogForm() @@ -334,7 +333,7 @@ private void ITcpPort_CurrentValueChanged(object sender, int NewValue, bool ByUs private void UDLoopCounter_ValueChanged(object sender, EventArgs e) { - Core.LoopCount(0, UDLoopCounter.Value); + Core.LoopCount(0, (int)UDLoopCounter.Value); ((MainForm)ParentForm).TimerUpdate(); } @@ -439,13 +438,13 @@ private void BtnReOpen2_Click(object sender, EventArgs e) private void UDLoopCounter1_ValueChanged(object sender, EventArgs e) { - Core.LoopCount(1, UDLoopCounter1.Value); + Core.LoopCount(1, (int)UDLoopCounter1.Value); ((MainForm)ParentForm).TimerUpdate(); } private void UDLoopCounter2_ValueChanged(object sender, EventArgs e) { - Core.LoopCount(2, UDLoopCounter2.Value); + Core.LoopCount(2, (int)UDLoopCounter2.Value); ((MainForm)ParentForm).TimerUpdate(); } diff --git a/LaserGRBL/Core/GrblCore.cs b/LaserGRBL/Core/GrblCore.cs index 869e10e7e..ab63affd4 100644 --- a/LaserGRBL/Core/GrblCore.cs +++ b/LaserGRBL/Core/GrblCore.cs @@ -678,7 +678,7 @@ public void OpenFile(System.Windows.Forms.Form parent, string filename = null, b try { - file.LoadFile(filename, append, nLayer); + file.LoadFile(filename, append, nLayer, this); UsageCounters.GCodeFile++; } catch (Exception ex) @@ -2381,17 +2381,18 @@ public bool CanResumeHold public bool CanReadWriteConfig { get { return IsConnected && !InProgram && (MachineStatus == MacStatus.Idle || MachineStatus == MacStatus.Alarm); } } - public decimal LoopCount(int nLayer) + public int LoopCount(int nLayer) { return mLoopCount[nLayer]; } - public void LoopCount(int nLayer, decimal value) + public void LoopCount(int nLayer, int value) { - mLoopCount[nLayer] = (int)value; + mLoopCount[nLayer] = value; if (OnLoopCountChange != null) { OnLoopCountChange(mLoopCount[nLayer], nLayer); } + file.Analyze(this); } public bool[] LayerEnabled() @@ -2411,6 +2412,7 @@ public void LayerEnabled(int nLayer, bool value) { OnLayerEnabledChange(layerEnabled[nLayer], nLayer); } + file.Analyze(this); } private ThreadingMode CurrentThreadingMode diff --git a/LaserGRBL/GrblFile.cs b/LaserGRBL/GrblFile.cs index fec7d6011..f3cc2b089 100644 --- a/LaserGRBL/GrblFile.cs +++ b/LaserGRBL/GrblFile.cs @@ -85,7 +85,7 @@ private static void EvaluateAddLines(GrblCore core, System.IO.StreamWriter sw, s } } - public void LoadFile(string filename, bool append, int nLayer) + public void LoadFile(string filename, bool append, int nLayer, GrblCore core) { RiseOnFileLoading(filename, nLayer); @@ -109,7 +109,7 @@ public void LoadFile(string filename, bool append, int nLayer) } } } - Analyze(); + Analyze(core); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; RiseOnFileLoaded(filename, elapsed, nLayer); @@ -143,7 +143,7 @@ public void LoadImportedSVG(string filename, bool append, GrblCore core, int nLa } } - Analyze(); + Analyze(core); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; RiseOnFileLoaded(filename, elapsed, nLayer); @@ -418,7 +418,7 @@ public void LoadImagePotrace(Bitmap bmp, string filename, bool UseSpotRemoval, i if (supportPWM) list[nLayer].Add(new GrblCommand(c.lOff)); //necessaria perché finisce con solo S0 - Analyze(); + Analyze(core); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; RiseOnFileLoaded(filename, elapsed, nLayer); @@ -494,7 +494,7 @@ public void LoadImageL2L(Bitmap bmp, string filename, L2LConf c, bool append, Gr //move fast to origin //list.Add(new GrblCommand("G0 X0 Y0")); //moved to custom footer - Analyze(); + Analyze(core); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; RiseOnFileLoaded(filename, elapsed, nLayer); @@ -1064,14 +1064,14 @@ internal void LoadImageCenterline(Bitmap bmp, string filename, bool useCornerThr } } - Analyze(); + Analyze(core); long elapsed = Tools.HiResTimer.TotalMilliseconds - start; RiseOnFileLoaded(filename, elapsed, nLayer); } - private void Analyze() //analyze the file and build global range and timing for each command + public void Analyze(GrblCore core) //analyze the file and build global range and timing for each command { GrblCommand.StatePositionBuilder spb = new GrblCommand.StatePositionBuilder(); @@ -1081,7 +1081,7 @@ internal void LoadImageCenterline(Bitmap bmp, string filename, bool useCornerThr for (int jLayer = 0; jLayer < 3; jLayer++) { - + if (!core.LayerEnabled(jLayer)) continue; foreach (GrblCommand cmd in list[jLayer]) { try @@ -1096,7 +1096,7 @@ internal void LoadImageCenterline(Bitmap bmp, string filename, bool useCornerThr else mRange.UpdateXYRange(spb.X, spb.Y, spb.LaserBurning); - mEstimatedTotalTime += delay; + mEstimatedTotalTime += TimeSpan.FromTicks(delay.Ticks * core.LoopCount(jLayer)); cmd.SetOffset(mEstimatedTotalTime); } catch (Exception ex) { throw ex; } From 7de741dfae1864b45058182e696482ee9b76740a Mon Sep 17 00:00:00 2001 From: vniacob Date: Sat, 4 Jun 2022 16:31:38 +0200 Subject: [PATCH 5/6] switch back to .net 4.0 --- LaserGRBL/App.config | 2 +- LaserGRBL/LaserGRBL.csproj | 4 +--- LaserGRBL/Strings.Designer.cs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/LaserGRBL/App.config b/LaserGRBL/App.config index dd7ba6f6c..bf4f2cc01 100644 --- a/LaserGRBL/App.config +++ b/LaserGRBL/App.config @@ -14,6 +14,6 @@ - + diff --git a/LaserGRBL/LaserGRBL.csproj b/LaserGRBL/LaserGRBL.csproj index 34696643d..d96966bf9 100644 --- a/LaserGRBL/LaserGRBL.csproj +++ b/LaserGRBL/LaserGRBL.csproj @@ -9,7 +9,7 @@ Properties LaserGRBL LaserGRBL - v4.8 + v4.0 512 True False @@ -101,7 +101,6 @@ prompt false MinimumRecommendedRules.ruleset - false bin\x86\Release\ @@ -113,7 +112,6 @@ false 7.3 prompt - false 8B428C6A03EDEE10B26DA36832B096675C63C73C diff --git a/LaserGRBL/Strings.Designer.cs b/LaserGRBL/Strings.Designer.cs index ba7904fa9..cb4347361 100644 --- a/LaserGRBL/Strings.Designer.cs +++ b/LaserGRBL/Strings.Designer.cs @@ -19,7 +19,7 @@ namespace LaserGRBL { // tramite uno strumento quale ResGen o Visual Studio. // Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen // con l'opzione /str oppure ricompilare il progetto VS. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Strings { From a98317e7179f0d19cd7e3425a96b736ca89ba265 Mon Sep 17 00:00:00 2001 From: vniacob Date: Mon, 6 Jun 2022 17:07:02 +0200 Subject: [PATCH 6/6] fix on reopening file --- LaserGRBL/Core/GrblCore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaserGRBL/Core/GrblCore.cs b/LaserGRBL/Core/GrblCore.cs index ab63affd4..badc6547c 100644 --- a/LaserGRBL/Core/GrblCore.cs +++ b/LaserGRBL/Core/GrblCore.cs @@ -563,7 +563,7 @@ public void ReOpenFile(System.Windows.Forms.Form parent, int nLayer) if (CanReOpenFile(nLayer)) { string layerSuffix = nLayer > 0 ? nLayer.ToString() : ""; - OpenFile(parent, Settings.GetObject("Core.LastOpenFile" + layerSuffix, null)); + OpenFile(parent, Settings.GetObject("Core.LastOpenFile" + layerSuffix, null), false, nLayer); } }