+\r
+ this.mainWindow = mw;\r
+\r
+ this.queue = q;\r
+ queue.EncodeStarted += new EventHandler(QueueOnEncodeStart);\r
+ queue.QueueCompleted += new EventHandler(QueueOnQueueFinished);\r
+ queue.QueuePauseRequested += new EventHandler(QueueOnPaused);\r
+ }\r
+\r
+ private void QueueOnPaused(object sender, EventArgs e)\r
+ {\r
+ SetUIEncodeFinished();\r
+ UpdateUIElements();\r
+ }\r
+\r
+ private void QueueOnQueueFinished(object sender, EventArgs e)\r
+ {\r
+ SetUIEncodeFinished();\r
+ ResetQueue(); // Reset the Queue Window\r
+ }\r
+\r
+ private void QueueOnEncodeStart(object sender, EventArgs e)\r
+ {\r
+ SetUIEncodeStarted(); // make sure the UI is set correctly\r
+ SetCurrentEncodeInformation();\r
+ UpdateUIElements(); // Redraw the Queue, a new encode has started.\r