Example #1
0
 private void ListControl_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         if (ListControl.IsCalcHitInfoInRow(e.Location))
         {
             ApplyInstruction(InstructionFactory.EditInstruction());
         }
     }
 }
Example #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;
            }
        }
Example #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;
     }
 }