示例#1
0
 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;
     }
 }
示例#2
0
        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;
            }
        }
示例#3
0
 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;
     }
 }