summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-11-28 23:10:33 +0000
committersr55 <[email protected]>2009-11-28 23:10:33 +0000
commit115d524e223a0806b26027b5ed508c4d29081ed7 (patch)
tree23469616d17338b3732ea3161eb49b97147880e1 /win
parent38d0c1ea31a5cfc6c616ca99f4041bbd2320d5fd (diff)
WinGui:
- Some updates / fixes to the new Activity Window git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2989 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/frmActivityWindow.cs42
-rw-r--r--win/C#/frmMain.cs12
2 files changed, 38 insertions, 16 deletions
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index 9e261700f..f909abcd1 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -54,6 +54,7 @@ namespace Handbrake
{
_position = 0;
ClearWindowText();
+ PrintLogHeader();
}
// Perform the window update
@@ -96,6 +97,7 @@ namespace Handbrake
appendText.AppendFormat("Waiting for the log file to be generated ...\n");
_position = 0;
ClearWindowText();
+ PrintLogHeader();
return appendText;
}
@@ -165,19 +167,37 @@ namespace Handbrake
MessageBox.Show("ClearWindowText(): Exception: \n" + exc);
}
}
-
public void PrintLogHeader()
{
- // Print the log header. This function will be re-implimented later. Do not delete.
- rtf_actLog.AppendText(String.Format("### Windows GUI {1} {0} \n", Properties.Settings.Default.hb_build, Properties.Settings.Default.hb_version));
- rtf_actLog.AppendText(String.Format("### Running: {0} \n###\n", Environment.OSVersion));
- rtf_actLog.AppendText(String.Format("### CPU: {0} \n", getCpuCount()));
- rtf_actLog.AppendText(String.Format("### Ram: {0} MB \n", TotalPhysicalMemory()));
- rtf_actLog.AppendText(String.Format("### Screen: {0}x{1} \n", screenBounds().Bounds.Width, screenBounds().Bounds.Height));
- rtf_actLog.AppendText(String.Format("### Temp Dir: {0} \n", Path.GetTempPath()));
- rtf_actLog.AppendText(String.Format("### Install Dir: {0} \n", Application.StartupPath));
- rtf_actLog.AppendText(String.Format("### Data Dir: {0} \n", Application.UserAppDataPath));
- rtf_actLog.AppendText("#########################################\n\n");
+ try
+ {
+ if (IsHandleCreated)
+ {
+ if (rtf_actLog.InvokeRequired)
+ {
+ IAsyncResult invoked = BeginInvoke(new setTextClearCallback(PrintLogHeader));
+ EndInvoke(invoked);
+ }
+ else
+ {
+ // Print the log header. This function will be re-implimented later. Do not delete.
+ rtf_actLog.AppendText(String.Format("### Windows GUI {1} {0} \n", Properties.Settings.Default.hb_build, Properties.Settings.Default.hb_version));
+ rtf_actLog.AppendText(String.Format("### Running: {0} \n###\n", Environment.OSVersion));
+ rtf_actLog.AppendText(String.Format("### CPU: {0} \n", getCpuCount()));
+ rtf_actLog.AppendText(String.Format("### Ram: {0} MB \n", TotalPhysicalMemory()));
+ rtf_actLog.AppendText(String.Format("### Screen: {0}x{1} \n", screenBounds().Bounds.Width, screenBounds().Bounds.Height));
+ rtf_actLog.AppendText(String.Format("### Temp Dir: {0} \n", Path.GetTempPath()));
+ rtf_actLog.AppendText(String.Format("### Install Dir: {0} \n", Application.StartupPath));
+ rtf_actLog.AppendText(String.Format("### Data Dir: {0} \n", Application.UserAppDataPath));
+ rtf_actLog.AppendText("#########################################\n\n");
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ MessageBox.Show("PrintLogHeader(): Exception: \n" + exc);
+ }
+
}
#region Public
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 9763ddd3e..d74d8ef08 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -737,11 +737,10 @@ namespace Handbrake
setEncodeStarted(); // Encode is running, so setup the GUI appropriately
encodeQueue.StartEncodeQueue(); // Start The Queue Encoding Process
lastAction = "encode"; // Set the last action to encode - Used for activity window.
-
- if (ActivityWindow != null)
- ActivityWindow.SetEncodeMode();
-
}
+ if (ActivityWindow != null)
+ ActivityWindow.SetEncodeMode();
+
this.Focus();
}
else if (string.IsNullOrEmpty(sourcePath) || string.IsNullOrEmpty(text_destination.Text))
@@ -1434,6 +1433,9 @@ namespace Handbrake
tb_preview.Enabled = false;
mnu_killCLI.Visible = true;
+ if (ActivityWindow != null)
+ ActivityWindow.SetScanMode();
+
// Start the Scan
try
{
@@ -1548,7 +1550,7 @@ namespace Handbrake
SourceScan.ScanCompleted -= new EventHandler(SourceScan_ScanCompleted);
EnableGUI();
ResetGUI();
-
+
if (SourceScan.ScanProcess() != null)
SourceScan.ScanProcess().Kill();