Ejemplo n.º 1
0
 private void DisplayKeyboard(ClKeyboard input)
 {
     spcEditLayout.Panel2.Controls.Clear();
     MdGlobals.boardType      = input;
     MdGlobals.board          = new UCBoard(input);
     MdGlobals.board.Dock     = DockStyle.Fill;
     MdGlobals.board.Location = new Point(30, 30);
     MdGlobals.board.Parent   = spcEditLayout.Panel2;
 }
Ejemplo n.º 2
0
        private void btSelectDevice_Click(object sender, EventArgs e)
        {
            List <string> files = System.IO.Directory.GetFiles(MdConstants.keyboards, MdConstants.eKeyboards).ToList <string>();
            var           dia   = new FmSelectTextDialog("Select a Keyboard", "Select your keyboard", files.Select(str => str.Substring(str.LastIndexOf(MdConstants.pseparator) + 1)).ToList());
            DialogResult  dr    = dia.ShowDialog();

            if (dr == DialogResult.OK)
            {
                ClKeyboard output = MdCore.Deserialize <ClKeyboard>(files[dia.index]);
                DisplayKeyboard(output);
            }
        }
Ejemplo n.º 3
0
 public UCBoard(ClKeyboard keyboard)
 {
     InitializeComponent();
     slices              = new List <UCSlice>();
     layout              = new ClLayoutContainer();
     layout.layers       = keyboard.layers;
     layout.keyboardType = keyboard.keyboardType;
     saveExtension       = keyboard.fileFormat;
     foreach (ClBoardSlice slice in keyboard.slices)
     {
         var ns = new UCSlice(slice, this.layout);
         this.slices.Add(ns);
         ns.Parent = this.flpMain;
     }
     lKeyboardName.Text = keyboard.keyboardName;
 }