MainWindow Viewmodel erstellt

This commit is contained in:
Husky
2020-02-22 19:54:08 +01:00
parent 169cfb9830
commit ba431a8fba
10 changed files with 128 additions and 20 deletions

View File

@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace KanSan.ViewModel
{
class BaustellenListViewModel
{
}
}

View File

@@ -4,8 +4,22 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<None Remove="version.txt" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="version.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KanSan.Base\KanSan.Base.csproj" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="git rev-parse HEAD &gt;&quot;$(ProjectDir)\version.txt" />
</Target>
</Project>

View File

@@ -0,0 +1,44 @@
using KanSan.Base.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
namespace KanSan.ViewModel
{
public class MainWindowViewModel
{
private Kunde _selectedKunde;
private string applicationTitle;
public string ApplicationTitle
{
get
{
string gitVersion;
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("KanSan.ViewModel.version.txt"))
using (StreamReader reader = new StreamReader(stream))
{
gitVersion = reader.ReadToEnd();
}
return gitVersion;
}
}
public Kunde SelectedKunde
{
get
{
return _selectedKunde;
}
}
public MainWindowViewModel()
{
}
}
}

View File

@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace KanSan.ViewModel
{
public class ProjektListViewModel
{
}
}