this.cb_duration = new System.Windows.Forms.ToolStripComboBox();\r
this.btn_playQT = new System.Windows.Forms.ToolStripButton();\r
this.btn_playVLC = new System.Windows.Forms.ToolStripButton();\r
- this.statusStrip = new System.Windows.Forms.StatusStrip();\r
- this.lbl_status = new System.Windows.Forms.ToolStripStatusLabel();\r
this.QTControl = new AxQTOControlLib.AxQTControl();\r
+ this.panel1 = new System.Windows.Forms.Panel();\r
+ this.lbl_status = new System.Windows.Forms.Label();\r
this.toolBar.SuspendLayout();\r
- this.statusStrip.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.QTControl)).BeginInit();\r
+ this.panel1.SuspendLayout();\r
this.SuspendLayout();\r
// \r
// toolBar\r
this.toolBar.Location = new System.Drawing.Point(0, 0);\r
this.toolBar.Name = "toolBar";\r
this.toolBar.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;\r
- this.toolBar.Size = new System.Drawing.Size(774, 39);\r
+ this.toolBar.Size = new System.Drawing.Size(774, 25);\r
this.toolBar.TabIndex = 37;\r
this.toolBar.Text = "toolStrip1";\r
// \r
// \r
this.lbl_preview.BackColor = System.Drawing.Color.Transparent;\r
this.lbl_preview.Name = "lbl_preview";\r
- this.lbl_preview.Size = new System.Drawing.Size(100, 36);\r
+ this.lbl_preview.Size = new System.Drawing.Size(100, 22);\r
this.lbl_preview.Text = "Start at Preview:";\r
// \r
// cb_preview\r
"9",\r
"10"});\r
this.cb_preview.Name = "cb_preview";\r
- this.cb_preview.Size = new System.Drawing.Size(75, 39);\r
+ this.cb_preview.Size = new System.Drawing.Size(75, 25);\r
// \r
// toolStripLabel2\r
// \r
this.toolStripLabel2.BackColor = System.Drawing.Color.Transparent;\r
this.toolStripLabel2.Name = "toolStripLabel2";\r
- this.toolStripLabel2.Size = new System.Drawing.Size(111, 36);\r
+ this.toolStripLabel2.Size = new System.Drawing.Size(111, 22);\r
this.toolStripLabel2.Text = "Duration (seconds)";\r
// \r
// cb_duration\r
"60"});\r
this.cb_duration.Margin = new System.Windows.Forms.Padding(0);\r
this.cb_duration.Name = "cb_duration";\r
- this.cb_duration.Size = new System.Drawing.Size(75, 39);\r
+ this.cb_duration.Size = new System.Drawing.Size(75, 25);\r
// \r
// btn_playQT\r
// \r
- this.btn_playQT.Image = global::Handbrake.Properties.Resources.Play;\r
+ this.btn_playQT.Image = global::Handbrake.Properties.Resources.Play_small;\r
this.btn_playQT.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
this.btn_playQT.ImageTransparentColor = System.Drawing.Color.Magenta;\r
this.btn_playQT.Name = "btn_playQT";\r
- this.btn_playQT.Size = new System.Drawing.Size(113, 36);\r
+ this.btn_playQT.Size = new System.Drawing.Size(99, 22);\r
this.btn_playQT.Text = "Play with QT";\r
this.btn_playQT.Click += new System.EventHandler(this.btn_playQT_Click);\r
// \r
// btn_playVLC\r
// \r
- this.btn_playVLC.Image = global::Handbrake.Properties.Resources.Play;\r
+ this.btn_playVLC.Image = global::Handbrake.Properties.Resources.Play_small;\r
this.btn_playVLC.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
this.btn_playVLC.ImageTransparentColor = System.Drawing.Color.Magenta;\r
this.btn_playVLC.Name = "btn_playVLC";\r
- this.btn_playVLC.Size = new System.Drawing.Size(117, 36);\r
+ this.btn_playVLC.Size = new System.Drawing.Size(103, 22);\r
this.btn_playVLC.Text = "Play with VLC";\r
this.btn_playVLC.Click += new System.EventHandler(this.btn_playVLC_Click);\r
// \r
- // statusStrip\r
- // \r
- this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
- this.lbl_status});\r
- this.statusStrip.Location = new System.Drawing.Point(0, 486);\r
- this.statusStrip.Name = "statusStrip";\r
- this.statusStrip.Size = new System.Drawing.Size(774, 22);\r
- this.statusStrip.TabIndex = 38;\r
- this.statusStrip.Text = "statusStrip1";\r
- // \r
- // lbl_status\r
- // \r
- this.lbl_status.BackColor = System.Drawing.Color.Transparent;\r
- this.lbl_status.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.lbl_status.Name = "lbl_status";\r
- this.lbl_status.Size = new System.Drawing.Size(31, 17);\r
- this.lbl_status.Text = "{0}";\r
- // \r
// QTControl\r
// \r
this.QTControl.Enabled = true;\r
- this.QTControl.Location = new System.Drawing.Point(0, 42);\r
+ this.QTControl.Location = new System.Drawing.Point(0, 0);\r
this.QTControl.Name = "QTControl";\r
this.QTControl.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("QTControl.OcxState")));\r
- this.QTControl.Size = new System.Drawing.Size(64, 64);\r
+ this.QTControl.Size = new System.Drawing.Size(64, 72);\r
this.QTControl.TabIndex = 39;\r
this.QTControl.Visible = false;\r
// \r
+ // panel1\r
+ // \r
+ this.panel1.Controls.Add(this.lbl_status);\r
+ this.panel1.Controls.Add(this.QTControl);\r
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+ this.panel1.Location = new System.Drawing.Point(0, 25);\r
+ this.panel1.Name = "panel1";\r
+ this.panel1.Size = new System.Drawing.Size(774, 483);\r
+ this.panel1.TabIndex = 40;\r
+ // \r
+ // lbl_status\r
+ // \r
+ this.lbl_status.AutoSize = true;\r
+ this.lbl_status.BackColor = System.Drawing.Color.Transparent;\r
+ this.lbl_status.Dock = System.Windows.Forms.DockStyle.Top;\r
+ this.lbl_status.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.lbl_status.ForeColor = System.Drawing.Color.White;\r
+ this.lbl_status.Location = new System.Drawing.Point(0, 0);\r
+ this.lbl_status.Name = "lbl_status";\r
+ this.lbl_status.Size = new System.Drawing.Size(51, 25);\r
+ this.lbl_status.TabIndex = 40;\r
+ this.lbl_status.Text = "{0}";\r
+ this.lbl_status.Visible = false;\r
+ // \r
// frmPreview\r
// \r
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
this.BackColor = System.Drawing.Color.Black;\r
this.ClientSize = new System.Drawing.Size(774, 508);\r
- this.Controls.Add(this.QTControl);\r
- this.Controls.Add(this.statusStrip);\r
+ this.Controls.Add(this.panel1);\r
this.Controls.Add(this.toolBar);\r
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
this.Name = "frmPreview";\r
this.TopMost = true;\r
this.toolBar.ResumeLayout(false);\r
this.toolBar.PerformLayout();\r
- this.statusStrip.ResumeLayout(false);\r
- this.statusStrip.PerformLayout();\r
((System.ComponentModel.ISupportInitialize)(this.QTControl)).EndInit();\r
+ this.panel1.ResumeLayout(false);\r
+ this.panel1.PerformLayout();\r
this.ResumeLayout(false);\r
this.PerformLayout();\r
\r
\r
private System.Windows.Forms.ToolStrip toolBar;\r
private System.Windows.Forms.ToolStripButton btn_playQT;\r
- private System.Windows.Forms.StatusStrip statusStrip;\r
private AxQTOControlLib.AxQTControl QTControl;\r
private System.Windows.Forms.ToolStripComboBox cb_preview;\r
private System.Windows.Forms.ToolStripLabel lbl_preview;\r
private System.Windows.Forms.ToolStripLabel toolStripLabel2;\r
private System.Windows.Forms.ToolStripComboBox cb_duration;\r
- private System.Windows.Forms.ToolStripStatusLabel lbl_status;\r
private System.Windows.Forms.ToolStripButton btn_playVLC;\r
+ private System.Windows.Forms.Panel panel1;\r
+ private System.Windows.Forms.Label lbl_status;\r
}\r
}
\ No newline at end of file
using System.Diagnostics;\r
using System.Runtime.InteropServices;\r
using System.IO;\r
+using AxQTOControlLib;\r
+using QTOControlLib;\r
using QTOLibrary;\r
\r
namespace Handbrake\r
cb_preview.SelectedIndex = 0;\r
cb_duration.SelectedIndex = 1;\r
}\r
- \r
+\r
#region Encode Sample\r
private void btn_playVLC_Click(object sender, EventArgs e)\r
{\r
+ lbl_status.Visible = true;\r
+ try\r
+ {\r
+ QTControl.URL = "";\r
+ if (File.Exists(currently_playing))\r
+ File.Delete(currently_playing);\r
+ }\r
+ catch (Exception)\r
+ {\r
+ MessageBox.Show(this, "Unable to delete previous preview file. You may need to restart the application.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ }\r
+\r
btn_playQT.Enabled = false;\r
btn_playVLC.Enabled = false;\r
lbl_status.Text = "Encoding Sample for (VLC) ...";\r
String query = hb_common_func.GeneratePreviewQuery(mainWindow, cb_duration.Text, cb_preview.Text);\r
- ThreadPool.QueueUserWorkItem(procMonitor, query); \r
+ ThreadPool.QueueUserWorkItem(procMonitor, query);\r
}\r
private void btn_playQT_Click(object sender, EventArgs e)\r
{\r
+ lbl_status.Visible = true;\r
+ try\r
+ {\r
+ QTControl.URL = "";\r
+ if (File.Exists(currently_playing))\r
+ File.Delete(currently_playing);\r
+ }\r
+ catch (Exception)\r
+ {\r
+ MessageBox.Show(this, "Unable to delete previous preview file. You may need to restart the application.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ }\r
+\r
btn_playQT.Enabled = false;\r
btn_playVLC.Enabled = false;\r
lbl_status.Text = "Encoding Sample for (QT) ...";\r
// Play back in QT or VLC\r
if (playerSelection == "QT")\r
play();\r
- else \r
+ else\r
playVLC();\r
- \r
+\r
lbl_status.Text = "";\r
}\r
catch (Exception exc)\r
{\r
player = new Thread(OpenMovie) { IsBackground = true };\r
player.Start();\r
+ lbl_status.Visible = false;\r
}\r
\r
/// <summary>\r
else\r
MessageBox.Show(this, "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);\r
}\r
+ lbl_status.Visible = false;\r
}\r
\r
/// <summary>\r
BeginInvoke(new UpdateUIHandler(OpenMovie));\r
return;\r
}\r
+ QTControl.Sizing = QTSizingModeEnum.qtControlFitsMovie;\r
QTControl.URL = currently_playing;\r
- QTControl.Width = QTControl.Movie.Width;\r
- QTControl.Height = QTControl.Movie.Height;\r
- // The initial control size is 64,64. If we do not reload the clip here\r
- // it'll scale the video from 64,64. \r
- // Unsure why as it correctly resizes the control to the movies actual size.\r
- QTControl.URL = currently_playing;\r
- QTControl.SetScale(0);\r
+ QTControl.Sizing = QTSizingModeEnum.qtMovieFitsControl;\r
QTControl.Show();\r
\r
- this.Width = QTControl.Width + 5;\r
- this.Height = QTControl.Height + 90;\r
+ this.ClientSize = QTControl.Size;\r
+ this.Height += 25;\r
}\r
catch (COMException ex)\r
{\r