Skip to content

Commit

Permalink
Version 1.6.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
svenhb committed Nov 19, 2021
1 parent 584d5ac commit eb0db95
Show file tree
Hide file tree
Showing 15 changed files with 24,254 additions and 14,854 deletions.
21 changes: 18 additions & 3 deletions GRBL-Plotter/MachineControl/CheckUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* 2020-05-06 add Logger.Info
* 2021-05-06 new method to get unique id
* 2021-07-26 code clean up / code quality
* 2021-11-11 track prog-start and -end
*/

using System;
Expand All @@ -32,9 +33,6 @@
using System.Text.RegularExpressions;
using System.Windows.Forms;

//#pragma warning disable CA1303 // Do not pass literals as localized parameters
//#pragma warning disable CA1307

namespace GrblPlotter
{
class CheckUpdate
Expand Down Expand Up @@ -81,6 +79,7 @@ private static void TryCheckSite2()
get += "&langori=" + ci.Name;
get += "&import=" + GetCounters(CounterType.import);
get += "&usage=" + GetCounters(CounterType.usage);
get += "&error=" + GetError();
if (!Properties.Settings.Default.guiCheckUpdateURL.StartsWith("http"))
{
Properties.Settings.Default.guiCheckUpdateURL = "https://GRBL-Plotter.de";
Expand All @@ -96,6 +95,22 @@ private static void TryCheckSite2()

}

private static string GetError()
{
if (Properties.Settings.Default.guiLastStart == 0)
Properties.Settings.Default.guiLastStart = DateTime.Now.Ticks;
if (Properties.Settings.Default.guiLastEnd == 0)
Properties.Settings.Default.guiLastEnd = DateTime.Now.Ticks;

long diff = Properties.Settings.Default.guiLastEnd - Properties.Settings.Default.guiLastStart;
// var days = Math.Floor((decimal)(diff/(24*60*60*10000000L))); // Math.floor() rounds a number downwards to the nearest whole integer, which in this case is the value representing the day
var hours = Math.Round((decimal)((diff/(60*60*10000000L))) ); // % 24) Math.round() rounds the number up or down
var mins = Math.Round((decimal)((diff/(60*10000000))) % 60);
string output = string.Format("{0:00}:{1:00}-{2}",hours, mins, Properties.Settings.Default.guiLastEndReason);
// Logger.Info("{0} {1} {2}", diff, Properties.Settings.Default.guiLastStart, Properties.Settings.Default.guiLastEnd);
Logger.Info(output);
return output;
}

private static string GetCounters(CounterType type)
{
Expand Down
362 changes: 262 additions & 100 deletions GRBL-Plotter/MachineControl/ControlSetupForm.Designer.cs

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions GRBL-Plotter/MachineControl/ControlSetupForm.ar.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3068,4 +3068,10 @@ Pushbullet: لأسباب تتعلق بالسلامة ، يجب عليك استخ
<data name="CbCameraFiducialSkip.Text" xml:space="preserve">
<value>تخطي رمز G للنقاط الإئتمانية أثناء البث</value>
</data>
<data name="LblShowVertex.Text" xml:space="preserve">
<value>اكتب وحجم علامة عقدة المسار</value>
</data>
<data name="CbShowVertexEnable.Text" xml:space="preserve">
<value>يعرض عقد مسار القلم لأسفل</value>
</data>
</root>
2 changes: 2 additions & 0 deletions GRBL-Plotter/MachineControl/ControlSetupForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ private void BtnColorSimulation_Click(object sender, EventArgs e)

private void ApplyColor(Button btn, string settings)
{
colorDialog1.AnyColor = true;
colorDialog1.Color = (Color)Properties.Settings.Default[settings];
if (colorDialog1.ShowDialog() == DialogResult.OK)
{
SetButtonColors(btn, colorDialog1.Color);
Expand Down
6 changes: 6 additions & 0 deletions GRBL-Plotter/MachineControl/ControlSetupForm.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2756,4 +2756,10 @@ Der tatsächlich nutzbare Bereich wäre $ 30 = 31, $ 31 = 0.</value>
<data name="CbCameraFiducialSkip.Text" xml:space="preserve">
<value>Überspringe den G-Code der Bezugspunkte beim Streamen</value>
</data>
<data name="LblShowVertex.Text" xml:space="preserve">
<value>Typ und Größe der Pfadknotenmarker</value>
</data>
<data name="CbShowVertexEnable.Text" xml:space="preserve">
<value>Zeigt die Stift-unten Pfadknoten an</value>
</data>
</root>
6 changes: 6 additions & 0 deletions GRBL-Plotter/MachineControl/ControlSetupForm.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2807,4 +2807,10 @@ El rango utilizable real sería $ 30 = 31, $ 31 = 0.</value>
<data name="CbCameraFiducialSkip.Text" xml:space="preserve">
<value>Omita el código G de los puntos fiduciales mientras transmite</value>
</data>
<data name="LblShowVertex.Text" xml:space="preserve">
<value>Tipo y tamaño del marcador de nodo de ruta</value>
</data>
<data name="CbShowVertexEnable.Text" xml:space="preserve">
<value>Muestra los nodos de ruta de pluma hacia abajo</value>
</data>
</root>
6 changes: 6 additions & 0 deletions GRBL-Plotter/MachineControl/ControlSetupForm.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2807,4 +2807,10 @@ La plage utilisable réelle serait 30 $ = 31, 31 $ = 0.</value>
<data name="CbCameraFiducialSkip.Text" xml:space="preserve">
<value>Ignorez le code G des points de repère lors du streaming</value>
</data>
<data name="LblShowVertex.Text" xml:space="preserve">
<value>Type et taille du marqueur de nœud de chemin</value>
</data>
<data name="CbShowVertexEnable.Text" xml:space="preserve">
<value>Affiche les nœuds de chemin de plume vers le bas</value>
</data>
</root>
6 changes: 6 additions & 0 deletions GRBL-Plotter/MachineControl/ControlSetupForm.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3092,4 +3092,10 @@ https://github.com/cprezzi/grbl-servoのGrbl-version'grbl_v1.1f_Servo.hex '、
<data name="CbCameraFiducialSkip.Text" xml:space="preserve">
<value>ストリーミング中に基準点のGコードをスキップする</value>
</data>
<data name="LblShowVertex.Text" xml:space="preserve">
<value>パスノードマーカーのタイプとサイズ</value>
</data>
<data name="CbShowVertexEnable.Text" xml:space="preserve">
<value>ペンダウンパスノードを表示します</value>
</data>
</root>
6 changes: 6 additions & 0 deletions GRBL-Plotter/MachineControl/ControlSetupForm.pt.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2816,4 +2816,10 @@ O intervalo utilizável real seria $ 30 = 31, $ 31 = 0.</value>
<data name="CbCameraFiducialSkip.Text" xml:space="preserve">
<value>Ignore o código G dos pontos fiduciais durante a transmissão</value>
</data>
<data name="LblShowVertex.Text" xml:space="preserve">
<value>Tipo e tamanho do marcador do nó do caminho</value>
</data>
<data name="CbShowVertexEnable.Text" xml:space="preserve">
<value>Exibe os nós do caminho da caneta</value>
</data>
</root>
Loading

0 comments on commit eb0db95

Please sign in to comment.