From 8c98cdabb836dcc48c6b379203399c5b29e38383 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 7 May 2012 15:27:00 +0000 Subject: Dodgy wedge to allow me to do programmatic changes in the editor. --- Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo | Bin 50176 -> 50176 bytes Native/EmuKeyboardDesigner/Program.cs | 40 +++++++++++++++++++++ 2 files changed, 40 insertions(+) (limited to 'Native') diff --git a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo index 6a93ec2..3805178 100644 Binary files a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo and b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo differ 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); + } + } } } -- cgit v1.2.3