git hash wird angezeigt
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -260,3 +260,4 @@ paket-files/
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
/projekte/*
|
/projekte/*
|
||||||
|
/SanSystem/version.txt
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@@ -18,8 +19,17 @@ namespace SanSystem
|
|||||||
const string firmkey = "Cosysda";
|
const string firmkey = "Cosysda";
|
||||||
const string subkey = "SanManager";
|
const string subkey = "SanManager";
|
||||||
const string speicherpfad_to_projekts = "projekte";
|
const string speicherpfad_to_projekts = "projekte";
|
||||||
|
private readonly string programmversion = string.Empty;
|
||||||
|
|
||||||
string projektpfad = "18-850";
|
string projektpfad = "18-850";
|
||||||
|
|
||||||
|
public string PROGRAMMVERSION
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return programmversion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string ProjektNummer
|
public string ProjektNummer
|
||||||
{
|
{
|
||||||
@@ -103,6 +113,23 @@ namespace SanSystem
|
|||||||
public Global()
|
public Global()
|
||||||
{
|
{
|
||||||
LadeRegistry();
|
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()
|
~Global()
|
||||||
|
|||||||
@@ -322,13 +322,17 @@
|
|||||||
<Name>TempCAN</Name>
|
<Name>TempCAN</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="version.txt">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>git rev-parse HEAD > "$(ProjectDir)\version.txt"</PreBuildEvent>
|
||||||
</PreBuildEvent>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -55,11 +55,14 @@ namespace SanSystem
|
|||||||
öffnenToolStripMenuItem.Text = Global.Instance.language.Labels["mainmenu_projekt_open"];
|
öffnenToolStripMenuItem.Text = Global.Instance.language.Labels["mainmenu_projekt_open"];
|
||||||
|
|
||||||
toolStripStatus_projekt_Label.Text = Datenbank.Instance.projekt;
|
toolStripStatus_projekt_Label.Text = Datenbank.Instance.projekt;
|
||||||
|
this.Text += " " + Global.Instance.PROGRAMMVERSION;
|
||||||
#if (DEBUG || LAPTOP)
|
#if (DEBUG || LAPTOP)
|
||||||
this.Text += " INTERNE DEBUG VERSION";
|
this.Text += " INTERNE DEBUG VERSION";
|
||||||
#endif
|
#endif
|
||||||
if (Wupi.QueryInfo(0, QueryInfoOption.FirmCode) == 0)
|
if (Wupi.QueryInfo(0, QueryInfoOption.FirmCode) == 0)
|
||||||
this.Text += " nicht geschützter Version nur für TESTZWECKE!";
|
this.Text += " nicht geschützter Version nur für TESTZWECKE!";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user