mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Code cleanup of GeneralAppInfo (mostly just renames)
This commit is contained in:
@@ -20,7 +20,7 @@ namespace mRemoteNG.App
|
||||
{
|
||||
if (FipsPolicyEnabledForServer2003() || FipsPolicyEnabledForServer2008AndNewer())
|
||||
{
|
||||
MessageBox.Show(frmMain.Default, string.Format(Language.strErrorFipsPolicyIncompatible, GeneralAppInfo.ProdName, GeneralAppInfo.ProdName, MessageBoxButtons.OK, MessageBoxIcon.Error));
|
||||
MessageBox.Show(frmMain.Default, string.Format(Language.strErrorFipsPolicyIncompatible, GeneralAppInfo.ProductName, GeneralAppInfo.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error));
|
||||
Environment.Exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@ namespace mRemoteNG.App.Info
|
||||
public static readonly string UrlDonate = "http://donate.mremoteng.org/";
|
||||
public static readonly string UrlForum = "http://forum.mremoteng.org/";
|
||||
public static readonly string UrlBugs = "http://bugs.mremoteng.org/";
|
||||
public static readonly string version = Application.ProductVersion;
|
||||
public static readonly string ProdName = Application.ProductName;
|
||||
public static readonly string copyright = ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCopyrightAttribute), false)).Copyright;
|
||||
public static readonly string ApplicationVersion = Application.ProductVersion;
|
||||
public static readonly string ProductName = Application.ProductName;
|
||||
public static readonly string Copyright = ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCopyrightAttribute), false)).Copyright;
|
||||
public static readonly string HomePath = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
|
||||
public static string ReportingFilePath = "";
|
||||
public static readonly string PuttyPath = HomePath + "\\PuTTYNG.exe";
|
||||
@@ -36,14 +36,14 @@ namespace mRemoteNG.App.Info
|
||||
details.Add($".NET CLR {Environment.Version}");
|
||||
var detailsString = string.Join("; ", details.ToArray());
|
||||
|
||||
return $"Mozilla/5.0 ({detailsString}) {ProdName}/{version}";
|
||||
return $"Mozilla/5.0 ({detailsString}) {ProductName}/{ApplicationVersion}";
|
||||
}
|
||||
}
|
||||
|
||||
public static Version getVer()
|
||||
public static Version GetApplicationVersion()
|
||||
{
|
||||
Version v;
|
||||
System.Version.TryParse(version, out v);
|
||||
System.Version.TryParse(ApplicationVersion, out v);
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace mRemoteNG.App.Update
|
||||
return false;
|
||||
}
|
||||
|
||||
return _currentUpdateInfo.Version > GeneralAppInfo.getVer();
|
||||
return _currentUpdateInfo.Version > GeneralAppInfo.GetApplicationVersion();
|
||||
}
|
||||
|
||||
public bool IsAnnouncementAvailable()
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace mRemoteNG.Config.Connections
|
||||
isVerified = true;
|
||||
|
||||
if (isVerified == false)
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, string.Format(Language.strErrorBadDatabaseVersion, databaseVersion, GeneralAppInfo.ProdName));
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, string.Format(Language.strErrorBadDatabaseVersion, databaseVersion, GeneralAppInfo.ProductName));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace mRemoteNG.Config.Settings
|
||||
|
||||
public void LoadExternalAppsFromXML()
|
||||
{
|
||||
string oldPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\" + GeneralAppInfo.ProdName + "\\" + SettingsFileInfo.ExtAppsFilesName;
|
||||
string oldPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\" + GeneralAppInfo.ProductName + "\\" + SettingsFileInfo.ExtAppsFilesName;
|
||||
string newPath = SettingsFileInfo.SettingsPath + "\\" + SettingsFileInfo.ExtAppsFilesName;
|
||||
XmlDocument xDom = new XmlDocument();
|
||||
if (File.Exists(newPath))
|
||||
|
||||
@@ -287,9 +287,9 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
try
|
||||
{
|
||||
lblCopyright.Text = GeneralAppInfo.copyright;
|
||||
lblCopyright.Text = GeneralAppInfo.Copyright;
|
||||
|
||||
lblVersion.Text = @"Version " + GeneralAppInfo.version;
|
||||
lblVersion.Text = @"Version " + GeneralAppInfo.ApplicationVersion;
|
||||
|
||||
if (File.Exists(GeneralAppInfo.HomePath + "\\CHANGELOG.TXT"))
|
||||
{
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace mRemoteNG.UI.Window
|
||||
((Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.All & TabController.TabPages.Count > 0) ||
|
||||
(Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.Multiple & TabController.TabPages.Count > 1)))
|
||||
{
|
||||
var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProdName, string.Format(Language.strConfirmCloseConnectionPanelMainInstruction, Text), "", "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.YesNo, ESysIcons.Question, ESysIcons.Question);
|
||||
var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProductName, string.Format(Language.strConfirmCloseConnectionPanelMainInstruction, Text), "", "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.YesNo, ESysIcons.Question, ESysIcons.Question);
|
||||
if (CTaskDialog.VerificationChecked)
|
||||
{
|
||||
Settings.Default.ConfirmCloseConnection--;
|
||||
@@ -285,7 +285,7 @@ namespace mRemoteNG.UI.Window
|
||||
if (selectedTab == null) return;
|
||||
if (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.All)
|
||||
{
|
||||
var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProdName, string.Format(Language.strConfirmCloseConnectionMainInstruction, selectedTab.Title), "", "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.YesNo, ESysIcons.Question, ESysIcons.Question);
|
||||
var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProductName, string.Format(Language.strConfirmCloseConnectionMainInstruction, selectedTab.Title), "", "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.YesNo, ESysIcons.Question, ESysIcons.Question);
|
||||
if (CTaskDialog.VerificationChecked)
|
||||
{
|
||||
Settings.Default.ConfirmCloseConnection--;
|
||||
|
||||
Reference in New Issue
Block a user