diff --git a/Enigma/Enigma.csproj b/Enigma/Enigma.csproj index e38a033..79fa64d 100644 --- a/Enigma/Enigma.csproj +++ b/Enigma/Enigma.csproj @@ -82,7 +82,20 @@ HostStationView.cs + + Form + + + PinScreen.cs + + + Form + + + WaiterStationView.cs + + EnigmaMain.cs @@ -98,10 +111,17 @@ True Resources.resx + True HostStationView.cs + + PinScreen.cs + + + WaiterStationView.cs + SettingsSingleFileGenerator @@ -122,7 +142,9 @@ EnigmaX - + + + + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,13 @@ 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 + + + ..\Resources\lonely_sun_by_butterflypics-d8orr9a.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Enigma/Resources/lonely_sun_by_butterflypics-d8orr9a.png b/Enigma/Resources/lonely_sun_by_butterflypics-d8orr9a.png new file mode 100644 index 0000000..a90e2ff Binary files /dev/null and b/Enigma/Resources/lonely_sun_by_butterflypics-d8orr9a.png differ diff --git a/Enigma/Stations/WaiterStation.cs b/Enigma/Stations/WaiterStation.cs new file mode 100644 index 0000000..08a930b --- /dev/null +++ b/Enigma/Stations/WaiterStation.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using EnigmaX.Classes; + +namespace Enigma.Stations +{ + class WaiterStation : Station + { + public WaiterStation(string stationid) : base(StationTypeDef.host, stationid) + { + view = new StationsGUI.WaiterStationView(); + + } + + } +} diff --git a/Enigma/StationsGUI/PinScreen.Designer.cs b/Enigma/StationsGUI/PinScreen.Designer.cs new file mode 100644 index 0000000..304f75a --- /dev/null +++ b/Enigma/StationsGUI/PinScreen.Designer.cs @@ -0,0 +1,288 @@ +namespace Enigma.StationsGUI +{ + partial class PinScreen + { + /// + /// 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.button1 = new MetroFramework.Controls.MetroButton(); + this.pin = new MetroFramework.Controls.MetroTextBox(); + this.pinPanel = new MetroFramework.Controls.MetroPanel(); + this.buttonEnter = new MetroFramework.Controls.MetroButton(); + this.buttonClear = new MetroFramework.Controls.MetroButton(); + this.button0 = new MetroFramework.Controls.MetroButton(); + this.button9 = new MetroFramework.Controls.MetroButton(); + this.button8 = new MetroFramework.Controls.MetroButton(); + this.button7 = new MetroFramework.Controls.MetroButton(); + this.button6 = new MetroFramework.Controls.MetroButton(); + this.button5 = new MetroFramework.Controls.MetroButton(); + this.button4 = new MetroFramework.Controls.MetroButton(); + this.button3 = new MetroFramework.Controls.MetroButton(); + this.button2 = new MetroFramework.Controls.MetroButton(); + this.pinPanel.SuspendLayout(); + this.SuspendLayout(); + // + // button1 + // + this.button1.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button1.Location = new System.Drawing.Point(13, 74); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 75); + this.button1.TabIndex = 0; + this.button1.Text = "1"; + this.button1.UseSelectable = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // pin + // + this.pin.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + // + // + // + this.pin.CustomButton.Image = null; + this.pin.CustomButton.Location = new System.Drawing.Point(187, 1); + this.pin.CustomButton.Name = ""; + this.pin.CustomButton.Size = new System.Drawing.Size(49, 49); + this.pin.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.pin.CustomButton.TabIndex = 1; + this.pin.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.pin.CustomButton.UseSelectable = true; + this.pin.CustomButton.Visible = false; + this.pin.FontSize = MetroFramework.MetroTextBoxSize.Medium; + this.pin.Lines = new string[0]; + this.pin.Location = new System.Drawing.Point(13, 13); + this.pin.MaxLength = 32767; + this.pin.Name = "pin"; + this.pin.PasswordChar = '●'; + this.pin.PromptText = "Pin"; + this.pin.ReadOnly = true; + this.pin.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.pin.SelectedText = ""; + this.pin.SelectionLength = 0; + this.pin.SelectionStart = 0; + this.pin.ShortcutsEnabled = true; + this.pin.Size = new System.Drawing.Size(237, 51); + this.pin.TabIndex = 1; + this.pin.UseSelectable = true; + this.pin.UseSystemPasswordChar = true; + this.pin.WaterMark = "Pin"; + this.pin.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.pin.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // pinPanel + // + this.pinPanel.Controls.Add(this.buttonEnter); + this.pinPanel.Controls.Add(this.buttonClear); + this.pinPanel.Controls.Add(this.button0); + this.pinPanel.Controls.Add(this.button9); + this.pinPanel.Controls.Add(this.button8); + this.pinPanel.Controls.Add(this.button7); + this.pinPanel.Controls.Add(this.button6); + this.pinPanel.Controls.Add(this.button5); + this.pinPanel.Controls.Add(this.button4); + this.pinPanel.Controls.Add(this.button3); + this.pinPanel.Controls.Add(this.button2); + this.pinPanel.Controls.Add(this.button1); + this.pinPanel.Controls.Add(this.pin); + this.pinPanel.HorizontalScrollbarBarColor = true; + this.pinPanel.HorizontalScrollbarHighlightOnWheel = false; + this.pinPanel.HorizontalScrollbarSize = 10; + this.pinPanel.Location = new System.Drawing.Point(348, 278); + this.pinPanel.Name = "pinPanel"; + this.pinPanel.Padding = new System.Windows.Forms.Padding(10); + this.pinPanel.Size = new System.Drawing.Size(263, 406); + this.pinPanel.TabIndex = 2; + this.pinPanel.VerticalScrollbarBarColor = true; + this.pinPanel.VerticalScrollbarHighlightOnWheel = false; + this.pinPanel.VerticalScrollbarSize = 10; + // + // buttonEnter + // + this.buttonEnter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonEnter.FontSize = MetroFramework.MetroButtonSize.Tall; + this.buttonEnter.Location = new System.Drawing.Point(175, 317); + this.buttonEnter.Name = "buttonEnter"; + this.buttonEnter.Size = new System.Drawing.Size(75, 75); + this.buttonEnter.TabIndex = 12; + this.buttonEnter.Text = "Enter"; + this.buttonEnter.UseSelectable = true; + this.buttonEnter.Click += new System.EventHandler(this.buttonEnter_Click); + // + // buttonClear + // + this.buttonClear.FontSize = MetroFramework.MetroButtonSize.Tall; + this.buttonClear.Location = new System.Drawing.Point(13, 318); + this.buttonClear.Name = "buttonClear"; + this.buttonClear.Size = new System.Drawing.Size(75, 75); + this.buttonClear.TabIndex = 11; + this.buttonClear.Text = "Clear"; + this.buttonClear.UseSelectable = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); + // + // button0 + // + this.button0.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button0.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button0.Location = new System.Drawing.Point(94, 317); + this.button0.Name = "button0"; + this.button0.Size = new System.Drawing.Size(75, 75); + this.button0.TabIndex = 10; + this.button0.Text = "0"; + this.button0.UseSelectable = true; + this.button0.Click += new System.EventHandler(this.button1_Click); + // + // button9 + // + this.button9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button9.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button9.Location = new System.Drawing.Point(175, 236); + this.button9.Name = "button9"; + this.button9.Size = new System.Drawing.Size(75, 75); + this.button9.TabIndex = 9; + this.button9.Text = "9"; + this.button9.UseSelectable = true; + this.button9.Click += new System.EventHandler(this.button1_Click); + // + // button8 + // + this.button8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button8.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button8.Location = new System.Drawing.Point(94, 236); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(75, 75); + this.button8.TabIndex = 8; + this.button8.Text = "8"; + this.button8.UseSelectable = true; + this.button8.Click += new System.EventHandler(this.button1_Click); + // + // button7 + // + this.button7.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button7.Location = new System.Drawing.Point(13, 236); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(75, 75); + this.button7.TabIndex = 7; + this.button7.Text = "7"; + this.button7.UseSelectable = true; + this.button7.Click += new System.EventHandler(this.button1_Click); + // + // button6 + // + this.button6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button6.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button6.Location = new System.Drawing.Point(175, 155); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(75, 75); + this.button6.TabIndex = 6; + this.button6.Text = "6"; + this.button6.UseSelectable = true; + this.button6.Click += new System.EventHandler(this.button1_Click); + // + // button5 + // + this.button5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button5.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button5.Location = new System.Drawing.Point(94, 155); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(75, 75); + this.button5.TabIndex = 5; + this.button5.Text = "5"; + this.button5.UseSelectable = true; + this.button5.Click += new System.EventHandler(this.button1_Click); + // + // button4 + // + this.button4.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button4.Location = new System.Drawing.Point(13, 155); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 75); + this.button4.TabIndex = 4; + this.button4.Text = "4"; + this.button4.UseSelectable = true; + this.button4.Click += new System.EventHandler(this.button1_Click); + // + // button3 + // + this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button3.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button3.Location = new System.Drawing.Point(175, 74); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 75); + this.button3.TabIndex = 3; + this.button3.Text = "3"; + this.button3.UseSelectable = true; + this.button3.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button2.FontSize = MetroFramework.MetroButtonSize.Tall; + this.button2.Location = new System.Drawing.Point(94, 74); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 75); + this.button2.TabIndex = 2; + this.button2.Text = "2"; + this.button2.UseSelectable = true; + this.button2.Click += new System.EventHandler(this.button1_Click); + // + // PinScreen + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1016, 902); + this.Controls.Add(this.pinPanel); + this.Name = "PinScreen"; + this.Text = "Enter Pin"; + this.Load += new System.EventHandler(this.PinInput_Load); + this.Resize += new System.EventHandler(this.PinScreen_Resize); + this.pinPanel.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private MetroFramework.Controls.MetroButton button1; + private MetroFramework.Controls.MetroTextBox pin; + private MetroFramework.Controls.MetroPanel pinPanel; + private MetroFramework.Controls.MetroButton button0; + private MetroFramework.Controls.MetroButton button9; + private MetroFramework.Controls.MetroButton button8; + private MetroFramework.Controls.MetroButton button7; + private MetroFramework.Controls.MetroButton button6; + private MetroFramework.Controls.MetroButton button5; + private MetroFramework.Controls.MetroButton button4; + private MetroFramework.Controls.MetroButton button3; + private MetroFramework.Controls.MetroButton button2; + private MetroFramework.Controls.MetroButton buttonClear; + private MetroFramework.Controls.MetroButton buttonEnter; + } +} \ No newline at end of file diff --git a/Enigma/StationsGUI/PinScreen.cs b/Enigma/StationsGUI/PinScreen.cs new file mode 100644 index 0000000..9ac12e7 --- /dev/null +++ b/Enigma/StationsGUI/PinScreen.cs @@ -0,0 +1,65 @@ +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; +using MetroFramework.Forms; +using MetroFramework.Controls; + +namespace Enigma.StationsGUI +{ + public partial class PinScreen : MetroForm + { + public PinScreen() + { + InitializeComponent(); + } + + private void PinInput_Load(object sender, EventArgs e) + { + + } + + private void button1_Click(object sender, EventArgs e) + { + pin.Text += ((MetroButton)sender).Text; + if (pin.Text.Length >= 4) { + //test pin number here and authenticate + doAuth(pin.Text); + } + } + + private void buttonClear_Click(object sender, EventArgs e) + { + resetPin(); + } + + private void buttonEnter_Click(object sender, EventArgs e) + { + doAuth(pin.Text); + } + + private void doAuth(string enteredPin) { + MessageBox.Show("entered pin: " + enteredPin); + resetPin(); + + } + + private void resetPin() { + pin.Text = ""; + pin.Select(); + } + + private void PinScreen_Resize(object sender, EventArgs e) + { + int pinWidth = pinPanel.Width; + int pinHeight = pinPanel.Height; + + pinPanel.Location = new Point(this.Width / 2 - pinWidth / 2, this.Height / 2 - pinHeight / 2); + } + } +} diff --git a/Enigma/StationsGUI/PinScreen.resx b/Enigma/StationsGUI/PinScreen.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Enigma/StationsGUI/PinScreen.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Enigma/StationsGUI/WaiterStationView.Designer.cs b/Enigma/StationsGUI/WaiterStationView.Designer.cs new file mode 100644 index 0000000..ac5151b --- /dev/null +++ b/Enigma/StationsGUI/WaiterStationView.Designer.cs @@ -0,0 +1,47 @@ +namespace Enigma.StationsGUI +{ + partial class WaiterStationView + { + /// + /// 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.SuspendLayout(); + // + // WaiterStationView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1334, 1020); + this.Name = "WaiterStationView"; + this.Text = "Waiter Station"; + this.Load += new System.EventHandler(this.WaiterStationView_Load); + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/Enigma/StationsGUI/WaiterStationView.cs b/Enigma/StationsGUI/WaiterStationView.cs new file mode 100644 index 0000000..007e705 --- /dev/null +++ b/Enigma/StationsGUI/WaiterStationView.cs @@ -0,0 +1,27 @@ +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; +using EnigmaX.Classes; +using MetroFramework.Forms; + +namespace Enigma.StationsGUI +{ + public partial class WaiterStationView : MetroForm + { + public WaiterStationView() + { + InitializeComponent(); + } + + private void WaiterStationView_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/Enigma/StationsGUI/WaiterStationView.resx b/Enigma/StationsGUI/WaiterStationView.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Enigma/StationsGUI/WaiterStationView.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file