diff options
author | Ian C <ianc@noddybox.co.uk> | 2012-05-07 15:27:00 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2012-05-07 15:27:00 +0000 |
commit | 8c98cdabb836dcc48c6b379203399c5b29e38383 (patch) | |
tree | 536314b758d255cf7bd8e8867d16d4177a08e2f6 | |
parent | 02bec4f3037c470b6840b6f7418d64aab9bdf4b0 (diff) |
Dodgy wedge to allow me to do programmatic changes in the editor.
-rw-r--r-- | Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo | bin | 50176 -> 50176 bytes | |||
-rw-r--r-- | Native/EmuKeyboardDesigner/Program.cs | 40 | ||||
-rw-r--r-- | WindowsPhone/KeyboardTest.suo | bin | 48128 -> 47616 bytes |
3 files changed, 40 insertions, 0 deletions
diff --git a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo Binary files differindex 6a93ec2..3805178 100644 --- a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo +++ b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo diff --git a/Native/EmuKeyboardDesigner/Program.cs b/Native/EmuKeyboardDesigner/Program.cs index 4cb9cc9..84e048d 100644 --- a/Native/EmuKeyboardDesigner/Program.cs +++ b/Native/EmuKeyboardDesigner/Program.cs @@ -19,6 +19,8 @@ using System; using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
+using System.IO;
+using Noddybox.Emulation.Keyboard.Schema;
namespace EmuKeyboardDesigner
{
@@ -30,9 +32,47 @@ namespace EmuKeyboardDesigner [STAThread]
static void Main()
{
+ //Wedge();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
+
+ private static void Wedge()
+ {
+ KeyboardDefinition def;
+
+ using (BinaryReader r = new BinaryReader(File.OpenRead(@"E:\Src\WindowsMobile\wpspec\wpspec\wpspec\Resources\Spectrum.keyboard")))
+ {
+ def = KeyboardDefinition.Load(r);
+ }
+
+ int x = 0;
+ int y = 0;
+
+ foreach (KeyboardKey k in def.Definitions)
+ {
+ if (k.KeySymbol == "KeyShiftLock")
+ {
+ k.KeySymbol = "KeyCapsShift";
+ }
+
+ k.Width = 48;
+ k.Height = 48;
+ k.X = x * k.Width;
+ k.Y = y * k.Height;
+
+ if (++x == 10)
+ {
+ y++;
+ x = 0;
+ }
+ }
+
+ using (BinaryWriter w = new BinaryWriter(File.OpenWrite(@"E:\Src\WindowsMobile\wpspec\wpspec\wpspec\Resources\Spectrum.keyboard")))
+ {
+ def.Save(w);
+ }
+ }
}
}
diff --git a/WindowsPhone/KeyboardTest.suo b/WindowsPhone/KeyboardTest.suo Binary files differindex 3e2bd4d..9d8aa7e 100644 --- a/WindowsPhone/KeyboardTest.suo +++ b/WindowsPhone/KeyboardTest.suo |