summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Commands
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-08-27 19:11:43 +0000
committersr55 <[email protected]>2013-08-27 19:11:43 +0000
commitbfd79c7ca947ec205a238a334bfe7f37fd40bb21 (patch)
treedb4ab10a1ba566ae468786d8cf1fb761b808be48 /win/CS/HandBrakeWPF/Commands
parent09130a3f2991ffaddd7fda7bf6758266e8143d2b (diff)
WinGui: Some more work on the Instant HandBrake prototype.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5756 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Commands')
-rw-r--r--win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs b/win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs
index 617778b08..e9ec9966a 100644
--- a/win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs
+++ b/win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs
@@ -49,7 +49,7 @@ namespace HandBrakeWPF.Commands
/// </param>
private void ScanServiceWrapperScanCompleted(object sender, HandBrake.ApplicationServices.EventArgs.ScanCompletedEventArgs e)
{
- Caliburn.Micro.Execute.OnUIThread(() => this.CanExecuteChanged(sender, EventArgs.Empty));
+ Caliburn.Micro.Execute.OnUIThread(this.OnCanExecuteChanged);
}
/// <summary>
@@ -64,7 +64,7 @@ namespace HandBrakeWPF.Commands
/// </param>
private void ScanServiceWrapperScanStared(object sender, EventArgs e)
{
- Caliburn.Micro.Execute.OnUIThread(() => this.CanExecuteChanged(sender, EventArgs.Empty));
+ Caliburn.Micro.Execute.OnUIThread(this.OnCanExecuteChanged);
}
#region Implementation of ICommand
@@ -100,6 +100,18 @@ namespace HandBrakeWPF.Commands
/// </summary>
public event EventHandler CanExecuteChanged;
+ /// <summary>
+ /// The on can execute changed.
+ /// </summary>
+ protected virtual void OnCanExecuteChanged()
+ {
+ EventHandler handler = this.CanExecuteChanged;
+ if (handler != null)
+ {
+ handler(this, EventArgs.Empty);
+ }
+ }
+
#endregion
}
}