From 016614620206b8406fb20897733567fa90602580 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 29 Nov 2014 20:06:12 +0000 Subject: WinGui: Move the event trigger to make drag/drop of files on the UI more reliable. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6571 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs | 10 ++++++++++ win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs | 13 +++++++++++++ 2 files changed, 23 insertions(+) (limited to 'win/CS/HandBrakeWPF/ViewModels') diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs index 283b828c9..b610d140b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs @@ -9,6 +9,8 @@ namespace HandBrakeWPF.ViewModels.Interfaces { + using System.Windows; + using HandBrake.ApplicationServices.Model; using HandBrakeWPF.Services.Presets.Model; @@ -94,5 +96,13 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// The show cli query. /// void ShowCliQuery(); + + /// + /// The files dropped on window. + /// + /// + /// The e. + /// + void FilesDroppedOnWindow(DragEventArgs e); } } \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs index ef32eb205..10c82f1a4 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs @@ -9,6 +9,8 @@ namespace HandBrakeWPF.ViewModels { + using System.IO; + using System.Linq; using System.Windows; using Caliburn.Micro; @@ -185,6 +187,17 @@ namespace HandBrakeWPF.ViewModels #endregion + /// + /// The files dropped on window. Pass this through to the active view model. + /// + /// + /// The DragEventArgs. + /// + public void FilesDroppedOnWindow(DragEventArgs e) + { + this.MainViewModel.FilesDroppedOnWindow(e); + } + /// /// Checks with the use if this window can be closed. /// -- cgit v1.2.3