Skip to content

Commit

Permalink
Merge branch 'master' into feature/sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Riley McArdle committed Jun 2, 2011
2 parents 5d0040a + 127e7cc commit aa4a8ca
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
24 changes: 22 additions & 2 deletions mRemoteV1/App/App.Runtime.vb
Expand Up @@ -4,6 +4,7 @@ Imports Crownwood
Imports System.Threading
Imports System.Xml
Imports System.Environment
Imports System.Management

Namespace App
Public Class Runtime
Expand Down Expand Up @@ -148,7 +149,7 @@ Namespace App

Public Shared Sub ShowUpdatesTab()
Windows.optionsForm = New frmOptions(Windows.optionsPanel)
Windows.optionsForm.Show(frmMain.pnlDock, 4)
Windows.optionsForm.Show(frmMain.pnlDock, 5)
End Sub
End Class

Expand Down Expand Up @@ -247,8 +248,27 @@ Namespace App

Public Shared Sub CreateLogger()
log4net.Config.XmlConfigurator.Configure(New FileInfo("mRemoteNG.exe.config"))

log = log4net.LogManager.GetLogger("mRemoteNG.Log")
Try
Dim servicePack As Integer
For Each managementObject As ManagementObject In New ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem").Get()
servicePack = managementObject.GetPropertyValue("ServicePackMajorVersion")
If servicePack = 0 Then
log.InfoFormat("{0} {1}", managementObject.GetPropertyValue("Caption").Trim, managementObject.GetPropertyValue("OSArchitecture"))
Else
log.InfoFormat("{0} Service Pack {1} {2}", managementObject.GetPropertyValue("Caption").Trim, servicePack.ToString, managementObject.GetPropertyValue("OSArchitecture"))
End If
Next
Catch ex As Exception
log.WarnFormat("Error retrieving operating system information from WMI. {0}", ex.Message)
End Try
log.InfoFormat("Microsoft .NET Framework {0}", System.Environment.Version.ToString)
#If Not PORTABLE Then
log.InfoFormat("{0} {1}", My.Application.Info.ProductName.ToString, My.Application.Info.Version.ToString)
#Else
log.InfoFormat("{0} {1} {2}", My.Application.Info.ProductName.ToString, My.Application.Info.Version.ToString, My.Resources.strLabelPortableEdition)
#End If
log.InfoFormat("System Culture: {0}/{1}", Threading.Thread.CurrentThread.CurrentUICulture.Name, Threading.Thread.CurrentThread.CurrentUICulture.NativeName)
End Sub

Public Shared Sub UpdateCheck()
Expand Down
1 change: 1 addition & 0 deletions mRemoteV1/Config/Config.Settings.Load.vb
Expand Up @@ -41,6 +41,7 @@ Namespace Config
App.SupportedCultures.InstantiateSingleton()
If Not My.Settings.OverrideUICulture = "" And App.SupportedCultures.IsNameSupported(My.Settings.OverrideUICulture) Then
Threading.Thread.CurrentThread.CurrentUICulture = New Globalization.CultureInfo(My.Settings.OverrideUICulture)
log.InfoFormat("Override Culture: {0}/{1}", Threading.Thread.CurrentThread.CurrentUICulture.Name, Threading.Thread.CurrentThread.CurrentUICulture.NativeName)
End If

.WindowState = FormWindowState.Normal
Expand Down
1 change: 1 addition & 0 deletions mRemoteV1/mRemoteV1.vbproj
Expand Up @@ -138,6 +138,7 @@
<Reference Include="System.Data" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Drawing" />
<Reference Include="System.Management" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
Expand Down

0 comments on commit aa4a8ca

Please sign in to comment.