Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
 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();
 }