git hash wird angezeigt

This commit is contained in:
Husky
2019-06-03 21:12:30 +02:00
parent b1d352b804
commit 04f779286c
4 changed files with 38 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -18,8 +19,17 @@ namespace SanSystem
const string firmkey = "Cosysda";
const string subkey = "SanManager";
const string speicherpfad_to_projekts = "projekte";
private readonly string programmversion = string.Empty;
string projektpfad = "18-850";
public string PROGRAMMVERSION
{
get
{
return programmversion;
}
}
public string ProjektNummer
{
@@ -103,6 +113,23 @@ 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()