private void KeyBtnKeyPressed(object sender, KeyPressEventArgs e) { var btn = sender as Button; MdGlobals.keys.keys[MdGlobals.selectedX][MdGlobals.selectedY][MdGlobals.selectedZ] = ClKey.GetKeyFromChar(e.KeyChar); if (checkBox1.Checked) { MdGlobals.keys.keys[MdGlobals.selectedX][MdGlobals.selectedY][0] = ClKey.GetKeyFromChar(e.KeyChar); MdGlobals.keys.keys[MdGlobals.selectedX][MdGlobals.selectedY][1] = ClKey.GetKeyFromChar(e.KeyChar); MdGlobals.keys.keys[MdGlobals.selectedX][MdGlobals.selectedY][2] = ClKey.GetKeyFromChar(e.KeyChar); } btn.Text = ClKey.GetDisplayFromChar(e.KeyChar); lLayer.Focus(); MdGlobals.board.updateLayers(); }
private void FmMain_Load(object sender, EventArgs e) { ClKey.iniList(); ClKey.dKeys = ClKey.dKeys.OrderBy(o => o.val).ToList(); ClKey.dKeys = ClKey.dKeys.OrderBy(o => o.ktype).ToList(); for (int i = 0; i < ClKey.dKeys.Count; i++) { var newb = new Button(); newb.Name = "bt_" + i; newb.Text = ClKey.dKeys[i].display; newb.Size = new Size(72, 72); newb.Parent = flpOSwitches; newb.Click += new EventHandler(this.KeyBtnClicked); } MdGlobals.specialS = false; }
public ClLayoutContainer(int x, int y, int z) { keys = new List <List <List <ClKey> > >(); for (int i = 0; i < x; i++) { var il = new List <List <ClKey> >(); keys.Add(il); for (int j = 0; j < y; j++) { var jl = new List <ClKey>(); il.Add(jl); for (int k = 0; k < z; k++) { var kl = new ClKey(); jl.Add(kl); } } } }