There seem to be quite a few annoying cases where different objects have the same method (ie UIElement and Animatable both define "BeginAnimation").
Buttons now fade when mouse stops and instantly appear if it moves again. Buttons fade quickly if score starts playing. Buttons don't appear if playing (though I might need to review this). Time to hook up buttons (and get a sammich).
I worked on making a CommandBinding class that takes a source Command (as usual) but points to a target Command (such as a RelayCommand in the VM) rather than methods on the view. Since CommandBinding does not inherit from DependencyObject I had to use a child DependencyObject class to hold a bindable ICommand property. When the source command fires CanExecute, the new CommandBinding class handles it. On the first fire, it uses the event Source as a dataContext (the control that has the CommandBinding in its CommandBindings) and binds the new child DO object's Command property to the target Command. It then passes CanExecute/Execute calls straight through to that command.
Past bed time :/
Wednesday, March 3, 2010
Tuesday, March 2, 2010
Bar UI mechanics pretty much done. Still need to:
- Hook up buttons
- Position UI within parent bounds (done for x axis, see next point for y axis)
- Handle cases where lines are very small
- Make UI fade out when playing starts or mouse stops for a while
todo
- Fix race condition around PlayAndRemoveNoteOffs (called from Pause command on UI thread and HandleTick on timer thread). Check for other race conditions.
- Try/catch in HandleTick (especially for when app is closed down when playing) and other events/properties.
- Find/fix note ons not turning off.
- Find or make themes for numericUpDown control (or find another control).
- Fix bug in numericUpDown max value going too far.
- Algorithm for determining left/right hand, and UI to change it.
Fixed problems in generic numericupdown theme; it'll do for now.
- Hook up buttons
- Position UI within parent bounds (done for x axis, see next point for y axis)
- Handle cases where lines are very small
- Make UI fade out when playing starts or mouse stops for a while
todo
- Fix race condition around PlayAndRemoveNoteOffs (called from Pause command on UI thread and HandleTick on timer thread). Check for other race conditions.
- Try/catch in HandleTick (especially for when app is closed down when playing) and other events/properties.
- Find/fix note ons not turning off.
- Find or make themes for numericUpDown control (or find another control).
- Fix bug in numericUpDown max value going too far.
- Algorithm for determining left/right hand, and UI to change it.
Fixed problems in generic numericupdown theme; it'll do for now.
Subscribe to:
Posts (Atom)