Skip to content

Commit 40aeaf0

Browse files
committed
ScadaAdmin: fix app version
1 parent 940a424 commit 40aeaf0

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

ScadaAdmin/ScadaAdmin/ScadaAdmin/Code/AppUtils.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2019
23-
* Modified : 2023
23+
* Modified : 2024
2424
*/
2525

26+
using System.Reflection;
27+
2628
namespace Scada.Admin.App.Code
2729
{
2830
/// <summary>
@@ -31,6 +33,10 @@ namespace Scada.Admin.App.Code
3133
/// </summary>
3234
internal static class AppUtils
3335
{
36+
/// <summary>
37+
/// The application version.
38+
/// </summary>
39+
public static readonly string AppVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
3440
/// <summary>
3541
/// The hyperlink to the documentation.
3642
/// </summary>

ScadaAdmin/ScadaAdmin/ScadaAdmin/Forms/FrmAbout.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2010
23-
* Modified : 2021
23+
* Modified : 2024
2424
*/
2525

2626
using Scada.Admin.App.Code;
@@ -80,14 +80,14 @@ private void Init()
8080
activePictureBox = pbAboutRu;
8181
pbAboutEn.Visible = false;
8282
lblVersionEn.Visible = false;
83-
lblVersionRu.Text = "Версия " + AdminUtils.AppVersion;
83+
lblVersionRu.Text = "Версия " + AppUtils.AppVersion;
8484
}
8585
else
8686
{
8787
activePictureBox = pbAboutEn;
8888
pbAboutRu.Visible = false;
8989
lblVersionRu.Visible = false;
90-
lblVersionEn.Text = "Version " + AdminUtils.AppVersion;
90+
lblVersionEn.Text = "Version " + AppUtils.AppVersion;
9191
}
9292

9393
// load image and hyperlink from files if the files exist

ScadaAdmin/ScadaAdmin/ScadaAdminCommon/AdminUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* Author : Mikhail Shiryaev
2222
* Created : 2018
23-
* Modified : 2022
23+
* Modified : 2024
2424
*/
2525

2626
using System.Reflection;
@@ -34,9 +34,9 @@ namespace Scada.Admin
3434
public static class AdminUtils
3535
{
3636
/// <summary>
37-
/// The application version.
37+
/// The basic version of the application.
3838
/// </summary>
39-
public static readonly string AppVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
39+
public static readonly string BasicVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
4040
/// <summary>
4141
/// The application log file name.
4242
/// </summary>

ScadaAdmin/ScadaAdmin/ScadaAdminCommon/Project/ScadaProject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public void Save(string fileName)
249249
xmlDoc.AppendChild(xmlDecl);
250250

251251
XmlElement rootElem = xmlDoc.CreateElement("ScadaProject");
252-
rootElem.AppendElem("AdminVersion", AdminUtils.AppVersion);
252+
rootElem.AppendElem("AdminVersion", AdminUtils.BasicVersion);
253253
rootElem.AppendElem("ProjectVersion", Version);
254254
rootElem.AppendElem("Description", Description);
255255
xmlDoc.AppendChild(rootElem);

0 commit comments

Comments
 (0)