Correct errors for non-portable build

This commit is contained in:
Kaim, Sean M
2016-04-29 12:22:19 -04:00
parent 8a601b4d00
commit 63e0cd198c
2 changed files with 7 additions and 7 deletions

View File

@@ -716,13 +716,13 @@ namespace mRemoteNG.App
public static string GetDefaultStartupConnectionFileName()
{
string newPath = App.Info.ConnectionsFileInfo.DefaultConnectionsPath + "\\" + Info.ConnectionsFileInfo.DefaultConnectionsFile;
#if !PORTABLE
string oldPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData) + "\\" + (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName + "\\" + Info.Connections.DefaultConnectionsFile;
#if !PORTABLE
string oldPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData) + "\\" + (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName + "\\" + App.Info.ConnectionsFileInfo.DefaultConnectionsFile;
if (File.Exists(oldPath))
{
return oldPath;
}
#endif
#endif
return newPath;
}

View File

@@ -220,11 +220,11 @@ namespace mRemoteNG.App
}
private static void LogApplicationData()
{
#if !PORTABLE
Log.InfoFormat("{0} {1} starting.", System.Windows.Forms.Application.ProductName, System.Windows.Forms.Application.ProductVersion);
#else
#if !PORTABLE
Runtime.Log.InfoFormat("{0} {1} starting.", System.Windows.Forms.Application.ProductName, System.Windows.Forms.Application.ProductVersion);
#else
Runtime.Log.InfoFormat("{0} {1} {2} starting.", System.Windows.Forms.Application.ProductName, System.Windows.Forms.Application.ProductVersion, My.Language.strLabelPortableEdition);
#endif
#endif
}
private static void LogCmdLineArgs()
{