private void ListControl_KeyDown(object sender, KeyEventArgs e) { if (KeyHelper.IsNewKey(e)) { ApplyInstruction(InstructionFactory.NewInstruction()); e.Handled = true; } else if (KeyHelper.IsDeleteKey(e)) { ApplyInstruction(InstructionFactory.DeleteInstruction()); e.Handled = true; } }
private void PopupHelperOnItemClick(object sender, PopupMenuHelperEventArgs e) { switch (e.Type) { case PopupMenuItemType.Create: ApplyInstruction(InstructionFactory.NewInstruction()); break; case PopupMenuItemType.Edit: ApplyInstruction(InstructionFactory.EditInstruction()); break; case PopupMenuItemType.Delete: ApplyInstruction(InstructionFactory.DeleteInstruction()); break; } }
private void ListControl_KeyDown(object sender, KeyEventArgs e) { if (KeyHelper.IsEditKey(e) && ChangeRowEnabled) { ApplyInstruction(InstructionFactory.EditInstruction()); e.Handled = true; } else if (KeyHelper.IsNewKey(e) && AddNewRowEnabled) { ApplyInstruction(InstructionFactory.NewInstruction()); e.Handled = true; } else if (KeyHelper.IsDeleteKey(e) && DeleteRowEnabled) { ApplyInstruction(InstructionFactory.DeleteInstruction()); e.Handled = true; } }