Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#115 closed defect (released)

Typing number for equipment amount doesn't update Okay button

Reported by: ibboard Owned by: ibboard
Priority: minor Milestone: WarFoundry 0.1
Component: WarFoundry-GUI-WinForms Version: Unknown or N/A
Keywords: enabled update Cc:
Blocked By: Blocking: #88

Description

The "Okay" button when adding equipment doesn't get notified when the user types in a value. We're probably listening for a modify event that fires on exit, so we need to listen for individual modifies (or key presses) as well and enable/disable the Okay button as appropriate.

Change History (9)

comment:1 Changed 10 years ago by ibboard

Still exists after #114 and #117 were completed. May be a limitation of typing values in NumericUpDown controls, but there may be a way around it by capturing "enter". Firing events on each key press should probably be avoided as it could give us some bad numbers (e.g. typing "100" in the percent box for a 50%-100% item would give us 1 and 10 first, which aren't valid).

comment:2 Changed 10 years ago by ibboard

Status: newconfirmed

Move tickets to new "confirmed" status to show that they've been checked

comment:3 Changed 10 years ago by ibboard

Priority: majorminor

Reduce some tickets to "Minor" so that we've not just got lots all at "Major"

comment:4 Changed 10 years ago by ibboard

Blocking: 88 added

comment:5 Changed 10 years ago by ibboard

Owner: set to ibboard
released: no
Status: confirmedaccepted
Version: Unknown or N/A

comment:6 Changed 10 years ago by ibboard

(In r440) Re #115: Typing number for equipment amount doesn't update Okay button

  • Switch to using ControlTranslator for the EquipmentAmountControl to resolve issues with the VisualStudio form designer erroring out because the translations aren't initialised (they still won't be, but it seems to be happy now)

comment:7 Changed 10 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

(In r441) Fixes #115: Typing number for equipment amount doesn't update Okay button

  • Remove KeyDown capture code (AcceptButton functionality captures the key press first)
  • Add ProcessDialogKey method that uses ValueChanged helper class to determine whether the control changes when we force an update

New functionality is that the values can be typed and changed by pressing Enter, then a second Enter will accept the changes and close the dialog. If no changes were made then pressing Enter once accepts changes and closes the dialog.

comment:8 Changed 10 years ago by ibboard

released: noyes

Release as part of v0.1b6

comment:9 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.