summaryrefslogtreecommitdiffstats
path: root/win/C#/Experimental/frmPreviewAX.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-01-04 22:28:21 +0000
committersr55 <[email protected]>2009-01-04 22:28:21 +0000
commit90c58971858b845e77bf97fc4d6e8d5f696c0dc1 (patch)
tree721cb4f03330a3dc316604b11c09cf5d4c4a9a1f /win/C#/Experimental/frmPreviewAX.cs
parentde7e8e8be0c1bd709a9f4381a06e786e75bd574a (diff)
WinGui:
- Fixes a few issues with the QT preview window and places it in the main directory. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2059 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Experimental/frmPreviewAX.cs')
-rw-r--r--win/C#/Experimental/frmPreviewAX.cs85
1 files changed, 0 insertions, 85 deletions
diff --git a/win/C#/Experimental/frmPreviewAX.cs b/win/C#/Experimental/frmPreviewAX.cs
deleted file mode 100644
index 89ccceccd..000000000
--- a/win/C#/Experimental/frmPreviewAX.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using System.Threading;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-using QTOControlLib;
-using QTOLibrary;
-
-namespace Handbrake
-{
- public partial class frmPreviewAX : Form
- {
-
- Handbrake.QueryGenerator hb_common_func = new Handbrake.QueryGenerator();
- Functions.Encode process = new Functions.Encode();
-
- String currently_playing = "";
- frmMain mainWindow;
- private Process hbProc;
-
- public frmPreviewAX(frmMain mw)
- {
- InitializeComponent();
- this.mainWindow = mw;
- cb_preview.SelectedIndex = 0;
- cb_duration.SelectedIndex = 1;
- }
-
- private void btn_play_Click(object sender, EventArgs e)
- {
- if (mainWindow.text_destination.Text != "")
- currently_playing = mainWindow.text_destination.Text.Replace(".m", "_sample.m").Replace(".avi", "_sample.avi").Replace(".ogm", "_sample.ogm");
-
- OpenMovie(currently_playing);
-
- this.Width = QTControl.Width + 5;
- this.Height = QTControl.Height + 90;
- }
-
- private void OpenMovie(string url)
- {
- try
- {
- QTControl.URL = url;
- QTControl.Show();
- }
- catch (COMException ex)
- {
- QTUtils qtu = new QTUtils();
- MessageBox.Show("Unable to open movie:\n\nError Code: " + ex.ErrorCode.ToString("X") + "\nQT Error code : " + qtu.QTErrorFromErrorCode(ex.ErrorCode).ToString());
- }
- catch (Exception ex)
- {
- MessageBox.Show("Unable to open movie:\n\n" + ex.ToString());
- }
- }
-
- #region Encode Sample
- private void btn_encode_Click(object sender, EventArgs e)
- {
- String query = hb_common_func.GeneratePreviewQuery(mainWindow, cb_duration.Text, cb_preview.Text);
- ThreadPool.QueueUserWorkItem(procMonitor, query);
- }
- private void procMonitor(object state)
- {
- // Make sure we are not already encoding and if we are then display an error.
- if (hbProc != null)
- MessageBox.Show("Handbrake is already encoding a video!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- else
- {
- hbProc = process.runCli(this, (string)state);
- hbProc.WaitForExit();
- hbProc = null;
- }
- }
- #endregion
-
- }
-} \ No newline at end of file