From 0eee9e04b97e223b9751a8268b3c96fa9ac75b6a Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 23 Jan 2015 19:28:45 +0000 Subject: WinGui: Switch all the FileOpen / FileSave dialogs over to the native windows one. There is no difference for windows 7 users and later. This was used to give XP users a better experience which is no longer relevant. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6807 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 3 ++- win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs | 7 +++---- win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs | 4 +--- win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 6 +++--- win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs | 5 ++--- 5 files changed, 11 insertions(+), 14 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index d8739f472..981226e01 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -115,7 +115,8 @@ False ..\libraries\json\Net40\Newtonsoft.Json.dll - + + False ..\libraries\OokiiDialogs\Ookii.Dialogs.Wpf.dll diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs index 0e889d176..881d3db6e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs @@ -17,7 +17,6 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro; using HandBrake.ApplicationServices.Exceptions; - using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Encode.Model; using HandBrake.ApplicationServices.Services.Encode.Model.Models; using HandBrake.ApplicationServices.Services.Scan.Model; @@ -28,7 +27,7 @@ namespace HandBrakeWPF.ViewModels using LumenWorks.Framework.IO.Csv; - using Ookii.Dialogs.Wpf; + using Microsoft.Win32; /// /// The Chapters View Model @@ -98,7 +97,7 @@ namespace HandBrakeWPF.ViewModels /// public void Export() { - var saveFileDialog = new VistaSaveFileDialog + var saveFileDialog = new OpenFileDialog { Filter = "Csv File|*.csv", DefaultExt = "csv", @@ -152,7 +151,7 @@ namespace HandBrakeWPF.ViewModels /// public void Import() { - var dialog = new VistaOpenFileDialog { Filter = "CSV files (*.csv)|*.csv", CheckFileExists = true }; + var dialog = new OpenFileDialog { Filter = "CSV files (*.csv)|*.csv", CheckFileExists = true }; dialog.ShowDialog(); string filename = dialog.FileName; diff --git a/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs index ab108a2f6..003e2e2f1 100644 --- a/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs @@ -21,7 +21,6 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro; - using HandBrake.ApplicationServices; using HandBrake.ApplicationServices.EventArgs; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Encode.EventArgs; @@ -34,7 +33,6 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Commands; using HandBrakeWPF.Factories; - using HandBrakeWPF.Helpers; using HandBrakeWPF.Model; using HandBrakeWPF.Services.Interfaces; using HandBrakeWPF.Services.Presets.Interfaces; @@ -507,7 +505,7 @@ namespace HandBrakeWPF.ViewModels /// public void FileScan() { - var dialog = new VistaOpenFileDialog { Filter = "All files (*.*)|*.*" }; + var dialog = new OpenFileDialog() { Filter = "All files (*.*)|*.*" }; dialog.ShowDialog(); this.StartScan(dialog.FileName, 0); } diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 2159a2e22..7f5ba9b00 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -25,7 +25,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Services.Interfaces; using HandBrakeWPF.ViewModels.Interfaces; - using Ookii.Dialogs.Wpf; + using Microsoft.Win32; /// /// The Preview View Model @@ -315,7 +315,7 @@ namespace HandBrakeWPF.ViewModels /// public void Export() { - VistaSaveFileDialog dialog = new VistaSaveFileDialog + SaveFileDialog dialog = new SaveFileDialog { Filter = "HandBrake Queue Files (*.hbq)|*.hbq", OverwritePrompt = true, @@ -333,7 +333,7 @@ namespace HandBrakeWPF.ViewModels /// public void Import() { - VistaOpenFileDialog dialog = new VistaOpenFileDialog { Filter = "HandBrake Queue Files (*.hbq)|*.hbq", CheckFileExists = true }; + OpenFileDialog dialog = new OpenFileDialog { Filter = "HandBrake Queue Files (*.hbq)|*.hbq", CheckFileExists = true }; if (dialog.ShowDialog() == true) { this.queueProcessor.RestoreQueue(dialog.FileName); diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index 660c99843..8400f2b7c 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -14,7 +14,6 @@ namespace HandBrakeWPF.ViewModels using System.IO; using System.Linq; - using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Encode.Model; using HandBrake.ApplicationServices.Services.Encode.Model.Models; using HandBrake.ApplicationServices.Services.Scan.Model; @@ -24,7 +23,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Services.Presets.Model; using HandBrakeWPF.ViewModels.Interfaces; - using Ookii.Dialogs.Wpf; + using Microsoft.Win32; /// /// The Subtitles View Model @@ -313,7 +312,7 @@ namespace HandBrakeWPF.ViewModels /// public void Import() { - VistaOpenFileDialog dialog = new VistaOpenFileDialog + OpenFileDialog dialog = new OpenFileDialog { Filter = "SRT files (*.srt)|*.srt", CheckFileExists = true, -- cgit v1.2.3