diff --git a/Step.UI/Dialogs/LockForm.Designer.cs b/Step.UI/Dialogs/LockForm.Designer.cs
new file mode 100644
index 00000000..ab4954c3
--- /dev/null
+++ b/Step.UI/Dialogs/LockForm.Designer.cs
@@ -0,0 +1,75 @@
+namespace Step.UI
+{
+ partial class LockForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.PictureBox_Gif = new System.Windows.Forms.PictureBox();
+ this.Timer_Exit = new System.Windows.Forms.Timer(this.components);
+ ((System.ComponentModel.ISupportInitialize)(this.PictureBox_Gif)).BeginInit();
+ this.SuspendLayout();
+ //
+ // PictureBox_Gif
+ //
+ this.PictureBox_Gif.Location = new System.Drawing.Point(0, 0);
+ this.PictureBox_Gif.Margin = new System.Windows.Forms.Padding(0);
+ this.PictureBox_Gif.Name = "PictureBox_Gif";
+ this.PictureBox_Gif.Size = new System.Drawing.Size(480, 360);
+ this.PictureBox_Gif.TabIndex = 1;
+ this.PictureBox_Gif.TabStop = false;
+ //
+ // Timer_Exit
+ //
+ this.Timer_Exit.Interval = 2000;
+ this.Timer_Exit.Tick += new System.EventHandler(this.Timer_Exit_Tick);
+ //
+ // LockForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(480, 360);
+ this.Controls.Add(this.PictureBox_Gif);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "LockForm";
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "dlgLocked";
+ this.TopMost = true;
+ this.Load += new System.EventHandler(this.LockForm_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.PictureBox_Gif)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+ internal System.Windows.Forms.PictureBox PictureBox_Gif;
+ private System.Windows.Forms.Timer Timer_Exit;
+ }
+}
\ No newline at end of file
diff --git a/Step.UI/Dialogs/LockForm.cs b/Step.UI/Dialogs/LockForm.cs
new file mode 100644
index 00000000..0e71b18e
--- /dev/null
+++ b/Step.UI/Dialogs/LockForm.cs
@@ -0,0 +1,47 @@
+using Step.NC;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Step.UI
+{
+ public partial class LockForm : Form
+ {
+ bool lockOp = false;
+
+ public LockForm(bool lockOperation)
+ {
+ InitializeComponent();
+
+ lockOp = lockOperation;
+ if (lockOp)
+ PictureBox_Gif.Image = Step.UI.Properties.Resources.LockClose;
+ else
+ PictureBox_Gif.Image = Step.UI.Properties.Resources.LockOpen;
+ }
+
+
+ private void LockForm_Load(object sender, EventArgs e)
+ {
+ Timer_Exit.Start();
+ }
+
+ private void Timer_Exit_Tick(object sender, EventArgs e)
+ {
+ Timer_Exit.Stop();
+ this.Opacity = 0.7;
+ this.Refresh();
+ this.Opacity = 0.3;
+ this.Refresh();
+ this.Opacity = 0.0;
+ this.Refresh();
+ this.Close();
+ }
+ }
+}
diff --git a/Step.UI/Dialogs/LockForm.resx b/Step.UI/Dialogs/LockForm.resx
new file mode 100644
index 00000000..e6ac8b36
--- /dev/null
+++ b/Step.UI/Dialogs/LockForm.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/Step.UI/Properties/Resources.Designer.cs b/Step.UI/Properties/Resources.Designer.cs
index 59b1a956..b2568e5a 100644
--- a/Step.UI/Properties/Resources.Designer.cs
+++ b/Step.UI/Properties/Resources.Designer.cs
@@ -89,5 +89,25 @@ namespace Step.UI.Properties {
return ((System.Drawing.Icon)(obj));
}
}
+
+ ///
+ /// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap LockClose {
+ get {
+ object obj = ResourceManager.GetObject("LockClose", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap LockOpen {
+ get {
+ object obj = ResourceManager.GetObject("LockOpen", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
}
}
diff --git a/Step.UI/Properties/Resources.resx b/Step.UI/Properties/Resources.resx
index 443cc29f..17ff4aee 100644
--- a/Step.UI/Properties/Resources.resx
+++ b/Step.UI/Properties/Resources.resx
@@ -127,4 +127,10 @@
..\Resources\CMS_Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\LockClose.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\LockOpen.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/Step.UI/Resources/LockClose.gif b/Step.UI/Resources/LockClose.gif
new file mode 100644
index 00000000..fb013785
Binary files /dev/null and b/Step.UI/Resources/LockClose.gif differ
diff --git a/Step.UI/Resources/LockOpen.gif b/Step.UI/Resources/LockOpen.gif
new file mode 100644
index 00000000..a17d48b8
Binary files /dev/null and b/Step.UI/Resources/LockOpen.gif differ
diff --git a/Step.UI/ServerControlWindow.Designer.cs b/Step.UI/ServerControlWindow.Designer.cs
index a2c8d1ca..711a725a 100644
--- a/Step.UI/ServerControlWindow.Designer.cs
+++ b/Step.UI/ServerControlWindow.Designer.cs
@@ -40,6 +40,7 @@ namespace Step.UI
this.goBackToStandardModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
this.resetSpindleHoursToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.resetCountersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TXTstatus = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.stopServerButton = new System.Windows.Forms.Button();
@@ -63,7 +64,6 @@ namespace Step.UI
this.goBackToStandardModeToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.resetSpindleHoursToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
- this.resetCountersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resetCountersToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.NotifyIconMenu.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
@@ -87,7 +87,7 @@ namespace Step.UI
this.adminMachineToolStripMenuItem});
this.NotifyIconMenu.Name = "NotifyIconMenu";
this.NotifyIconMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
- this.NotifyIconMenu.Size = new System.Drawing.Size(167, 48);
+ this.NotifyIconMenu.Size = new System.Drawing.Size(181, 70);
//
// StopServerItem
//
@@ -137,6 +137,14 @@ namespace Step.UI
this.resetSpindleHoursToolStripMenuItem.Visible = false;
this.resetSpindleHoursToolStripMenuItem.Click += new System.EventHandler(this.resetSpindleHoursToolStripMenuItem_Click);
//
+ // resetCountersToolStripMenuItem
+ //
+ this.resetCountersToolStripMenuItem.Name = "resetCountersToolStripMenuItem";
+ this.resetCountersToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
+ this.resetCountersToolStripMenuItem.Text = "Reset Counters";
+ this.resetCountersToolStripMenuItem.Visible = false;
+ this.resetCountersToolStripMenuItem.Click += new System.EventHandler(this.resetCountersToolStripMenuItem_Click);
+ //
// TXTstatus
//
this.TXTstatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
@@ -378,13 +386,6 @@ namespace Step.UI
this.resetSpindleHoursToolStripMenuItem1.Visible = false;
this.resetSpindleHoursToolStripMenuItem1.Click += new System.EventHandler(this.resetSpindleHoursToolStripMenuItem1_Click);
//
- // resetCountersToolStripMenuItem
- //
- this.resetCountersToolStripMenuItem.Name = "resetCountersToolStripMenuItem";
- this.resetCountersToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
- this.resetCountersToolStripMenuItem.Text = "Reset Counters";
- this.resetCountersToolStripMenuItem.Click += new System.EventHandler(this.resetCountersToolStripMenuItem_Click);
- //
// resetCountersToolStripMenuItem1
//
this.resetCountersToolStripMenuItem1.Name = "resetCountersToolStripMenuItem1";
diff --git a/Step.UI/ServerControlWindow.cs b/Step.UI/ServerControlWindow.cs
index 423e0554..7140bb56 100644
--- a/Step.UI/ServerControlWindow.cs
+++ b/Step.UI/ServerControlWindow.cs
@@ -27,6 +27,7 @@ namespace Step.UI
PasswordForm PswForm;
ResetSpindleForm ResSpForm;
ResetCountersForm ResCouForm;
+ LockForm LckFrm;
[DllImport("user32.dll")]
static extern bool SetForegroundWindow(IntPtr hWnd);
@@ -320,7 +321,8 @@ namespace Step.UI
toolStripSeparator1.Visible = true;
passwordToolStripMenuItem.Enabled = false;
passwordToolStripMenuItem1.Enabled = false;
- MessageBox.Show("Machine Unlocked for administrator use", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ LckFrm = new LockForm(false);
+ LckFrm.ShowDialog();
}
}
private void backStdMode()
@@ -335,7 +337,8 @@ namespace Step.UI
toolStripSeparator1.Visible = false;
passwordToolStripMenuItem.Enabled = true;
passwordToolStripMenuItem1.Enabled = true;
- MessageBox.Show("Machine Locked for standard use", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ LckFrm = new LockForm(true);
+ LckFrm.ShowDialog();
}
diff --git a/Step.UI/Step.UI.csproj b/Step.UI/Step.UI.csproj
index 00f5f704..2713dbac 100644
--- a/Step.UI/Step.UI.csproj
+++ b/Step.UI/Step.UI.csproj
@@ -55,6 +55,12 @@
+
+ Form
+
+
+ LockForm.cs
+
Form
@@ -97,6 +103,9 @@
+
+ LockForm.cs
+
ResetCountersForm.cs
@@ -144,5 +153,11 @@
+
+
+
+
+
+
\ No newline at end of file