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); }
private void Device_ButtonsUp(object sender, CsLglcd.ButtonsEventArgs e) { if (buttons.HasFlag((Buttons)e.Buttons)) buttons -= (int)e.Buttons; }