- // Print the log header. This function will be re-implimented later. Do not delete.\r
- rtf_actLog.AppendText(String.Format("### Windows GUI {1} {0} \n", Properties.Settings.Default.hb_build, Properties.Settings.Default.hb_version));\r
- rtf_actLog.AppendText(String.Format("### Running: {0} \n###\n", Environment.OSVersion));\r
- rtf_actLog.AppendText(String.Format("### CPU: {0} \n", getCpuCount()));\r
- rtf_actLog.AppendText(String.Format("### Ram: {0} MB \n", TotalPhysicalMemory()));\r
- rtf_actLog.AppendText(String.Format("### Screen: {0}x{1} \n", screenBounds().Bounds.Width, screenBounds().Bounds.Height));\r
- rtf_actLog.AppendText(String.Format("### Temp Dir: {0} \n", Path.GetTempPath()));\r
- rtf_actLog.AppendText(String.Format("### Install Dir: {0} \n", Application.StartupPath));\r
- rtf_actLog.AppendText(String.Format("### Data Dir: {0} \n", Application.UserAppDataPath));\r
- rtf_actLog.AppendText("#########################################\n\n");\r
+ lock (rtf_actLog)\r
+ {\r
+ // Print the log header. This function will be re-implimented later. Do not delete.\r
+ StringBuilder header = new StringBuilder();\r
+\r
+ header.Append(String.Format("### Windows GUI {1} {0} \n", Properties.Settings.Default.hb_build, Properties.Settings.Default.hb_version));\r
+ header.Append(String.Format("### Running: {0} \n###\n", Environment.OSVersion));\r
+ header.Append(String.Format("### CPU: {0} \n", SystemInfo.GetCpuCount));\r
+ header.Append(String.Format("### Ram: {0} MB \n", SystemInfo.TotalPhysicalMemory));\r
+ header.Append(String.Format("### Screen: {0}x{1} \n", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height));\r
+ header.Append(String.Format("### Temp Dir: {0} \n", Path.GetTempPath()));\r
+ header.Append(String.Format("### Install Dir: {0} \n", Application.StartupPath));\r
+ header.Append(String.Format("### Data Dir: {0} \n", Application.UserAppDataPath));\r
+ header.Append("#########################################\n\n");\r
+\r
+ rtf_actLog.AppendText(header.ToString());\r
+ }\r