public ClKey(ClKey input) { this.val = input.val; this.ktype = input.ktype; this.display = input.display; this.allLayers = input.allLayers; }
public ClKeyData(int slice, int x, int y) { key = new ClKey(); this.x = x; this.y = y; this.slice = slice; }
public ClKeyData() { key = new ClKey(); x = 0; y = 0; slice = 0; }
private void SetLayoutFromButton(Button sender, char input) { string btn = sender.Tag.ToString(); btn = btn.Substring(btn.IndexOf("_") + 1); int slice = Convert.ToInt32(btn.Substring(0, btn.IndexOf("_"))); btn = btn.Substring(btn.IndexOf("_") + 1); int x = Convert.ToInt32(btn.Substring(0, btn.IndexOf("_"))); btn = btn.Substring(btn.IndexOf("_") + 1); int y = Convert.ToInt32(btn.Substring(0, btn.IndexOf("_"))); btn = btn.Substring(btn.IndexOf("_") + 1); int z = Convert.ToInt32(btn); foreach (List <ClKeyData> kl in layout.keys) { foreach (ClKeyData k in kl) { if (k.slice == slice && k.x == x && k.y == y) { if (CBAllLayers.Checked.Value || ClKey.GetKeyFromChar(input).allLayers || k.key.allLayers || layout.keys.IndexOf(kl) == this.index) { k.key = ClKey.GetKeyFromChar(input); } } } } MdGlobals.board.LoadLayout(layout); }
public static void Initiate() { SERIAL_SET_LAYER_COMMAND = "uniqueksetlayer"; selectedSpecial = false; selectedKey = new ClKey(); kselect = new FmKeySelector(); kselect.Topmost = true; }
public static ClKey GetKeyFromChar(char input) { ClKey cky = dKeys.Find(k => (k.ktype == 0 && k.val == Convert.ToByte(input))); if (cky != null) { return(cky); } return(new ClKey()); }
public FmMain() { InitializeComponent(); Icon = new Icon(MdConstants.icon); //Icon = ArbitesEto.Properties.Resources.favicon as Eto.Drawing.Icon; //Icon = Icon.FromResource("favicon.ico", typeof(System.Drawing.Icon)); ClKey.iniList(); MdGlobals.Initiate(); // load ports event BtnDevice.Click += (sender, e) => LoadHardwareList(); // load devices event BtnPort.Click += (sender, e) => LoadPortList(); // launch key selector BtnKeyMenu.Click += (sender, e) => LaunchKeyMenu(); BtnUpload.Click += (sender, e) => BtnUploadClicked(); this.Closing += (sender, e) => FormClosing(); }