diff --git a/SerialShell/App.config b/SerialShell/App.config
index d29aab9..e44b63b 100644
--- a/SerialShell/App.config
+++ b/SerialShell/App.config
@@ -9,58 +9,106 @@
-
+
- BUTTON1
+ 1
- BUTTON2
+ 2
- BUTTON3
+ 3
- BUTTON4
+ 4
- LEFT1
+ 5
- RIGHT1
+ 6
- LEFT2
+ 7
- RIGHT2
+ 8
- SELECT
+ 9
- START
+ 10
- UP
+ 11
- DOWN
+ 12
- LEFT
+ 13
- RIGHT
+ 14
- LEFTANALOGMID
+ 15
- RIGHTANALOGMID
+ 16
False
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
\ No newline at end of file
diff --git a/SerialShell/JoyButton.Designer.cs b/SerialShell/JoyButton.Designer.cs
new file mode 100644
index 0000000..e05bc77
--- /dev/null
+++ b/SerialShell/JoyButton.Designer.cs
@@ -0,0 +1,36 @@
+namespace SerialShell
+{
+ partial class JoyButton
+ {
+ ///
+ /// 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 Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ }
+
+ #endregion
+ }
+}
diff --git a/SerialShell/JoyButton.cs b/SerialShell/JoyButton.cs
new file mode 100644
index 0000000..0c5edd7
--- /dev/null
+++ b/SerialShell/JoyButton.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SerialShell
+{
+ public partial class JoyButton : System.Windows.Forms.Button
+ {
+ public bool repeatcode { get; set; }
+ public bool pressed { get; set; }
+ public byte code;
+ public JoyButton()
+ {
+ InitializeComponent();
+ }
+
+ public JoyButton(IContainer container)
+ {
+ container.Add(this);
+
+ InitializeComponent();
+ }
+ }
+}
diff --git a/SerialShell/MainForm.Designer.cs b/SerialShell/MainForm.Designer.cs
index cc638c4..d4e29f5 100644
--- a/SerialShell/MainForm.Designer.cs
+++ b/SerialShell/MainForm.Designer.cs
@@ -44,22 +44,22 @@ private void InitializeComponent()
this.aboutbtn = new System.Windows.Forms.ToolStripButton();
this.mainpanel = new System.Windows.Forms.Panel();
this.OptionPanel = new System.Windows.Forms.Panel();
- this.leftanalogmidbtn = new System.Windows.Forms.Button();
- this.rightanalogmidbtn = new System.Windows.Forms.Button();
- this.selectbtn = new System.Windows.Forms.Button();
- this.startbtn = new System.Windows.Forms.Button();
- this.leftbtn2 = new System.Windows.Forms.Button();
- this.leftbtn1 = new System.Windows.Forms.Button();
- this.rightbtn2 = new System.Windows.Forms.Button();
- this.rightbtn1 = new System.Windows.Forms.Button();
- this.btn1 = new System.Windows.Forms.Button();
- this.btn3 = new System.Windows.Forms.Button();
- this.btn2 = new System.Windows.Forms.Button();
- this.btn4 = new System.Windows.Forms.Button();
- this.upbtn = new System.Windows.Forms.Button();
- this.downbtn = new System.Windows.Forms.Button();
- this.rightbtn = new System.Windows.Forms.Button();
- this.leftbtn = new System.Windows.Forms.Button();
+ this.leftanalogmidbtn = new SerialShell.JoyButton(this.components);
+ this.rightanalogmidbtn = new SerialShell.JoyButton(this.components);
+ this.selectbtn = new SerialShell.JoyButton(this.components);
+ this.startbtn = new SerialShell.JoyButton(this.components);
+ this.leftbtn2 = new SerialShell.JoyButton(this.components);
+ this.leftbtn1 = new SerialShell.JoyButton(this.components);
+ this.rightbtn2 = new SerialShell.JoyButton(this.components);
+ this.rightbtn1 = new SerialShell.JoyButton(this.components);
+ this.btn1 = new SerialShell.JoyButton(this.components);
+ this.btn3 = new SerialShell.JoyButton(this.components);
+ this.btn2 = new SerialShell.JoyButton(this.components);
+ this.btn4 = new SerialShell.JoyButton(this.components);
+ this.upbtn = new SerialShell.JoyButton(this.components);
+ this.downbtn = new SerialShell.JoyButton(this.components);
+ this.rightbtn = new SerialShell.JoyButton(this.components);
+ this.leftbtn = new SerialShell.JoyButton(this.components);
this.Text1 = new System.Windows.Forms.RichTextBox();
this.joystick_timer = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel();
@@ -235,6 +235,7 @@ private void InitializeComponent()
this.OptionPanel.Name = "OptionPanel";
this.OptionPanel.Size = new System.Drawing.Size(469, 449);
this.OptionPanel.TabIndex = 3;
+ this.OptionPanel.Visible = false;
//
// leftanalogmidbtn
//
@@ -245,6 +246,8 @@ private void InitializeComponent()
this.leftanalogmidbtn.Location = new System.Drawing.Point(8, 343);
this.leftanalogmidbtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.leftanalogmidbtn.Name = "leftanalogmidbtn";
+ this.leftanalogmidbtn.pressed = false;
+ this.leftanalogmidbtn.repeatcode = false;
this.leftanalogmidbtn.Size = new System.Drawing.Size(139, 28);
this.leftanalogmidbtn.TabIndex = 19;
this.leftanalogmidbtn.Tag = "LANALOGMID";
@@ -261,6 +264,8 @@ private void InitializeComponent()
this.rightanalogmidbtn.Location = new System.Drawing.Point(323, 343);
this.rightanalogmidbtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.rightanalogmidbtn.Name = "rightanalogmidbtn";
+ this.rightanalogmidbtn.pressed = false;
+ this.rightanalogmidbtn.repeatcode = false;
this.rightanalogmidbtn.Size = new System.Drawing.Size(139, 28);
this.rightanalogmidbtn.TabIndex = 18;
this.rightanalogmidbtn.Tag = "RALANALOGMID";
@@ -277,6 +282,8 @@ private void InitializeComponent()
this.selectbtn.Location = new System.Drawing.Point(159, 294);
this.selectbtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.selectbtn.Name = "selectbtn";
+ this.selectbtn.pressed = false;
+ this.selectbtn.repeatcode = false;
this.selectbtn.Size = new System.Drawing.Size(73, 28);
this.selectbtn.TabIndex = 17;
this.selectbtn.Tag = "SELECT";
@@ -293,6 +300,8 @@ private void InitializeComponent()
this.startbtn.Location = new System.Drawing.Point(240, 294);
this.startbtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.startbtn.Name = "startbtn";
+ this.startbtn.pressed = false;
+ this.startbtn.repeatcode = false;
this.startbtn.Size = new System.Drawing.Size(73, 28);
this.startbtn.TabIndex = 16;
this.startbtn.Tag = "START";
@@ -309,6 +318,8 @@ private void InitializeComponent()
this.leftbtn2.Location = new System.Drawing.Point(8, 23);
this.leftbtn2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.leftbtn2.Name = "leftbtn2";
+ this.leftbtn2.pressed = false;
+ this.leftbtn2.repeatcode = false;
this.leftbtn2.Size = new System.Drawing.Size(85, 36);
this.leftbtn2.TabIndex = 14;
this.leftbtn2.Tag = "LEFT2";
@@ -325,6 +336,8 @@ private void InitializeComponent()
this.leftbtn1.Location = new System.Drawing.Point(8, 66);
this.leftbtn1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.leftbtn1.Name = "leftbtn1";
+ this.leftbtn1.pressed = false;
+ this.leftbtn1.repeatcode = false;
this.leftbtn1.Size = new System.Drawing.Size(85, 36);
this.leftbtn1.TabIndex = 13;
this.leftbtn1.Tag = "LEFT1";
@@ -341,6 +354,8 @@ private void InitializeComponent()
this.rightbtn2.Location = new System.Drawing.Point(376, 23);
this.rightbtn2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.rightbtn2.Name = "rightbtn2";
+ this.rightbtn2.pressed = false;
+ this.rightbtn2.repeatcode = false;
this.rightbtn2.Size = new System.Drawing.Size(85, 36);
this.rightbtn2.TabIndex = 12;
this.rightbtn2.Tag = "RIGHT2";
@@ -357,6 +372,8 @@ private void InitializeComponent()
this.rightbtn1.Location = new System.Drawing.Point(376, 66);
this.rightbtn1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.rightbtn1.Name = "rightbtn1";
+ this.rightbtn1.pressed = false;
+ this.rightbtn1.repeatcode = false;
this.rightbtn1.Size = new System.Drawing.Size(85, 36);
this.rightbtn1.TabIndex = 11;
this.rightbtn1.Tag = "RIGHT1";
@@ -373,6 +390,8 @@ private void InitializeComponent()
this.btn1.Location = new System.Drawing.Point(336, 138);
this.btn1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn1.Name = "btn1";
+ this.btn1.pressed = false;
+ this.btn1.repeatcode = false;
this.btn1.Size = new System.Drawing.Size(57, 36);
this.btn1.TabIndex = 10;
this.btn1.Tag = "BUTTON1";
@@ -389,6 +408,8 @@ private void InitializeComponent()
this.btn3.Location = new System.Drawing.Point(336, 222);
this.btn3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn3.Name = "btn3";
+ this.btn3.pressed = false;
+ this.btn3.repeatcode = false;
this.btn3.Size = new System.Drawing.Size(57, 36);
this.btn3.TabIndex = 9;
this.btn3.Tag = "BUTTON3";
@@ -405,6 +426,8 @@ private void InitializeComponent()
this.btn2.Location = new System.Drawing.Point(404, 181);
this.btn2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn2.Name = "btn2";
+ this.btn2.pressed = false;
+ this.btn2.repeatcode = false;
this.btn2.Size = new System.Drawing.Size(57, 36);
this.btn2.TabIndex = 8;
this.btn2.Tag = "BUTTON2";
@@ -421,6 +444,8 @@ private void InitializeComponent()
this.btn4.Location = new System.Drawing.Point(271, 181);
this.btn4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn4.Name = "btn4";
+ this.btn4.pressed = false;
+ this.btn4.repeatcode = false;
this.btn4.Size = new System.Drawing.Size(57, 36);
this.btn4.TabIndex = 7;
this.btn4.Tag = "BUTTON4";
@@ -437,6 +462,8 @@ private void InitializeComponent()
this.upbtn.Location = new System.Drawing.Point(71, 138);
this.upbtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.upbtn.Name = "upbtn";
+ this.upbtn.pressed = false;
+ this.upbtn.repeatcode = false;
this.upbtn.Size = new System.Drawing.Size(57, 36);
this.upbtn.TabIndex = 6;
this.upbtn.Tag = "UP";
@@ -453,6 +480,8 @@ private void InitializeComponent()
this.downbtn.Location = new System.Drawing.Point(71, 222);
this.downbtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.downbtn.Name = "downbtn";
+ this.downbtn.pressed = false;
+ this.downbtn.repeatcode = false;
this.downbtn.Size = new System.Drawing.Size(57, 36);
this.downbtn.TabIndex = 2;
this.downbtn.Tag = "DOWN";
@@ -469,6 +498,8 @@ private void InitializeComponent()
this.rightbtn.Location = new System.Drawing.Point(136, 181);
this.rightbtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.rightbtn.Name = "rightbtn";
+ this.rightbtn.pressed = false;
+ this.rightbtn.repeatcode = false;
this.rightbtn.Size = new System.Drawing.Size(57, 36);
this.rightbtn.TabIndex = 1;
this.rightbtn.Tag = "RIGHT";
@@ -485,6 +516,8 @@ private void InitializeComponent()
this.leftbtn.Location = new System.Drawing.Point(5, 181);
this.leftbtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.leftbtn.Name = "leftbtn";
+ this.leftbtn.pressed = false;
+ this.leftbtn.repeatcode = false;
this.leftbtn.Size = new System.Drawing.Size(57, 36);
this.leftbtn.TabIndex = 0;
this.leftbtn.Tag = "LEFT";
@@ -530,7 +563,7 @@ private void InitializeComponent()
this.textBox1.Size = new System.Drawing.Size(908, 16);
this.textBox1.TabIndex = 5;
//
- // Form1
+ // MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -541,8 +574,8 @@ private void InitializeComponent()
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MinimumSize = new System.Drawing.Size(927, 457);
- this.Name = "Form1";
- this.Text = "SerialShell - Bluetooth communication V0.1.1";
+ this.Name = "MainForm";
+ this.Text = "SerialShell - Bluetooth communication V0.1.2";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
@@ -569,28 +602,28 @@ private void InitializeComponent()
private System.Windows.Forms.Panel mainpanel;
private System.Windows.Forms.Panel OptionPanel;
private System.Windows.Forms.RichTextBox Text1;
- private System.Windows.Forms.Button leftbtn;
- private System.Windows.Forms.Button upbtn;
- private System.Windows.Forms.Button downbtn;
- private System.Windows.Forms.Button rightbtn;
- private System.Windows.Forms.Button btn1;
- private System.Windows.Forms.Button btn3;
- private System.Windows.Forms.Button btn2;
- private System.Windows.Forms.Button btn4;
- private System.Windows.Forms.Button rightbtn2;
- private System.Windows.Forms.Button rightbtn1;
- private System.Windows.Forms.Button leftbtn2;
- private System.Windows.Forms.Button leftbtn1;
+ private JoyButton leftbtn;
+ private JoyButton upbtn;
+ private JoyButton downbtn;
+ private JoyButton rightbtn;
+ private JoyButton btn1;
+ private JoyButton btn3;
+ private JoyButton btn2;
+ private JoyButton btn4;
+ private JoyButton rightbtn2;
+ private JoyButton rightbtn1;
+ private JoyButton leftbtn2;
+ private JoyButton leftbtn1;
private System.Windows.Forms.Timer joystick_timer;
- private System.Windows.Forms.Button selectbtn;
- private System.Windows.Forms.Button startbtn;
+ private JoyButton selectbtn;
+ private JoyButton startbtn;
private System.Windows.Forms.ToolStripButton resetjoystick_button;
private System.Windows.Forms.ToolStripButton aboutbtn;
private System.Windows.Forms.ToolStripButton Settings;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox textBox1;
- private System.Windows.Forms.Button leftanalogmidbtn;
- private System.Windows.Forms.Button rightanalogmidbtn;
+ private JoyButton leftanalogmidbtn;
+ private JoyButton rightanalogmidbtn;
}
}
diff --git a/SerialShell/MainForm.cs b/SerialShell/MainForm.cs
index de10db7..1d95310 100644
--- a/SerialShell/MainForm.cs
+++ b/SerialShell/MainForm.cs
@@ -73,26 +73,51 @@ DeviceInstance di in
}
private void loadsettings()
{
- btn1.Tag = Properties.Settings.Default.Button1;
- btn2.Tag = Properties.Settings.Default.Button2;
- btn3.Tag = Properties.Settings.Default.Button3;
- btn4.Tag = Properties.Settings.Default.Button4;
+ //Tag
+ btn1.code = Properties.Settings.Default.Button1;
+ btn2.code = Properties.Settings.Default.Button2;
+ btn3.code = Properties.Settings.Default.Button3;
+ btn4.code = Properties.Settings.Default.Button4;
//l1,,l2,r1,r2
- leftbtn1.Tag = Properties.Settings.Default.Left1;
- rightbtn1.Tag = Properties.Settings.Default.Right1;
- leftbtn2.Tag = Properties.Settings.Default.Left2;
- rightbtn2.Tag = Properties.Settings.Default.Right2;
+ leftbtn1.code = Properties.Settings.Default.Left1;
+ rightbtn1.code = Properties.Settings.Default.Right1;
+ leftbtn2.code = Properties.Settings.Default.Left2;
+ rightbtn2.code = Properties.Settings.Default.Right2;
//select,start
- selectbtn.Tag = Properties.Settings.Default.Select;
- startbtn.Tag = Properties.Settings.Default.Start;
+ selectbtn.code = Properties.Settings.Default.Select;
+ startbtn.code = Properties.Settings.Default.Start;
//up,down,left,right
- leftbtn.Tag = Properties.Settings.Default.Left;
- rightbtn.Tag = Properties.Settings.Default.Right;
- upbtn.Tag = Properties.Settings.Default.Up;
- downbtn.Tag = Properties.Settings.Default.Down;
+ leftbtn.code = Properties.Settings.Default.Left;
+ rightbtn.code = Properties.Settings.Default.Right;
+ upbtn.code = Properties.Settings.Default.Up;
+ downbtn.code = Properties.Settings.Default.Down;
//analogmid
- leftanalogmidbtn.Tag = Properties.Settings.Default.LeftAnalogMid;
- rightanalogmidbtn.Tag = Properties.Settings.Default.RightAnalogMid;
+ leftanalogmidbtn.code = Properties.Settings.Default.LeftAnalogMid;
+ rightanalogmidbtn.code = Properties.Settings.Default.RightAnalogMid;
+
+
+ //repeatcode
+
+ btn1.repeatcode = Properties.Settings.Default.Button1Repeat;
+ btn2.repeatcode = Properties.Settings.Default.Button2Repeat;
+ btn3.repeatcode = Properties.Settings.Default.Button3Repeat;
+ btn4.repeatcode = Properties.Settings.Default.Button4Repeat;
+ //l1,,l2,r1,r2
+ leftbtn1.repeatcode = Properties.Settings.Default.Left1Repeat;
+ rightbtn1.repeatcode = Properties.Settings.Default.Right1Repeat;
+ leftbtn2.repeatcode = Properties.Settings.Default.Left2Repeat;
+ rightbtn2.repeatcode = Properties.Settings.Default.Right2Repeat;
+ //select,start
+ selectbtn.repeatcode = Properties.Settings.Default.SelectRepeat;
+ startbtn.repeatcode = Properties.Settings.Default.StartRepeat;
+ //up,down,left,right
+ leftbtn.repeatcode = Properties.Settings.Default.LeftRepeat;
+ rightbtn.repeatcode = Properties.Settings.Default.RightRepeat;
+ upbtn.repeatcode = Properties.Settings.Default.UpRepeat;
+ downbtn.repeatcode = Properties.Settings.Default.DownRepeat;
+ //analogmid
+ leftanalogmidbtn.repeatcode = Properties.Settings.Default.LeftAnalogMidRepeat;
+ rightanalogmidbtn.repeatcode = Properties.Settings.Default.RightAnalogMidRepeat;
}
public MainForm()
{
@@ -110,17 +135,48 @@ private void Text1Append(string msg)
Text1.AppendText(Environment.NewLine + msg + Environment.NewLine);
Text1.ScrollToCaret();
}
+ private void writetoserialport(byte b)
+ {
+ if (sp.IsOpen)
+ {
+ sp.Write(new byte[] { b },0,1);
+ if (Properties.Settings.Default.SendEndOfLineChar)
+ sp.WriteLine("");
+ Text1Append("###Sending byte:" + b);
+ }
+ else Text1Append("###Error sending byte:" + b);
+ }
private void writetoserialport(string msg)
{
if (sp.IsOpen)
{
if (Properties.Settings.Default.SendEndOfLineChar)
- sp.WriteLine(msg);
+ sp.WriteLine(msg);
else sp.Write(msg);
Text1Append("###Sending data:" + msg);
}
- else Text1Append("###Error sending data:" + msg);
-
+ else Text1Append("###Error sending data:" + msg);
+ }
+ private void joystickbtnpress(object sender, bool enabled)
+ {
+ if (enabled)
+ {
+ if ((sender as JoyButton).repeatcode)
+ {
+ (sender as JoyButton).pressed = true;
+ writetoserialport((sender as JoyButton).code);
+ }
+ else if ((sender as JoyButton).pressed == false)
+ {
+ (sender as JoyButton).pressed = true;
+ writetoserialport((sender as JoyButton).code);
+ }
+ }
+ else if ((sender as JoyButton).pressed)
+ {
+ (sender as JoyButton).pressed = false;
+ writetoserialport((byte)((sender as JoyButton).code + 128));
+ }
}
private void UpdateJoystick()
{
@@ -138,13 +194,6 @@ private void UpdateJoystick()
//Capture Buttons.
byte[] buttons = joystickstate.GetButtons();
- //for (int i = 0; i < buttons.Length; i++)
- //{
- // if (buttons[i] != 0)
- // {
- // MessageBox.Show("Button:" + i + " ");
- // }
- // }
if (buttons.Count() < 10)
{
@@ -152,44 +201,32 @@ private void UpdateJoystick()
return;
}
//btn 0..3
- if (buttons[0] != 0)
- btn1.PerformClick();
- if (buttons[1] != 0)
- btn2.PerformClick();
- if (buttons[2] != 0)
- btn3.PerformClick();
- if (buttons[3] != 0)
- btn4.PerformClick();
+ joystickbtnpress(btn1, (buttons[0] != 0));
+ joystickbtnpress(btn2, (buttons[1] != 0));
+ joystickbtnpress(btn3, (buttons[2] != 0));
+ joystickbtnpress(btn4, (buttons[3] != 0));
+
//l1,,l2,r1,r2
- if (buttons[4] != 0)
- leftbtn1.PerformClick();
- if (buttons[5] != 0)
- rightbtn1.PerformClick();
- if (buttons[6] != 0)
- leftbtn2.PerformClick();
- if (buttons[7] != 0)
- rightbtn2.PerformClick();
+ joystickbtnpress(leftbtn1, (buttons[4] != 0));
+ joystickbtnpress(rightbtn1, (buttons[5] != 0));
+ joystickbtnpress(leftbtn2, (buttons[6] != 0));
+ joystickbtnpress(rightbtn2, (buttons[7] != 0));
+
//select,start
- if (buttons[8] != 0)
- selectbtn.PerformClick();
- if (buttons[9] != 0)
- startbtn.PerformClick();
+ joystickbtnpress(selectbtn, (buttons[8] != 0));
+ joystickbtnpress(startbtn, (buttons[9] != 0));
+
if (buttons.Count() >= 12)
{
- if (buttons[10] != 0)
- leftanalogmidbtn.PerformClick();
- if (buttons[11] != 0)
- rightanalogmidbtn.PerformClick();
+ joystickbtnpress(leftanalogmidbtn, (buttons[10] != 0));
+ joystickbtnpress(rightanalogmidbtn, (buttons[11] != 0));
}
//up,down,left,right
- if (joystickstate.X == jslow)
- leftbtn.PerformClick();
- if (joystickstate.X == jshigh)
- rightbtn.PerformClick();
- if (joystickstate.Y == jslow)
- upbtn.PerformClick();
- if (joystickstate.Y == jshigh)
- downbtn.PerformClick();
+ joystickbtnpress(leftbtn, (joystickstate.X == jslow));
+ joystickbtnpress(rightbtn, (joystickstate.X == jshigh));
+ joystickbtnpress(upbtn, (joystickstate.Y == jslow));
+ joystickbtnpress(downbtn, (joystickstate.Y == jshigh));
+
}
//---------------------------------------------------------------------
private void Refresh_Click(object sender, EventArgs e)
@@ -203,7 +240,7 @@ private void serialportdatareceived(object sender,SerialDataReceivedEventArgs e)
MethodInvoker mi;
mi = delegate()
{
- Text1.AppendText(sp.ReadExisting());
+ Text1.AppendText(sp.ReadByte().ToString()+"\n");
Text1.ScrollToCaret();
};
@@ -281,7 +318,7 @@ private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
private void CMD_btn_Click(object sender, EventArgs e)
{
- writetoserialport((sender as System.Windows.Forms.Button).Tag.ToString());
+ writetoserialport((sender as JoyButton).code);
}
private void clear_Click(object sender, EventArgs e)
@@ -291,7 +328,7 @@ private void clear_Click(object sender, EventArgs e)
private void joystickTimer_Tick(object sender, EventArgs e)
{
- if (sp.IsOpen)
+ //if (sp.IsOpen)
UpdateJoystick();
}
@@ -303,9 +340,9 @@ private void resetjoystick_button_Click(object sender, EventArgs e)
private void aboutbtn_Click(object sender, EventArgs e)
{
- MessageBox.Show(" --- SerialShell - Bluetooth communication V0.1.1 ---\n\n" +
+ MessageBox.Show(" --- SerialShell - Bluetooth communication V0.1.1 ---\n\n" +
" Developed by: \n" +
- " BOURAOUI AL-Moez L.A\n"+
+ " BOURAOUI AL-Moez L.A\n" +
" (bouraoui.almoez.la@gmail.com)\n\n" +
" License: GPL - 2.0\n\n\n"
, "SerialShell - Bluetooth communication V0.1.1");
@@ -314,7 +351,7 @@ private void aboutbtn_Click(object sender, EventArgs e)
private void Settings_Click(object sender, EventArgs e)
{
- if ((new settingsForm()).ShowDialog(this) == DialogResult.OK)
+ if ((new SettingsForm()).ShowDialog(this) == DialogResult.OK)
Properties.Settings.Default.Save();
else Properties.Settings.Default.Reload();
diff --git a/SerialShell/Properties/AssemblyInfo.cs b/SerialShell/Properties/AssemblyInfo.cs
index 8516d35..3126677 100644
--- a/SerialShell/Properties/AssemblyInfo.cs
+++ b/SerialShell/Properties/AssemblyInfo.cs
@@ -6,10 +6,11 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("SerialShell - Bluetooth Communication")]
+[assembly: AssemblyTitle("SerialPort-Bluetooth Joy Communication")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyProduct("SerialShell - Bluetooth Communication")]
+[assembly: AssemblyCompany("AMDreamSoft")]
+[assembly: AssemblyProduct("SerialPort-Bluetooth Communication Joy Version")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -32,6 +33,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.1.1.0")]
-[assembly: AssemblyFileVersion("0.0.1.0")]
+[assembly: AssemblyVersion("0.1.0.1")]
+[assembly: AssemblyFileVersion("0.0.1.1")]
[assembly: NeutralResourcesLanguageAttribute("en")]
diff --git a/SerialShell/Properties/Resources.Designer.cs b/SerialShell/Properties/Resources.Designer.cs
index 0ec208d..9b4890d 100644
--- a/SerialShell/Properties/Resources.Designer.cs
+++ b/SerialShell/Properties/Resources.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -19,7 +19,7 @@ namespace SerialShell.Properties {
// 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", "15.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -39,7 +39,7 @@ internal Resources() {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SerialShell.Properties.Resources", typeof(Resources).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SerialPortBluetooth.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/SerialShell/Properties/Settings.Designer.cs b/SerialShell/Properties/Settings.Designer.cs
index a75e9bb..3f2cbce 100644
--- a/SerialShell/Properties/Settings.Designer.cs
+++ b/SerialShell/Properties/Settings.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,7 +12,7 @@ namespace SerialShell.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -25,10 +25,10 @@ public static Settings Default {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("BUTTON1")]
- public string Button1 {
+ [global::System.Configuration.DefaultSettingValueAttribute("1")]
+ public byte Button1 {
get {
- return ((string)(this["Button1"]));
+ return ((byte)(this["Button1"]));
}
set {
this["Button1"] = value;
@@ -37,10 +37,10 @@ public string Button1 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("BUTTON2")]
- public string Button2 {
+ [global::System.Configuration.DefaultSettingValueAttribute("2")]
+ public byte Button2 {
get {
- return ((string)(this["Button2"]));
+ return ((byte)(this["Button2"]));
}
set {
this["Button2"] = value;
@@ -49,10 +49,10 @@ public string Button2 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("BUTTON3")]
- public string Button3 {
+ [global::System.Configuration.DefaultSettingValueAttribute("3")]
+ public byte Button3 {
get {
- return ((string)(this["Button3"]));
+ return ((byte)(this["Button3"]));
}
set {
this["Button3"] = value;
@@ -61,10 +61,10 @@ public string Button3 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("BUTTON4")]
- public string Button4 {
+ [global::System.Configuration.DefaultSettingValueAttribute("4")]
+ public byte Button4 {
get {
- return ((string)(this["Button4"]));
+ return ((byte)(this["Button4"]));
}
set {
this["Button4"] = value;
@@ -73,10 +73,10 @@ public string Button4 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("LEFT1")]
- public string Left1 {
+ [global::System.Configuration.DefaultSettingValueAttribute("5")]
+ public byte Left1 {
get {
- return ((string)(this["Left1"]));
+ return ((byte)(this["Left1"]));
}
set {
this["Left1"] = value;
@@ -85,10 +85,10 @@ public string Left1 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("RIGHT1")]
- public string Right1 {
+ [global::System.Configuration.DefaultSettingValueAttribute("6")]
+ public byte Right1 {
get {
- return ((string)(this["Right1"]));
+ return ((byte)(this["Right1"]));
}
set {
this["Right1"] = value;
@@ -97,10 +97,10 @@ public string Right1 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("LEFT2")]
- public string Left2 {
+ [global::System.Configuration.DefaultSettingValueAttribute("7")]
+ public byte Left2 {
get {
- return ((string)(this["Left2"]));
+ return ((byte)(this["Left2"]));
}
set {
this["Left2"] = value;
@@ -109,10 +109,10 @@ public string Left2 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("RIGHT2")]
- public string Right2 {
+ [global::System.Configuration.DefaultSettingValueAttribute("8")]
+ public byte Right2 {
get {
- return ((string)(this["Right2"]));
+ return ((byte)(this["Right2"]));
}
set {
this["Right2"] = value;
@@ -121,10 +121,10 @@ public string Right2 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("SELECT")]
- public string Select {
+ [global::System.Configuration.DefaultSettingValueAttribute("9")]
+ public byte Select {
get {
- return ((string)(this["Select"]));
+ return ((byte)(this["Select"]));
}
set {
this["Select"] = value;
@@ -133,10 +133,10 @@ public string Select {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("START")]
- public string Start {
+ [global::System.Configuration.DefaultSettingValueAttribute("10")]
+ public byte Start {
get {
- return ((string)(this["Start"]));
+ return ((byte)(this["Start"]));
}
set {
this["Start"] = value;
@@ -145,10 +145,10 @@ public string Start {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("UP")]
- public string Up {
+ [global::System.Configuration.DefaultSettingValueAttribute("11")]
+ public byte Up {
get {
- return ((string)(this["Up"]));
+ return ((byte)(this["Up"]));
}
set {
this["Up"] = value;
@@ -157,10 +157,10 @@ public string Up {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("DOWN")]
- public string Down {
+ [global::System.Configuration.DefaultSettingValueAttribute("12")]
+ public byte Down {
get {
- return ((string)(this["Down"]));
+ return ((byte)(this["Down"]));
}
set {
this["Down"] = value;
@@ -169,10 +169,10 @@ public string Down {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("LEFT")]
- public string Left {
+ [global::System.Configuration.DefaultSettingValueAttribute("13")]
+ public byte Left {
get {
- return ((string)(this["Left"]));
+ return ((byte)(this["Left"]));
}
set {
this["Left"] = value;
@@ -181,10 +181,10 @@ public string Left {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("RIGHT")]
- public string Right {
+ [global::System.Configuration.DefaultSettingValueAttribute("14")]
+ public byte Right {
get {
- return ((string)(this["Right"]));
+ return ((byte)(this["Right"]));
}
set {
this["Right"] = value;
@@ -193,10 +193,10 @@ public string Right {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("LEFTANALOGMID")]
- public string LeftAnalogMid {
+ [global::System.Configuration.DefaultSettingValueAttribute("15")]
+ public byte LeftAnalogMid {
get {
- return ((string)(this["LeftAnalogMid"]));
+ return ((byte)(this["LeftAnalogMid"]));
}
set {
this["LeftAnalogMid"] = value;
@@ -205,10 +205,10 @@ public string LeftAnalogMid {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("RIGHTANALOGMID")]
- public string RightAnalogMid {
+ [global::System.Configuration.DefaultSettingValueAttribute("16")]
+ public byte RightAnalogMid {
get {
- return ((string)(this["RightAnalogMid"]));
+ return ((byte)(this["RightAnalogMid"]));
}
set {
this["RightAnalogMid"] = value;
@@ -226,5 +226,197 @@ public bool SendEndOfLineChar {
this["SendEndOfLineChar"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool Button1Repeat {
+ get {
+ return ((bool)(this["Button1Repeat"]));
+ }
+ set {
+ this["Button1Repeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool Button2Repeat {
+ get {
+ return ((bool)(this["Button2Repeat"]));
+ }
+ set {
+ this["Button2Repeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool Button3Repeat {
+ get {
+ return ((bool)(this["Button3Repeat"]));
+ }
+ set {
+ this["Button3Repeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool Button4Repeat {
+ get {
+ return ((bool)(this["Button4Repeat"]));
+ }
+ set {
+ this["Button4Repeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool Left1Repeat {
+ get {
+ return ((bool)(this["Left1Repeat"]));
+ }
+ set {
+ this["Left1Repeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool Right1Repeat {
+ get {
+ return ((bool)(this["Right1Repeat"]));
+ }
+ set {
+ this["Right1Repeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool Left2Repeat {
+ get {
+ return ((bool)(this["Left2Repeat"]));
+ }
+ set {
+ this["Left2Repeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool Right2Repeat {
+ get {
+ return ((bool)(this["Right2Repeat"]));
+ }
+ set {
+ this["Right2Repeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool SelectRepeat {
+ get {
+ return ((bool)(this["SelectRepeat"]));
+ }
+ set {
+ this["SelectRepeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool StartRepeat {
+ get {
+ return ((bool)(this["StartRepeat"]));
+ }
+ set {
+ this["StartRepeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool UpRepeat {
+ get {
+ return ((bool)(this["UpRepeat"]));
+ }
+ set {
+ this["UpRepeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool DownRepeat {
+ get {
+ return ((bool)(this["DownRepeat"]));
+ }
+ set {
+ this["DownRepeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool LeftRepeat {
+ get {
+ return ((bool)(this["LeftRepeat"]));
+ }
+ set {
+ this["LeftRepeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool RightRepeat {
+ get {
+ return ((bool)(this["RightRepeat"]));
+ }
+ set {
+ this["RightRepeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool LeftAnalogMidRepeat {
+ get {
+ return ((bool)(this["LeftAnalogMidRepeat"]));
+ }
+ set {
+ this["LeftAnalogMidRepeat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool RightAnalogMidRepeat {
+ get {
+ return ((bool)(this["RightAnalogMidRepeat"]));
+ }
+ set {
+ this["RightAnalogMidRepeat"] = value;
+ }
+ }
}
}
diff --git a/SerialShell/Properties/Settings.settings b/SerialShell/Properties/Settings.settings
index 77f83d8..a3073bb 100644
--- a/SerialShell/Properties/Settings.settings
+++ b/SerialShell/Properties/Settings.settings
@@ -1,57 +1,105 @@
-
+
-
- BUTTON1
+
+ 1
-
- BUTTON2
+
+ 2
-
- BUTTON3
+
+ 3
-
- BUTTON4
+
+ 4
-
- LEFT1
+
+ 5
-
- RIGHT1
+
+ 6
-
- LEFT2
+
+ 7
-
- RIGHT2
+
+ 8
-
- SELECT
+
+ 9
-
- START
+
+ 10
-
- UP
+
+ 11
-
- DOWN
+
+ 12
-
- LEFT
+
+ 13
-
- RIGHT
+
+ 14
-
- LEFTANALOGMID
+
+ 15
-
- RIGHTANALOGMID
+
+ 16
False
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
\ No newline at end of file
diff --git a/SerialShell/SerialShell.csproj b/SerialShell/SerialShell.csproj
index 2c95c34..07aa3be 100644
--- a/SerialShell/SerialShell.csproj
+++ b/SerialShell/SerialShell.csproj
@@ -67,25 +67,31 @@
+
+ Component
+
+
+ JoyButton.cs
+
Form
MainForm.cs
-
+
Form
-
- settingsForm.cs
+
+ SettingsForm.cs
MainForm.cs
-
- settingsForm.cs
+
+ SettingsForm.cs
ResXFileCodeGenerator
diff --git a/SerialShell/settingsForm.Designer.cs b/SerialShell/settingsForm.Designer.cs
index 8dc3eda..7f8e45d 100644
--- a/SerialShell/settingsForm.Designer.cs
+++ b/SerialShell/settingsForm.Designer.cs
@@ -1,6 +1,6 @@
namespace SerialShell
{
- partial class settingsForm
+ partial class SettingsForm
{
///
/// Required designer variable.
@@ -38,7 +38,7 @@ private void InitializeComponent()
//
this.Acceptbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Acceptbtn.DialogResult = System.Windows.Forms.DialogResult.OK;
- this.Acceptbtn.Location = new System.Drawing.Point(216, 276);
+ this.Acceptbtn.Location = new System.Drawing.Point(226, 488);
this.Acceptbtn.Name = "Acceptbtn";
this.Acceptbtn.Size = new System.Drawing.Size(75, 23);
this.Acceptbtn.TabIndex = 0;
@@ -49,7 +49,7 @@ private void InitializeComponent()
//
this.Cancelbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Cancelbtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.Cancelbtn.Location = new System.Drawing.Point(297, 276);
+ this.Cancelbtn.Location = new System.Drawing.Point(307, 488);
this.Cancelbtn.Name = "Cancelbtn";
this.Cancelbtn.Size = new System.Drawing.Size(75, 23);
this.Cancelbtn.TabIndex = 1;
@@ -65,14 +65,15 @@ private void InitializeComponent()
this.propertyGrid1.Location = new System.Drawing.Point(12, 12);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.PropertySort = System.Windows.Forms.PropertySort.NoSort;
- this.propertyGrid1.Size = new System.Drawing.Size(360, 258);
+ this.propertyGrid1.Size = new System.Drawing.Size(370, 470);
this.propertyGrid1.TabIndex = 2;
this.propertyGrid1.ToolbarVisible = false;
//
// defaultbtn
//
+ this.defaultbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.defaultbtn.DialogResult = System.Windows.Forms.DialogResult.OK;
- this.defaultbtn.Location = new System.Drawing.Point(12, 276);
+ this.defaultbtn.Location = new System.Drawing.Point(12, 488);
this.defaultbtn.Name = "defaultbtn";
this.defaultbtn.Size = new System.Drawing.Size(75, 23);
this.defaultbtn.TabIndex = 3;
@@ -86,7 +87,7 @@ private void InitializeComponent()
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancelbtn;
- this.ClientSize = new System.Drawing.Size(384, 311);
+ this.ClientSize = new System.Drawing.Size(394, 523);
this.Controls.Add(this.defaultbtn);
this.Controls.Add(this.propertyGrid1);
this.Controls.Add(this.Cancelbtn);
diff --git a/SerialShell/settingsForm.cs b/SerialShell/settingsForm.cs
index 9be69f8..3c90b27 100644
--- a/SerialShell/settingsForm.cs
+++ b/SerialShell/settingsForm.cs
@@ -11,9 +11,9 @@
namespace SerialShell
{
- public partial class settingsForm : Form
+ public partial class SettingsForm : Form
{
- public settingsForm()
+ public SettingsForm()
{
InitializeComponent();
}