// - Load users default settings. (if required)\r
// - Do an update check (if required)\r
// --------------------------------------------------------------\r
+ private frmDvdInfo dvdInfoWindow = new frmDvdInfo();\r
+ \r
public frmMain()\r
{\r
- \r
+\r
InitializeComponent();\r
\r
+ // This is a quick Hack fix for the cross-thread problem with frmDvdIndo ************************\r
+ dvdInfoWindow.Show();\r
+ dvdInfoWindow.Hide();\r
+ // **********************************************************************************************\r
+\r
// Set the Version number lable to the corect version.\r
Version.Text = "Version " + Properties.Settings.Default.GuiVersion;\r
\r
showQueue();\r
}\r
\r
- private frmDvdInfo dvdInfoWindow = new frmDvdInfo();\r
+ \r
private void mnu_viewDVDdata_Click(object sender, EventArgs e)\r
{\r
- dvdInfoWindow.Show();\r
+ try\r
+ {\r
+ dvdInfoWindow.Show();\r
+ \r
+ }\r
+ catch (Exception)\r
+ {\r
+ }\r
\r
// BUG *******************************************************\r
// Cross-thread operation not valid: Control 'rtf_dvdInfo' accessed from a thread other than the thread it was created on.\r
// This happens when the DVD is scanned and this item is then selected.\r
// If this item is selected so a blank copy of the window appears, then a DVD is scanned, there is no cross-thread issue.\r
+ // NOTE: Try/catch added to prevent final build crashing.\r
+ // NOTE2: Included a quick fix in frmMain(). Simply show and hide the window when starting the app.\r
+ // Note3: Suspect the problem lies with line 30.\r
// ***********************************************************\r
\r
}\r
\r
private void btn_queue_Click(object sender, EventArgs e)\r
{\r
- String query = GenerateTheQuery();\r
- queueWindow.list_queue.Items.Add(query);\r
- queueWindow.Show();\r
+ if (text_destination.Text != "" && text_source.Text != "")\r
+ {\r
+\r
+ String query = GenerateTheQuery();\r
+ queueWindow.list_queue.Items.Add(query);\r
+ queueWindow.Show();\r
+ } \r
+ else \r
+ {\r
+ MessageBox.Show("No Source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+ }\r
}\r
\r
private void showQueue()\r
lbl_encode.Text = string.Format("Encode Progress: {0}%, FPS: {1}, Avg FPS: {2}, Time Remaining: {3} ", PercentComplete, CurrentFps, AverageFps, TimeRemaining);\r
}\r
\r
-\r
private void procMonitor(object state)\r
{\r
Functions.CLI process = new Functions.CLI();\r
// \r
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
- this.ClientSize = new System.Drawing.Size(651, 423);\r
+ this.ClientSize = new System.Drawing.Size(657, 406);\r
this.ControlBox = false;\r
this.Controls.Add(this.lbl_progressValue);\r
this.Controls.Add(this.label2);\r
this.Controls.Add(this.btn_Close);\r
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
- this.MinimumSize = new System.Drawing.Size(659, 431);\r
+ this.MaximumSize = new System.Drawing.Size(663, 431);\r
+ this.MinimumSize = new System.Drawing.Size(663, 431);\r
this.Name = "frmQueue";\r
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\r
this.Text = "Queue";\r
this.Label2 = new System.Windows.Forms.Label();\r
this.lbl_status = new System.Windows.Forms.Label();\r
this.lbl_progress = new System.Windows.Forms.Label();\r
+ this.btn_skip = new System.Windows.Forms.Button();\r
this.SuspendLayout();\r
// \r
// lbl_pressOk\r
this.btn_ok.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
this.btn_ok.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
this.btn_ok.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
- this.btn_ok.Location = new System.Drawing.Point(416, 45);\r
+ this.btn_ok.Location = new System.Drawing.Point(449, 56);\r
this.btn_ok.Name = "btn_ok";\r
this.btn_ok.Size = new System.Drawing.Size(71, 22);\r
this.btn_ok.TabIndex = 28;\r
this.lbl_progress.Text = "{ % }";\r
this.lbl_progress.Visible = false;\r
// \r
+ // btn_skip\r
+ // \r
+ this.btn_skip.BackColor = System.Drawing.SystemColors.Control;\r
+ this.btn_skip.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+ this.btn_skip.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+ this.btn_skip.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.btn_skip.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+ this.btn_skip.Location = new System.Drawing.Point(372, 56);\r
+ this.btn_skip.Name = "btn_skip";\r
+ this.btn_skip.Size = new System.Drawing.Size(71, 22);\r
+ this.btn_skip.TabIndex = 33;\r
+ this.btn_skip.TabStop = false;\r
+ this.btn_skip.Text = "Cancel";\r
+ this.btn_skip.UseVisualStyleBackColor = true;\r
+ this.btn_skip.Visible = false;\r
+ this.btn_skip.Click += new System.EventHandler(this.btn_skip_Click);\r
+ // \r
// frmReadDVD\r
// \r
this.AcceptButton = this.btn_ok;\r
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
- this.ClientSize = new System.Drawing.Size(499, 79);\r
+ this.ClientSize = new System.Drawing.Size(532, 88);\r
this.ControlBox = false;\r
+ this.Controls.Add(this.btn_skip);\r
this.Controls.Add(this.lbl_progress);\r
this.Controls.Add(this.lbl_status);\r
this.Controls.Add(this.lbl_pressOk);\r
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
this.MaximizeBox = false;\r
- this.MaximumSize = new System.Drawing.Size(505, 111);\r
- this.MinimumSize = new System.Drawing.Size(505, 111);\r
+ this.MaximumSize = new System.Drawing.Size(538, 113);\r
+ this.MinimumSize = new System.Drawing.Size(538, 113);\r
this.Name = "frmReadDVD";\r
this.ShowInTaskbar = false;\r
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\r
internal System.Windows.Forms.Label Label2;\r
internal System.Windows.Forms.Label lbl_status;\r
private System.Windows.Forms.Label lbl_progress;\r
+ internal System.Windows.Forms.Button btn_skip;\r
}\r
}
\ No newline at end of file
private void btn_ok_Click(object sender, EventArgs e)\r
{\r
btn_ok.Enabled = false;\r
+ btn_skip.Visible = true;\r
lbl_pressOk.Visible = false;\r
lbl_progress.Text = "0%";\r
lbl_progress.Visible = true;\r
readData.OnReadLine += dvdInfo.HandleParsedData;\r
readData.OnReadToEnd += dvdInfo.HandleParsedData;\r
hbProc.Close();\r
-\r
+ hbProc.Dispose();\r
+ \r
// Setup the parser\r
thisDvd = Parsing.DVD.Parse(readData);\r
\r
this.lbl_progress.Text = progress.ToString() + "%";\r
}\r
\r
+ private void btn_skip_Click(object sender, EventArgs e)\r
+ {\r
+ // TODO *****************************************************************\r
+ // This needs to be implimented so that is destroys the above thread\r
+ // closing hbcli with it.\r
+ //***********************************************************************\r
+ }\r
+\r
}\r
}
\ No newline at end of file