Programmversion anzeige verbessert

This commit is contained in:
HuskyTeufel
2020-01-23 13:58:30 +01:00
parent 0030808d65
commit f988c6b5fa
2 changed files with 14 additions and 17 deletions

View File

@@ -27,7 +27,16 @@ namespace SanSystem
{
get
{
return programmversion;
string version = string.Empty;
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SanSystem." + "version.txt"))
{
using (StreamReader reader = new StreamReader(stream))
{
version = reader.ReadToEnd();
}
}
return version;
}
}
@@ -113,23 +122,7 @@ namespace SanSystem
public Global()
{
LadeRegistry();
programmversion = ReadProgrammVersion();
}
private string ReadProgrammVersion()
{
// Nachfolgend zeigt alle resources an
//string[] resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames();
string version = string.Empty;
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SanSystem." + "version.txt"))
{
using (StreamReader reader = new StreamReader(stream))
{
version = reader.ReadToEnd();
}
}
return version;
}
~Global()