diff options
author | sr55 <[email protected]> | 2009-12-02 15:49:28 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-12-02 15:49:28 +0000 |
commit | 66d4d14b4af4ffbc02c4ee121022f719ab3d98cc (patch) | |
tree | 7dfe033fc630491222c4d09dcd0ec5f4ea46c3d5 /win/C#/frmActivityWindow.cs | |
parent | 59c73a20b4b39cfe984f2a2baac9e7f5f00791b1 (diff) |
WinGui:
- Make sure the Activity window resets correctly on action or source change.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2998 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmActivityWindow.cs')
-rw-r--r-- | win/C#/frmActivityWindow.cs | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs index 6b1ffee98..61d1b06ca 100644 --- a/win/C#/frmActivityWindow.cs +++ b/win/C#/frmActivityWindow.cs @@ -10,7 +10,6 @@ using System.Text; using System.Windows.Forms;
using System.IO;
using System.Threading;
-using Handbrake.EncodeQueue;
using Handbrake.Functions;
using Microsoft.Win32;
@@ -29,6 +28,8 @@ namespace Handbrake public frmActivityWindow(string mode)
{
+ kilLThread = false;
+ _position = 0;
if (mode == "scan")
SetScanMode();
else
@@ -39,9 +40,7 @@ namespace Handbrake private void NewActivityWindow_Load(object sender, EventArgs e)
{
monitor = new Thread(LogMonitor);
- _position = 0;
- kilLThread = false;
-
+
try
{
monitor.Start();
@@ -62,11 +61,7 @@ namespace Handbrake // Perform a reset if require.
// If we have switched to a different log file, we want to start from the beginning.
if (SetLogFile != _lastMode)
- {
- _position = 0;
- ClearWindowText();
- PrintLogHeader();
- }
+ Reset();
// Perform the window update
switch (SetLogFile)
@@ -189,7 +184,7 @@ namespace Handbrake MessageBox.Show("ClearWindowText(): Exception: \n" + exc);
}
}
- public void PrintLogHeader()
+ private void PrintLogHeader()
{
try
{
@@ -221,6 +216,12 @@ namespace Handbrake }
}
+ private void Reset()
+ {
+ _position = 0;
+ ClearWindowText();
+ PrintLogHeader();
+ }
#region Public
@@ -231,11 +232,13 @@ namespace Handbrake }
public void SetScanMode()
{
+ Reset();
SetLogFile = "last_scan_log.txt";
this.Text = "Activity Window (Scan Log)";
}
public void SetEncodeMode()
{
+ Reset();
SetLogFile = "last_encode_log.txt";
this.Text = "Activity Window (Enocde Log)";
}
|