summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs22
1 files changed, 21 insertions, 1 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 0f2d4dfae..adbe7c269 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -36,6 +36,7 @@ namespace Handbrake
// Globals: Mainly used for tracking.
private frmQueue queueWindow;
+ private frmGenPreview preview;
private string lastAction = null;
public int maxWidth = 0;
public int maxHeight = 0;
@@ -499,6 +500,26 @@ namespace Handbrake
queueWindow.setQueue(encodeQueue);
queueWindow.Show();
}
+ private void btn_vidPreview_Click(object sender, EventArgs e)
+ {
+ if (text_source.Text == "" || text_source.Text == "Click 'Source' to continue" || text_destination.Text == "")
+ MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ else
+ {
+ if (preview == null)
+ {
+ preview = new frmGenPreview(this);
+ preview.Show();
+ }
+ else if (preview.IsDisposed)
+ {
+ preview = new frmGenPreview(this);
+ preview.Show();
+ }
+ else
+ MessageBox.Show("The preview window is already open!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
private void btn_ActivityWindow_Click(object sender, EventArgs e)
{
String file = String.Empty;
@@ -1926,7 +1947,6 @@ namespace Handbrake
treeView_presets.Nodes.Add(rootNode);
}
-
// User Presets
presetNames = presetHandler.getUserPresetNames();
foreach (string preset in presetNames)