Automatic version string

This commit is contained in:
MaddoScientisto 2024-10-14 19:57:24 +02:00
commit 62b6e586ed

View file

@ -5,6 +5,7 @@ using System.Drawing;
using System.Drawing.Text; using System.Drawing.Text;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -39,6 +40,9 @@ namespace ImageCatalog
_Button6.Name = "Button6"; _Button6.Name = "Button6";
_btnCreaCatalogoAsync.Name = "btnCreaCatalogoAsync"; _btnCreaCatalogoAsync.Name = "btnCreaCatalogoAsync";
var version = Assembly.GetExecutingAssembly().GetName().Version;
_Label27.Text = $"Version: {version.Major}.{version.Minor}.{version.Build}";
_results = new ConcurrentBag<string>(); _results = new ConcurrentBag<string>();
UiUpdateEvent += OnUiUpdateEvent; UiUpdateEvent += OnUiUpdateEvent;
@ -875,7 +879,7 @@ namespace ImageCatalog
{ {
if (ProgressBar1.InvokeRequired) if (ProgressBar1.InvokeRequired)
{ {
ProgressBar1.Invoke(new MethodInvoker(ProgressBar1.PerformStep)); ProgressBar1.Invoke(new System.Windows.Forms.MethodInvoker(ProgressBar1.PerformStep));
} }
else else
{ {