public KpsButton(int position) { color = new KpsButtonColor(); Visible = true; AutoSize = false; Size = new Size(36, 36); Location = new Point(40 * position, 0); createLabel(); keyhandler = NoKeyHandler.Get(); UpdateColor(); }
public static IKeyHandler ShowDialogAndGetKeyHandler(KpsButtonColor colors, int prevkey, string prevlabel) { instance.colors = colors; instance.ActiveControl = null; instance.KeyCode = prevkey; instance.txtKey.Text = prevlabel; instance.ShowDialog(); if (instance.Cancelled) { return(null); } return(new DefKeyHandler(instance.KeyCode)); }
public KpsButton(int position, frmMain form) { this.frm = form; color = new KpsButtonColor(); Visible = true; AutoSize = false; Size = new Size(40, 36); Location = new Point(40 * position, 0); createPanel(); createLabel(); Handler = NoKeyHandler.Get(); UpdateColor(); }