Skip to content

Commit

Permalink
Version 1.7.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
svenhb authored Aug 18, 2024
1 parent 5762e22 commit 4becf0d
Show file tree
Hide file tree
Showing 26 changed files with 7,547 additions and 1,897 deletions.
781 changes: 547 additions & 234 deletions GRBL-Plotter/GUI/MainForm.Designer.cs

Large diffs are not rendered by default.

3,959 changes: 3,959 additions & 0 deletions GRBL-Plotter/GUI/MainForm.Designer.cs.bak

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions GRBL-Plotter/GUI/MainForm.ar.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1209,4 +1209,47 @@
<data name="processAutomationToolStripMenuItem.Text" xml:space="preserve">
<value>أتمتة العمليات</value>
</data>
<data name="wireCutterToolStripMenuItem.Text" xml:space="preserve">
<value>قاطع الاسلاك</value>
</data>
<data name="BtnJogAbsZ.Text" xml:space="preserve">
<value>انتقل الى</value>
</data>
<data name="BtnJogAbsY.Text" xml:space="preserve">
<value>انتقل الى</value>
</data>
<data name="BtnJogAbsX.Text" xml:space="preserve">
<value>انتقل الى</value>
</data>
<data name="Gb_Jogging.Text" xml:space="preserve">
<value>التحكم / الركض - انقر للتوسيع</value>
<comment>groupBox_Jogging</comment>
</data>
<data name="applyLastTransformToolStripMenuItem.Text" xml:space="preserve">
<value>تطبيق التحويل الأخير</value>
</data>
<data name="cmsPicBoxReloadFile2.Text" xml:space="preserve">
<value>إعادة تحميل الملف 2</value>
</data>
<data name="cmsPicBoxClearWorkspace.Text" xml:space="preserve">
<value>مسح مساحة العمل</value>
</data>
<data name="convertToPolarCoordinatesToolStripMenuItem.Text" xml:space="preserve">
<value>تحويل إلى الإحداثيات القطبية</value>
</data>
<data name="CbMist.ToolTip" xml:space="preserve">
<value>اضبط "M7" وامسح "M9"</value>
</data>
<data name="CbSpindle.ToolTip" xml:space="preserve">
<value>اضبط "M3" أو "M4"، وامسح "M5"</value>
</data>
<data name="CbCoolant.ToolTip" xml:space="preserve">
<value>اضبط "M8"، امسح "M9"</value>
</data>
<data name="gBoxDROSetCoord.Text" xml:space="preserve">
<value>ضبط نظام الإحداثيات</value>
</data>
<data name="gBoxDRO.Text" xml:space="preserve">
<value>إحداثيات الأداة (العمل / الجهاز)</value>
</data>
</root>
107 changes: 83 additions & 24 deletions GRBL-Plotter/GUI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ You should have received a copy of the GNU General Public License
* 2023-01-02 CbLaser_CheckedChanged, CbSpindle_CheckedChanged check if Grbl.isConnected
* 2023-03-07 l:714/786/811 f:VirtualJoystickXY/Z/A_move if index =0 stop Jog -> if (!Grbl.isVersion_0) SendRealtimeCommand(133);
* 2023-03-09 l:1213 bugfix start streaming
* 2023-05-30 l:532 f:MainTimer_Tick add _message_form close
* 2023-09-11 l:270 f:SplashScreenTimer_Tick multiple file import and issue #360 -> new function MainFormLoadFile.cs - LoadFiles(string[] fileList, int minIndex)
* 2023-05-30 l:532 f:MainTimer_Tick add _message_form close
* 2023-09-11 l:270 f:SplashScreenTimer_Tick multiple file import and issue #360 -> new function MainFormLoadFile.cs - LoadFiles(string[] fileList, int minIndex)
* 2024-05-19 l:1159 f:BtnReset_Click removed StopStreaming to avoid applying code after "stop" from flowControlText
* 2024-05-28 l:625 f:MainTimer_Tick add delayedHeightMapShow timer
*/

using GrblPlotter.GUI;
Expand Down Expand Up @@ -178,16 +180,9 @@ public MainForm()

CustomButtonsSetEvents(); // for buttons 17 to 32
SetMenuShortCuts(); // Add shortcuts to menu items
LoadRecentList(); // open Recent.txt and fill menu
try
{ cmsPicBoxReloadFile.Text += " | " + Path.GetFileName(Datapath.MakeAbsolutePath(MRUlist[0])); }
catch
{
Logger.Error("MainForm: could not set cmsPicBoxReloadFile.Text");
}

UpdateMenuChecker();

LoadRecentList(); // open Recent.txt and fill menu
if (MRUlist.Count > 0) // add recent list to gui menu
{
foreach (string item in MRUlist)
Expand All @@ -196,19 +191,27 @@ public MainForm()
toolStripMenuItem2.DropDownItems.Add(fileRecent); //add the menu to "recent" menu
}
}
SetRecentText();

int toolSelect = Properties.Settings.Default.guiToolSelection;
if ((toolSelect < 0) || (toolSelect >= tabControl1.TabCount))
if ((toolSelect < 0) || (toolSelect >= tC_RouterPlotterLaser.TabCount))
toolSelect = 0;
tabControl1.SelectedIndex = toolSelect;
tC_RouterPlotterLaser.SelectedIndex = toolSelect;

LoadExtensionList(); // fill menu with available extension-scripts
CmsPicBoxEnable(false); // no graphic - no tasks
cmsPicBoxReloadFile.ToolTipText = string.Format(culture, "Load '{0}'", MRUlist[0]); // set last loaded in cms menu

this.gBoxOverride.Click += GrpBoxOverride_Click; // add event handler to groupBox for opening/closing Feed override controls
gBoxDRO.Click += GrpBoxDRO_Click;
gBoxDROSetCoord.Click += GrpBoxDRO_Click;

gBoxOverride.Click += GrpBoxOverride_Click; // add event handler to groupBox for opening/closing Feed override controls
gBoxOverride.Height = 15;
gBoxOverrideBig = false;
gBoxOverrideLarge = false;

Gb_Jogging.Click += GrpBoxJogging_Click; // add event handler to groupBox for opening/closing Feed override controls
Gb_Jogging.Height = 75;
GbJoggingLarge = false;

lbDimension.Select(0, 0); // unselect text Dimension box

try
Expand Down Expand Up @@ -332,7 +335,7 @@ private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
Properties.Settings.Default.locationMForm = Location;
ControlPowerSaving.EnableStandby();
Properties.Settings.Default.mainFormSplitDistance = splitContainer1.SplitterDistance;
Properties.Settings.Default.guiToolSelection = tabControl1.SelectedIndex;
Properties.Settings.Default.guiToolSelection = tC_RouterPlotterLaser.SelectedIndex;

Properties.Settings.Default.guiLastEnd = DateTime.Now.Ticks;

Expand Down Expand Up @@ -614,9 +617,14 @@ private void MainTimer_Tick(object sender, EventArgs e)
if (!CloseMessageForm(true))
delayedMessageFormClose++;

Logger.Trace("delayedMessageFormClose {0}", delayedMessageFormClose);
// Logger.Trace("delayedMessageFormClose {0}", delayedMessageFormClose);
}
}
if (delayedHeightMapShow > 0)
{
if (delayedHeightMapShow-- == 1)
{ LoadHeightMap(); }
}
mainTimerCount++;
}

Expand Down Expand Up @@ -863,12 +871,12 @@ private void BtnJogStop_Click(object sender, EventArgs e)
private void VirtualJoystickXY_Enter(object sender, EventArgs e)
{
if (Grbl.isVersion_0) SendCommands("G91;G1F100");
gB_Jogging.BackColor = Color.LightGreen;
Gb_Jogging.BackColor = Color.LightGreen;
}
private void VirtualJoystickXY_Leave(object sender, EventArgs e)
{
if (Grbl.isVersion_0) SendCommand("G90");
gB_Jogging.BackColor = SystemColors.Control;
Gb_Jogging.BackColor = SystemColors.Control;
virtualJoystickXY.JoystickRasterMark = 0;
virtualJoystickZ.JoystickRasterMark = 0;
virtualJoystickA.JoystickRasterMark = 0;
Expand Down Expand Up @@ -1107,7 +1115,7 @@ private void BtnHome_Click(object sender, EventArgs e)
SendCommand("$H");
}
private void BtnZeroX_Click(object sender, EventArgs e)
{ SendCommands((Grbl.isMarlin ? "G92" : zeroCmd) + " X0.000"); }
{ SendCommands((Grbl.isMarlin ? "G92" : zeroCmd) + " X0.000"); } // zeroCmd = "G10 L20 P0";
private void BtnZeroY_Click(object sender, EventArgs e)
{ SendCommands((Grbl.isMarlin ? "G92" : zeroCmd) + " Y0.000"); }
private void BtnZeroZ_Click(object sender, EventArgs e)
Expand All @@ -1123,6 +1131,18 @@ private void BtnZeroXY_Click(object sender, EventArgs e)
private void BtnZeroXYZ_Click(object sender, EventArgs e)
{ SendCommands((Grbl.isMarlin ? "G92" : zeroCmd) + " X0.000 Y0.000 Z0.000"); }

private void BtnSetCoordX_Click(object sender, EventArgs e)
{ SendCommands((Grbl.isMarlin ? "G92" : zeroCmd) + string.Format(" X{0:0.000}",NudSetCoordX.Value)); } // zeroCmd = "G10 L20 P0";

private void BtnSetCoordY_Click(object sender, EventArgs e)
{ SendCommands((Grbl.isMarlin ? "G92" : zeroCmd) + string.Format(" Y{0:0.000}", NudSetCoordY.Value)); } // zeroCmd = "G10 L20 P0";

private void BtnSetCoordZ_Click(object sender, EventArgs e)
{ SendCommands((Grbl.isMarlin ? "G92" : zeroCmd) + string.Format(" Z{0:0.000}", NudSetCoordZ.Value)); } // zeroCmd = "G10 L20 P0";

private void BtnSetCoordA_Click(object sender, EventArgs e)
{ SendCommands((Grbl.isMarlin ? "G92" : zeroCmd) + string.Format(" A{0:0.000}", NudSetCoordA.Value)); } // zeroCmd = "G10 L20 P0";

private void BtnJogX_Click(object sender, EventArgs e)
{ BtnMoveZero("X0", joystickXYSpeed[5].ToString(culture)); }
private void BtnJogY_Click(object sender, EventArgs e)
Expand All @@ -1133,6 +1153,12 @@ private void BtnJogZeroA_Click(object sender, EventArgs e)
{ BtnMoveZero(ctrl4thName + "0", joystickZSpeed[5].ToString(culture)); }
private void BtnJogXY_Click(object sender, EventArgs e)
{ BtnMoveZero("X0Y0", joystickXYSpeed[5].ToString(culture)); }
private void BtnJogAbsX_Click(object sender, EventArgs e)
{ BtnMoveZero(string.Format("X{0:0.000}",NudJogAbsX.Value), joystickXYSpeed[5].ToString(culture));}
private void BtnJogAbsY_Click(object sender, EventArgs e)
{ BtnMoveZero(string.Format("Y{0:0.000}", NudJogAbsY.Value), joystickXYSpeed[5].ToString(culture)); }
private void BtnJogAbsZ_Click(object sender, EventArgs e)
{ BtnMoveZero(string.Format("Z{0:0.000}", NudJogAbsZ.Value), joystickZSpeed[5].ToString(culture)); }

private void BtnMoveZero(string axis, string fed)
{
Expand All @@ -1156,7 +1182,7 @@ private void BtnReset_Click(object sender, EventArgs e)
if (_serial_form.IsConnectedToGrbl())
{
Logger.Trace("BtnReset_Click IsConnectedToGrbl");
// StopStreaming(true); // removed 2024-05-19
// StopStreaming(true); // removed 2024-05-19
_serial_form.GrblReset(true); // savePos
}
isStreaming = false;
Expand Down Expand Up @@ -1536,10 +1562,32 @@ private void SplitContainer1_SplitterMoved(object sender, SplitterEventArgs e)
groupBox4.Left = 133 + add;
}

private bool gBoxOverrideBig = false;
private bool gBoxDROShowSetCoord = false;
private void GrpBoxDRO_Click(object sender, EventArgs e)
{
if (!gBoxDROShowSetCoord)
{
if (Grbl.axisB || Grbl.axisC)
gBoxDRO.Width = 400;
else
gBoxDRO.Width = 267;
gBoxDROSetCoord.Visible = true;
}
else
{
if (Grbl.axisB || Grbl.axisC)
gBoxDRO.Width = 400;
else
gBoxDRO.Width = 230;
gBoxDROSetCoord.Visible = false;
}
gBoxDROShowSetCoord = !gBoxDROShowSetCoord;
}

private bool gBoxOverrideLarge = false;
private void GrpBoxOverride_Click(object sender, EventArgs e)
{
if (gBoxOverrideBig)
if (gBoxOverrideLarge)
gBoxOverride.Height = 15;
else
{
Expand All @@ -1554,7 +1602,16 @@ private void GrpBoxOverride_Click(object sender, EventArgs e)
gBOverrideASGB.Height = 37;
}
}
gBoxOverrideBig = !gBoxOverrideBig;
gBoxOverrideLarge = !gBoxOverrideLarge;
}
private bool GbJoggingLarge = false;
private void GrpBoxJogging_Click(object sender, EventArgs e)
{
if (GbJoggingLarge)
Gb_Jogging.Height = 75;
else
Gb_Jogging.Height = 150;
GbJoggingLarge = !GbJoggingLarge;
}

internal void SetUndoText(string txt)
Expand Down Expand Up @@ -1708,6 +1765,7 @@ private void ShowFormsToolStripMenuItem_Click(object sender, EventArgs e)
if (_text_form != null) { _text_form.WindowState = FormWindowState.Normal; _text_form.BringToFront(); }
if (_image_form != null) { _image_form.WindowState = FormWindowState.Normal; _image_form.BringToFront(); }
if (_shape_form != null) { _shape_form.WindowState = FormWindowState.Normal; _shape_form.BringToFront(); }
if (_wireCutter_form != null) { _wireCutter_form.WindowState = FormWindowState.Normal; _wireCutter_form.BringToFront(); }
if (_barcode_form != null) { _barcode_form.WindowState = FormWindowState.Normal; _barcode_form.BringToFront(); }

if (_setup_form != null) { _setup_form.WindowState = FormWindowState.Normal; _setup_form.BringToFront(); }
Expand All @@ -1729,6 +1787,7 @@ private void CbAddGraphic_CheckedChanged(object sender, EventArgs e)
else
CbAddGraphic.BackColor = Color.Transparent;
}

}
}

43 changes: 43 additions & 0 deletions GRBL-Plotter/GUI/MainForm.cs.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1212,4 +1212,47 @@ Změna nastavení importu po prvním importu může vést k nežádoucím efekt
<data name="processAutomationToolStripMenuItem.Text" xml:space="preserve">
<value>Procesní automatizace</value>
</data>
<data name="wireCutterToolStripMenuItem.Text" xml:space="preserve">
<value>Štípačky</value>
</data>
<data name="BtnJogAbsZ.Text" xml:space="preserve">
<value>Convidar a</value>
</data>
<data name="BtnJogAbsY.Text" xml:space="preserve">
<value>Convidar a</value>
</data>
<data name="BtnJogAbsX.Text" xml:space="preserve">
<value>Convidar a</value>
</data>
<data name="Gb_Jogging.Text" xml:space="preserve">
<value>Ovládání / Jogging - kliknutím rozbalte</value>
<comment>groupBox_Jogging</comment>
</data>
<data name="applyLastTransformToolStripMenuItem.Text" xml:space="preserve">
<value>Použít poslední transformaci</value>
</data>
<data name="cmsPicBoxReloadFile2.Text" xml:space="preserve">
<value>Znovu načíst soubor 2</value>
</data>
<data name="cmsPicBoxClearWorkspace.Text" xml:space="preserve">
<value>Vyčistit pracovní prostor</value>
</data>
<data name="convertToPolarCoordinatesToolStripMenuItem.Text" xml:space="preserve">
<value>Převést na polární souřadnice</value>
</data>
<data name="CbMist.ToolTip" xml:space="preserve">
<value>Nastavit 'M7', vymazat 'M9'</value>
</data>
<data name="CbSpindle.ToolTip" xml:space="preserve">
<value>Nastavte „M3“ nebo „M4“, vymažte „M5“</value>
</data>
<data name="CbCoolant.ToolTip" xml:space="preserve">
<value>Nastavit 'M8', vymazat 'M9'</value>
</data>
<data name="gBoxDROSetCoord.Text" xml:space="preserve">
<value>Nastavit souřadnicový systém</value>
</data>
<data name="gBoxDRO.Text" xml:space="preserve">
<value>Souřadnice nástroje (práce / stroj)</value>
</data>
</root>
55 changes: 55 additions & 0 deletions GRBL-Plotter/GUI/MainForm.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1126,4 +1126,59 @@ Das Ändern der Importeinstellungen nach dem ersten Import kann zu unerwünschte
<data name="processAutomationToolStripMenuItem.Text" xml:space="preserve">
<value>Prozessautomatisierung</value>
</data>
<data name="wireCutterToolStripMenuItem.Text" xml:space="preserve">
<value>Drahtschneider</value>
</data>
<data name="BtnJogAbsZ.Text" xml:space="preserve">
<value>Fahre </value>
</data>
<data name="BtnJogAbsY.Text" xml:space="preserve">
<value>Fahre </value>
</data>
<data name="BtnJogAbsX.Text" xml:space="preserve">
<value>Fahre </value>
</data>
<data name="applyLastTransformToolStripMenuItem.Text" xml:space="preserve">
<value>Letzte Transformation anwenden</value>
</data>
<data name="cmsPicBoxReloadFile2.Text" xml:space="preserve">
<value>Datei 2 neu laden</value>
</data>
<data name="cmsPicBoxClearWorkspace.Text" xml:space="preserve">
<value>Arbeitsbereich löschen</value>
</data>
<data name="convertToPolarCoordinatesToolStripMenuItem.Text" xml:space="preserve">
<value>In Polarkoordinaten umrechnen</value>
</data>
<data name="Gb_Jogging.Text" xml:space="preserve">
<value>Steuerung/Joggen – zum Vergrößern anklicken</value>
<comment>groupBox_Jogging</comment>
</data>
<data name="CbMist.ToolTip" xml:space="preserve">
<value>„M7“ setzen, „M9“ löschen</value>
</data>
<data name="CbSpindle.ToolTip" xml:space="preserve">
<value>„M3“ oder „M4“ setzen, „M5“ löschen</value>
</data>
<data name="CbCoolant.Text" xml:space="preserve">
<value>Kühlmittel</value>
<comment>groupBox_Jogging</comment>
</data>
<data name="CbCoolant.ToolTip" xml:space="preserve">
<value>„M8“ setzen, „M9“ löschen</value>
</data>
<data name="gBoxDROSetCoord.Text" xml:space="preserve">
<value>Koordinatensystem festlegen</value>
</data>
<data name="btnZeroC.ToolTip" xml:space="preserve">
<value>Setzt die C-Koordinate des Werkstücks auf Null</value>
<comment>groupBox_Tool_Coord</comment>
</data>
<data name="btnZeroB.ToolTip" xml:space="preserve">
<value>Setzt die B-Koordinate des Werkstücks auf Null</value>
<comment>groupBox_Tool_Coord</comment>
</data>
<data name="gBoxDRO.Text" xml:space="preserve">
<value>Werkzeugkoordinaten (Arbeit / Maschine)</value>
</data>
</root>
Loading

0 comments on commit 4becf0d

Please sign in to comment.