diff --git a/FinalRetimeWindow.xaml b/FinalRetimeWindow.xaml
index 8505b3c..87e9a7b 100644
--- a/FinalRetimeWindow.xaml
+++ b/FinalRetimeWindow.xaml
@@ -26,7 +26,7 @@
-
+
diff --git a/Info.xaml b/Info.xaml
index c692391..b7a1ebe 100644
--- a/Info.xaml
+++ b/Info.xaml
@@ -17,12 +17,13 @@
-
+
Controls:
A/D: go back/forwards 1 frame
Q/E: seek 10 seconds backwards/forwards
S/F: Set start/end of load
+ Delete/Backspace: Delete load
Space: Pause/Unpause
diff --git a/MainWindow.xaml b/MainWindow.xaml
index 5494015..3943fbb 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -7,7 +7,7 @@
xmlns:ffme="clr-namespace:Unosquare.FFME;assembly=ffme.win"
mc:Ignorable="d"
Icon="/Icon.ico"
- Title="Load Retimer" Height="450" Width="1000" PreviewKeyDown="Window_KeyDown" MinHeight="300" MinWidth="900" SizeChanged="Window_SizeChanged">
+ Title="Load Retimer" Height="450" Width="1000" PreviewKeyDown="Window_KeyDown" MinHeight="300" MinWidth="900" SizeChanged="Window_SizeChanged" PreviewMouseLeftButtonDown="Window_PreviewMouseLeftButtonDown">
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index 8f9cbb6..07e9126 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -274,6 +274,8 @@ private void Video_MediaOpened(object sender, Unosquare.FFME.Common.MediaOpenedE
private void Window_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) {
if (!Video.IsOpen) return;
+ if (FocusManager.GetFocusedElement(this) is System.Windows.Controls.TextBox) return;
+
if (e.Key == Key.A) {
Video.StepBackward();
e.Handled = true;
@@ -302,6 +304,11 @@ private void Window_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
ButtonPlayPause_Click(null, null);
e.Handled = true;
}
+ if (e.Key == Key.Delete || e.Key == Key.Back) {
+ if (LoadBox.SelectedItem != null) {
+ LoadBox.Items.Remove(LoadBox.SelectedItem);
+ }
+ }
}
private void StartRun_Click(object sender, RoutedEventArgs e) {
@@ -451,6 +458,15 @@ private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs
private System.Drawing.Bitmap tempBmp;
+ private void Window_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) {
+ var mouseWasDownOn = e.Source as FrameworkElement;
+ if (mouseWasDownOn != null) {
+ if (!(mouseWasDownOn is LoadInfo)) {
+ LoadBox.SelectedItem = null;
+ }
+ }
+ }
+
private bool IsBlack(System.Drawing.Bitmap bitmap) {
tempBmp = bitmap.Clone(new System.Drawing.Rectangle(rectX1, rectY1, rectX2 - rectX1, rectY2 - rectY1), bitmap.PixelFormat);
int w = tempBmp.Width;