remove unnecessary converts

This commit is contained in:
Sean Kaim
2017-09-18 17:37:04 -04:00
parent a1e9aefeb2
commit 8a3e37041a
2 changed files with 7 additions and 7 deletions

View File

@@ -283,7 +283,7 @@ namespace mRemoteNG.App
connectionsLoader.ConnectionFileName = GetStartupConnectionFileName();
}
CreateBackupFile(Convert.ToString(connectionsLoader.ConnectionFileName));
CreateBackupFile(connectionsLoader.ConnectionFileName);
}
connectionsLoader.UseDatabase = Settings.Default.UseSQLServer;
@@ -334,7 +334,7 @@ namespace mRemoteNG.App
if (ex is FileNotFoundException && !withDialog)
{
MessageCollector.AddExceptionMessage(string.Format(Language.strConnectionsFileCouldNotBeLoadedNew, connectionsLoader.ConnectionFileName), ex, MessageClass.InformationMsg);
NewConnections(Convert.ToString(connectionsLoader.ConnectionFileName));
NewConnections(connectionsLoader.ConnectionFileName);
return;
}
@@ -465,11 +465,11 @@ namespace mRemoteNG.App
if (Settings.Default.UseSQLServer)
{
connectionsSaver.SaveFormat = ConnectionsSaver.Format.SQL;
connectionsSaver.SQLHost = Convert.ToString(Settings.Default.SQLHost);
connectionsSaver.SQLDatabaseName = Convert.ToString(Settings.Default.SQLDatabaseName);
connectionsSaver.SQLUsername = Convert.ToString(Settings.Default.SQLUser);
connectionsSaver.SQLHost = Settings.Default.SQLHost;
connectionsSaver.SQLDatabaseName = Settings.Default.SQLDatabaseName;
connectionsSaver.SQLUsername = Settings.Default.SQLUser;
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
connectionsSaver.SQLPassword = cryptographyProvider.Decrypt(Convert.ToString(Settings.Default.SQLPass), EncryptionKey);
connectionsSaver.SQLPassword = cryptographyProvider.Decrypt(Settings.Default.SQLUser, EncryptionKey);
}
connectionsSaver.SaveConnections();

View File

@@ -74,7 +74,7 @@ namespace mRemoteNG.App
{
var osData = GetOperatingSystemData();
var architecture = GetArchitectureData();
Logger.Instance.InfoFormat(string.Join(" ", Array.FindAll(new[] { osData, architecture }, s => !string.IsNullOrEmpty(Convert.ToString(s)))));
Logger.Instance.InfoFormat(string.Join(" ", Array.FindAll(new[] { osData, architecture }, s => !string.IsNullOrEmpty(s))));
}
private static string GetOperatingSystemData()