summaryrefslogtreecommitdiffstats
path: root/win/C#/frmActivityWindow.cs
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/C#/frmActivityWindow.cs
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/C#/frmActivityWindow.cs')
-rw-r--r--win/C#/frmActivityWindow.cs42
1 files changed, 31 insertions, 11 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