コード例 #1
0
ファイル: Input.cs プロジェクト: AviiNL/Ccs2DLcd
 public Input(CsLglcd.Device Device)
 {
     //buttons = new List<Buttons>();
     /*keyb = new Keyboard();
     keyb.KeyDown += new Keyboard.KeyDownEventHandler(keyb_KeyDown);
     keyb.KeyUp += new Keyboard.KeyUpEventHandler(keyb_KeyUp);*/
     Device.ButtonsDown += new EventHandler<CsLglcd.ButtonsEventArgs>(Device_ButtonsDown);
     Device.ButtonsUp += new EventHandler<CsLglcd.ButtonsEventArgs>(Device_ButtonsUp);
 }
コード例 #2
0
ファイル: Input.cs プロジェクト: AviiNL/Ccs2DLcd
 private void Device_ButtonsUp(object sender, CsLglcd.ButtonsEventArgs e)
 {
     if (buttons.HasFlag((Buttons)e.Buttons))
         buttons -= (int)e.Buttons;
 }