diff options
Diffstat (limited to 'Native')
-rw-r--r-- | Native/EmuKeyboardDesigner/EmuKeyboardDesigner.csproj | 9 | ||||
-rw-r--r-- | Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo | bin | 50176 -> 51712 bytes | |||
-rw-r--r-- | Native/EmuKeyboardDesigner/MainForm.Designer.cs | 47 | ||||
-rw-r--r-- | Native/EmuKeyboardDesigner/MainForm.cs | 87 | ||||
-rw-r--r-- | Native/EmuKeyboardDesigner/OpsForm.Designer.cs | 336 | ||||
-rw-r--r-- | Native/EmuKeyboardDesigner/OpsForm.cs | 29 | ||||
-rw-r--r-- | Native/EmuKeyboardDesigner/OpsForm.resx | 120 |
7 files changed, 619 insertions, 9 deletions
diff --git a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.csproj b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.csproj index 28f34ff..85efffa 100644 --- a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.csproj +++ b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.csproj @@ -58,6 +58,12 @@ <Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
+ <Compile Include="OpsForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="OpsForm.Designer.cs">
+ <DependentUpon>OpsForm.cs</DependentUpon>
+ </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="ImageControl.resx">
@@ -66,6 +72,9 @@ <EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="OpsForm.resx">
+ <DependentUpon>OpsForm.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
diff --git a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo Binary files differindex 3805178..c832963 100644 --- a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo +++ b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo diff --git a/Native/EmuKeyboardDesigner/MainForm.Designer.cs b/Native/EmuKeyboardDesigner/MainForm.Designer.cs index 44e2b6a..9fae56b 100644 --- a/Native/EmuKeyboardDesigner/MainForm.Designer.cs +++ b/Native/EmuKeyboardDesigner/MainForm.Designer.cs @@ -54,6 +54,9 @@ namespace EmuKeyboardDesigner this.saveButton = new System.Windows.Forms.Button();
this.setButton = new System.Windows.Forms.Button();
this.removeButton = new System.Windows.Forms.Button();
+ this.moveDownButton = new System.Windows.Forms.Button();
+ this.moveUpButton = new System.Windows.Forms.Button();
+ this.opsButton = new System.Windows.Forms.Button();
this.imageControl = new EmuKeyboardDesigner.ImageControl();
this.SuspendLayout();
//
@@ -64,7 +67,7 @@ namespace EmuKeyboardDesigner this.keyList.FormattingEnabled = true;
this.keyList.Location = new System.Drawing.Point(500, 27);
this.keyList.Name = "keyList";
- this.keyList.Size = new System.Drawing.Size(192, 394);
+ this.keyList.Size = new System.Drawing.Size(192, 368);
this.keyList.TabIndex = 0;
this.keyList.SelectedIndexChanged += new System.EventHandler(this.OnKeySelected);
//
@@ -82,7 +85,7 @@ namespace EmuKeyboardDesigner // stickyCheckBox
//
this.stickyCheckBox.AutoSize = true;
- this.stickyCheckBox.Location = new System.Drawing.Point(241, 11);
+ this.stickyCheckBox.Location = new System.Drawing.Point(208, 11);
this.stickyCheckBox.Name = "stickyCheckBox";
this.stickyCheckBox.Size = new System.Drawing.Size(55, 17);
this.stickyCheckBox.TabIndex = 2;
@@ -102,7 +105,7 @@ namespace EmuKeyboardDesigner //
this.keysymTextBox.Location = new System.Drawing.Point(83, 9);
this.keysymTextBox.Name = "keysymTextBox";
- this.keysymTextBox.Size = new System.Drawing.Size(152, 20);
+ this.keysymTextBox.Size = new System.Drawing.Size(119, 20);
this.keysymTextBox.TabIndex = 4;
//
// loadButton
@@ -147,6 +150,38 @@ namespace EmuKeyboardDesigner this.removeButton.UseVisualStyleBackColor = true;
this.removeButton.Click += new System.EventHandler(this.OnRemoveKey);
//
+ // moveDownButton
+ //
+ this.moveDownButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.moveDownButton.Location = new System.Drawing.Point(605, 401);
+ this.moveDownButton.Name = "moveDownButton";
+ this.moveDownButton.Size = new System.Drawing.Size(75, 23);
+ this.moveDownButton.TabIndex = 11;
+ this.moveDownButton.Text = "MoveDown";
+ this.moveDownButton.UseVisualStyleBackColor = true;
+ this.moveDownButton.Click += new System.EventHandler(this.OnMoveDown);
+ //
+ // moveUpButton
+ //
+ this.moveUpButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.moveUpButton.Location = new System.Drawing.Point(501, 401);
+ this.moveUpButton.Name = "moveUpButton";
+ this.moveUpButton.Size = new System.Drawing.Size(75, 23);
+ this.moveUpButton.TabIndex = 10;
+ this.moveUpButton.Text = "Move Up";
+ this.moveUpButton.UseVisualStyleBackColor = true;
+ this.moveUpButton.Click += new System.EventHandler(this.OnMoveUp);
+ //
+ // opsButton
+ //
+ this.opsButton.Location = new System.Drawing.Point(269, 9);
+ this.opsButton.Name = "opsButton";
+ this.opsButton.Size = new System.Drawing.Size(47, 23);
+ this.opsButton.TabIndex = 12;
+ this.opsButton.Text = "Ops";
+ this.opsButton.UseVisualStyleBackColor = true;
+ this.opsButton.Click += new System.EventHandler(this.OnOps);
+ //
// imageControl
//
this.imageControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -168,6 +203,9 @@ namespace EmuKeyboardDesigner this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(692, 470);
+ this.Controls.Add(this.opsButton);
+ this.Controls.Add(this.moveDownButton);
+ this.Controls.Add(this.moveUpButton);
this.Controls.Add(this.removeButton);
this.Controls.Add(this.setButton);
this.Controls.Add(this.saveButton);
@@ -198,6 +236,9 @@ namespace EmuKeyboardDesigner private System.Windows.Forms.Button saveButton;
private System.Windows.Forms.Button setButton;
private System.Windows.Forms.Button removeButton;
+ private System.Windows.Forms.Button moveDownButton;
+ private System.Windows.Forms.Button moveUpButton;
+ private System.Windows.Forms.Button opsButton;
}
}
diff --git a/Native/EmuKeyboardDesigner/MainForm.cs b/Native/EmuKeyboardDesigner/MainForm.cs index 33ebd22..d0d0b6c 100644 --- a/Native/EmuKeyboardDesigner/MainForm.cs +++ b/Native/EmuKeyboardDesigner/MainForm.cs @@ -36,6 +36,8 @@ namespace EmuKeyboardDesigner InitializeComponent();
}
+ private bool RunningOps {get; set;}
+
private void SetKey(bool select, bool allowNew)
{
string sym = keysymTextBox.Text;
@@ -82,6 +84,28 @@ namespace EmuKeyboardDesigner SetKey(true, true);
}
+ private void OnMoveUp(object sender, EventArgs e)
+ {
+ if (keyList.SelectedIndex > 0)
+ {
+ object o = keyList.Items[keyList.SelectedIndex-1];
+ keyList.Items[keyList.SelectedIndex - 1] = keyList.Items[keyList.SelectedIndex];
+ keyList.Items[keyList.SelectedIndex] = o;
+ keyList.SelectedIndex--;
+ }
+ }
+
+ private void OnMoveDown(object sender, EventArgs e)
+ {
+ if (keyList.SelectedIndex > -1 && keyList.SelectedIndex < keyList.Items.Count - 1)
+ {
+ object o = keyList.Items[keyList.SelectedIndex];
+ keyList.Items[keyList.SelectedIndex] = keyList.Items[keyList.SelectedIndex + 1];
+ keyList.Items[keyList.SelectedIndex+1] = o;
+ keyList.SelectedIndex++;
+ }
+ }
+
private void OnLoad(object sender, EventArgs e)
{
OpenFileDialog fsel = new OpenFileDialog();
@@ -150,14 +174,10 @@ namespace EmuKeyboardDesigner }
}
- private void OnKeySelected(object sender, EventArgs e)
+ private void LoadKey(KeyboardKey key)
{
- if (keyList.SelectedIndex > -1)
+ if (key != null)
{
- SetKey(false, false);
-
- KeyboardKey key = (KeyboardKey)keyList.SelectedItem;
-
keysymTextBox.Text = key.KeySymbol;
imageControl.KeyX = key.X;
imageControl.KeyY = key.Y;
@@ -167,6 +187,19 @@ namespace EmuKeyboardDesigner }
}
+ private void OnKeySelected(object sender, EventArgs e)
+ {
+ if (keyList.SelectedIndex > -1)
+ {
+ if (!RunningOps)
+ {
+ SetKey(false, false);
+ }
+
+ LoadKey((KeyboardKey)keyList.SelectedItem);
+ }
+ }
+
private void OnRemoveKey(object sender, EventArgs e)
{
if (keyList.SelectedIndex > -1)
@@ -186,5 +219,47 @@ namespace EmuKeyboardDesigner }
}
}
+
+ private void OnOps(object sender, EventArgs e)
+ {
+ OpsForm f = new OpsForm();
+
+ if (f.ShowDialog() == DialogResult.OK)
+ {
+ RunningOps = true;
+
+ SetKey(false, false);
+
+ int index = keyList.SelectedIndex;
+
+ List<KeyboardKey> l = new List<KeyboardKey>();
+
+ foreach (KeyboardKey k in keyList.Items)
+ {
+ // I know -- these blocks are *real* lazy
+ //
+ try {if (f.RemoveFront > 0) k.KeySymbol = k.KeySymbol.Remove(0, f.RemoveFront);} catch {}
+ try {if (f.RemoveRear > 0) k.KeySymbol = k.KeySymbol.Remove(k.KeySymbol.Length - f.RemoveRear);} catch {}
+
+ k.KeySymbol = f.Prefix + k.KeySymbol;
+ k.KeySymbol = k.KeySymbol + f.Suffix;
+
+ k.X = Math.Max(0, k.X + f.AdjustX);
+ k.Y = Math.Max(0, k.Y + f.AdjustY);
+ k.Width = Math.Max(0, k.Width + f.AdjustWidth);
+ k.Height = Math.Max(0, k.Height + f.AdjustHeight);
+
+ l.Add(k);
+ }
+
+ keyList.BeginUpdate();
+ keyList.Items.Clear();
+ keyList.Items.AddRange(l.ToArray());
+ keyList.EndUpdate();
+
+ keyList.SelectedIndex = index;
+ RunningOps = false;
+ }
+ }
}
}
diff --git a/Native/EmuKeyboardDesigner/OpsForm.Designer.cs b/Native/EmuKeyboardDesigner/OpsForm.Designer.cs new file mode 100644 index 0000000..5c82934 --- /dev/null +++ b/Native/EmuKeyboardDesigner/OpsForm.Designer.cs @@ -0,0 +1,336 @@ +namespace EmuKeyboardDesigner
+{
+ partial class OpsForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.rmFrontUpDown = new System.Windows.Forms.NumericUpDown();
+ this.rmRearUpDown = new System.Windows.Forms.NumericUpDown();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.prefixTextBox = new System.Windows.Forms.TextBox();
+ this.suffixTextBox = new System.Windows.Forms.TextBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.cancelButton = new System.Windows.Forms.Button();
+ this.okButton = new System.Windows.Forms.Button();
+ this.adjYUpDown = new System.Windows.Forms.NumericUpDown();
+ this.label5 = new System.Windows.Forms.Label();
+ this.adjXUpDown = new System.Windows.Forms.NumericUpDown();
+ this.label6 = new System.Windows.Forms.Label();
+ this.adjHeightUpDown = new System.Windows.Forms.NumericUpDown();
+ this.label7 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.adjWidthUpDown = new System.Windows.Forms.NumericUpDown();
+ this.groupBox1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.rmFrontUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rmRearUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.adjYUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.adjXUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.adjHeightUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.adjWidthUpDown)).BeginInit();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.suffixTextBox);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.prefixTextBox);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.rmRearUpDown);
+ this.groupBox1.Controls.Add(this.label2);
+ this.groupBox1.Controls.Add(this.rmFrontUpDown);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Location = new System.Drawing.Point(7, 9);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(315, 163);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Key Names";
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.adjHeightUpDown);
+ this.groupBox2.Controls.Add(this.label7);
+ this.groupBox2.Controls.Add(this.label8);
+ this.groupBox2.Controls.Add(this.adjWidthUpDown);
+ this.groupBox2.Controls.Add(this.adjYUpDown);
+ this.groupBox2.Controls.Add(this.label6);
+ this.groupBox2.Controls.Add(this.label5);
+ this.groupBox2.Controls.Add(this.adjXUpDown);
+ this.groupBox2.Location = new System.Drawing.Point(328, 9);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(222, 163);
+ this.groupBox2.TabIndex = 1;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Positions";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(13, 22);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(126, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Remove chars from front:";
+ //
+ // rmFrontUpDown
+ //
+ this.rmFrontUpDown.Location = new System.Drawing.Point(146, 22);
+ this.rmFrontUpDown.Name = "rmFrontUpDown";
+ this.rmFrontUpDown.Size = new System.Drawing.Size(38, 20);
+ this.rmFrontUpDown.TabIndex = 1;
+ //
+ // rmRearUpDown
+ //
+ this.rmRearUpDown.Location = new System.Drawing.Point(146, 50);
+ this.rmRearUpDown.Name = "rmRearUpDown";
+ this.rmRearUpDown.Size = new System.Drawing.Size(38, 20);
+ this.rmRearUpDown.TabIndex = 3;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(13, 50);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(123, 13);
+ this.label2.TabIndex = 2;
+ this.label2.Text = "Remove chars from rear:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(20, 94);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(57, 13);
+ this.label3.TabIndex = 4;
+ this.label3.Text = "Add prefix:";
+ //
+ // prefixTextBox
+ //
+ this.prefixTextBox.Location = new System.Drawing.Point(83, 89);
+ this.prefixTextBox.Name = "prefixTextBox";
+ this.prefixTextBox.Size = new System.Drawing.Size(214, 20);
+ this.prefixTextBox.TabIndex = 5;
+ //
+ // suffixTextBox
+ //
+ this.suffixTextBox.Location = new System.Drawing.Point(83, 119);
+ this.suffixTextBox.Name = "suffixTextBox";
+ this.suffixTextBox.Size = new System.Drawing.Size(214, 20);
+ this.suffixTextBox.TabIndex = 7;
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(20, 124);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(56, 13);
+ this.label4.TabIndex = 6;
+ this.label4.Text = "Add suffix:";
+ //
+ // cancelButton
+ //
+ this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.cancelButton.Location = new System.Drawing.Point(452, 178);
+ this.cancelButton.Name = "cancelButton";
+ this.cancelButton.Size = new System.Drawing.Size(98, 25);
+ this.cancelButton.TabIndex = 2;
+ this.cancelButton.Text = "Cancel";
+ this.cancelButton.UseVisualStyleBackColor = true;
+ //
+ // okButton
+ //
+ this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.okButton.Location = new System.Drawing.Point(348, 178);
+ this.okButton.Name = "okButton";
+ this.okButton.Size = new System.Drawing.Size(98, 25);
+ this.okButton.TabIndex = 3;
+ this.okButton.Text = "OK";
+ this.okButton.UseVisualStyleBackColor = true;
+ //
+ // adjYUpDown
+ //
+ this.adjYUpDown.Location = new System.Drawing.Point(76, 43);
+ this.adjYUpDown.Maximum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ 0});
+ this.adjYUpDown.Minimum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ -2147483648});
+ this.adjYUpDown.Name = "adjYUpDown";
+ this.adjYUpDown.Size = new System.Drawing.Size(69, 20);
+ this.adjYUpDown.TabIndex = 11;
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(6, 44);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(49, 13);
+ this.label5.TabIndex = 10;
+ this.label5.Text = "Adjust Y:";
+ //
+ // adjXUpDown
+ //
+ this.adjXUpDown.Location = new System.Drawing.Point(76, 15);
+ this.adjXUpDown.Maximum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ 0});
+ this.adjXUpDown.Minimum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ -2147483648});
+ this.adjXUpDown.Name = "adjXUpDown";
+ this.adjXUpDown.Size = new System.Drawing.Size(69, 20);
+ this.adjXUpDown.TabIndex = 9;
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(6, 16);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(49, 13);
+ this.label6.TabIndex = 8;
+ this.label6.Text = "Adjust X:";
+ //
+ // adjHeightUpDown
+ //
+ this.adjHeightUpDown.Location = new System.Drawing.Point(76, 100);
+ this.adjHeightUpDown.Maximum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ 0});
+ this.adjHeightUpDown.Minimum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ -2147483648});
+ this.adjHeightUpDown.Name = "adjHeightUpDown";
+ this.adjHeightUpDown.Size = new System.Drawing.Size(69, 20);
+ this.adjHeightUpDown.TabIndex = 15;
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(6, 73);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(70, 13);
+ this.label7.TabIndex = 12;
+ this.label7.Text = "Adjust Width:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(6, 101);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(73, 13);
+ this.label8.TabIndex = 14;
+ this.label8.Text = "Adjust Height:";
+ //
+ // adjWidthUpDown
+ //
+ this.adjWidthUpDown.Location = new System.Drawing.Point(76, 72);
+ this.adjWidthUpDown.Maximum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ 0});
+ this.adjWidthUpDown.Minimum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ -2147483648});
+ this.adjWidthUpDown.Name = "adjWidthUpDown";
+ this.adjWidthUpDown.Size = new System.Drawing.Size(69, 20);
+ this.adjWidthUpDown.TabIndex = 13;
+ //
+ // OpsForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(562, 214);
+ this.Controls.Add(this.okButton);
+ this.Controls.Add(this.cancelButton);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "OpsForm";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.Text = "Global Operations";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.rmFrontUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rmRearUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.adjYUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.adjXUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.adjHeightUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.adjWidthUpDown)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.NumericUpDown rmFrontUpDown;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.NumericUpDown rmRearUpDown;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.TextBox suffixTextBox;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.TextBox prefixTextBox;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Button cancelButton;
+ private System.Windows.Forms.Button okButton;
+ private System.Windows.Forms.NumericUpDown adjYUpDown;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.NumericUpDown adjXUpDown;
+ private System.Windows.Forms.NumericUpDown adjHeightUpDown;
+ private System.Windows.Forms.Label label7;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.NumericUpDown adjWidthUpDown;
+ }
+}
\ No newline at end of file diff --git a/Native/EmuKeyboardDesigner/OpsForm.cs b/Native/EmuKeyboardDesigner/OpsForm.cs new file mode 100644 index 0000000..60d98a2 --- /dev/null +++ b/Native/EmuKeyboardDesigner/OpsForm.cs @@ -0,0 +1,29 @@ +using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace EmuKeyboardDesigner
+{
+ public partial class OpsForm : Form
+ {
+ public OpsForm()
+ {
+ InitializeComponent();
+ }
+
+ public int RemoveFront {get {return Convert.ToInt32(rmFrontUpDown.Value);}}
+ public int RemoveRear {get {return Convert.ToInt32(rmRearUpDown.Value);}}
+ public int AdjustX {get {return Convert.ToInt32(adjXUpDown.Value);}}
+ public int AdjustY {get {return Convert.ToInt32(adjYUpDown.Value);}}
+ public int AdjustWidth {get {return Convert.ToInt32(adjWidthUpDown.Value);}}
+ public int AdjustHeight {get {return Convert.ToInt32(adjHeightUpDown.Value);}}
+
+ public string Prefix {get {return prefixTextBox.Text;}}
+ public string Suffix {get {return suffixTextBox.Text;}}
+ }
+}
diff --git a/Native/EmuKeyboardDesigner/OpsForm.resx b/Native/EmuKeyboardDesigner/OpsForm.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Native/EmuKeyboardDesigner/OpsForm.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file |