summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-01-07 19:16:33 +0000
committersr55 <[email protected]>2009-01-07 19:16:33 +0000
commit603a154a73ced4dbdfa187ee88eda66833952d87 (patch)
tree71dc36cbf218134854bbfededef825f6fd5ebd4a /win
parent99f2c42d3d6eb12fc334b863dcff7a20ba90854f (diff)
WinGui:
- Check the encoded sample actually exists before trying to play it in VLC! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2067 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/frmGenPreview.cs24
1 files changed, 13 insertions, 11 deletions
diff --git a/win/C#/frmGenPreview.cs b/win/C#/frmGenPreview.cs
index 0bc59e0d7..1731a63bd 100644
--- a/win/C#/frmGenPreview.cs
+++ b/win/C#/frmGenPreview.cs
@@ -35,21 +35,23 @@ namespace Handbrake
currently_playing = "";
if (mainWindow.text_destination.Text != "")
currently_playing = mainWindow.text_destination.Text.Replace(".m", "_sample.m").Replace(".avi", "_sample.avi").Replace(".ogm", "_sample.ogm");
-
+
// Launch VLC and play video.
if (currently_playing != "")
{
- if (File.Exists(Properties.Settings.Default.VLC_Path))
- {
- String args = "\"" + currently_playing + "\"";
- ProcessStartInfo vlc = new ProcessStartInfo(Properties.Settings.Default.VLC_Path, args);
- Process.Start(vlc);
- lbl_status.Text = "VLC will now launch.";
- }
- else
+ if (File.Exists(currently_playing))
{
- MessageBox.Show("Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in the program options is correct.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
+ if (File.Exists(Properties.Settings.Default.VLC_Path))
+ {
+ String args = "\"" + currently_playing + "\"";
+ ProcessStartInfo vlc = new ProcessStartInfo(Properties.Settings.Default.VLC_Path, args);
+ Process.Start(vlc);
+ lbl_status.Text = "VLC will now launch.";
+ }
+ else
+ MessageBox.Show("Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in the program options is correct.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ } else
+ MessageBox.Show("Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}