14 Commits

Author SHA1 Message Date
HuskyTeufel
bbb2c45eff Viewmodel projekt entfernt 2022-03-31 14:45:18 +02:00
HuskyTeufel
c2228e2321 Merge pull request 'convertViewModel_to_WPF' (#3) from convertViewModel_to_WPF into fotodokumentation
Reviewed-on: https://git.cosysda.de/Cosysda/DaSaSo/pulls/3
2022-03-30 15:19:00 +02:00
HuskyTeufel
5662502d5e Navigationbar war auskommentiert. 2022-03-30 15:17:30 +02:00
HuskyTeufel
ecda2ab44f Git version wird richtig geparsed 2022-03-30 15:16:36 +02:00
HuskyTeufel
06cb2572ff Programm compiliert nun
jedoch scheint ein fehler mit der git-version zu geben
2022-03-30 15:01:32 +02:00
HuskyTeufel
1bf0c3b615 viewmodel ins wpf gepackt, build failed 2022-03-30 14:59:12 +02:00
HuskyTeufel
f34f4517ca Fotodokumentation domain hinzugefügt zur EF 2022-03-30 14:19:03 +02:00
HuskyTeufel
f59fc036d1 Merge branch 'fotodokumentation' of https://git.cosysda.de/Cosysda/DaSaSo into fotodokumentation 2022-03-30 13:23:44 +02:00
HuskyTeufel
bb2d7be54e Fotodokumentation hinzugefügt 2022-03-30 13:23:13 +02:00
HuskyTeufel
acc577eb32 Imprägnierungen edit
Edit button erst verfügbar wenn ein Imprägnierung ausgewählt wurde
2022-03-30 13:22:57 +02:00
HuskyTeufel
9a24a4a7cd Fotodokumentation hinzugefügt 2021-11-29 10:34:29 +01:00
HuskyTeufel
4689f2e4da Client aus Registry entfernt 2021-11-29 10:22:51 +01:00
HuskyTeufel
f903da3af7 Merge branch 'ClientsNotDomain' 2021-11-29 10:08:16 +01:00
HuskyTeufel
49f9b6c496 Nuget packete geupdated 2021-11-29 10:08:07 +01:00
97 changed files with 776 additions and 256 deletions

1
.gitignore vendored
View File

@@ -18,3 +18,4 @@ project.fragment.lock.json
*.tmp *.tmp
/DaSaSo.InMemoryProvider/obj/Debug/* /DaSaSo.InMemoryProvider/obj/Debug/*
/DaSaSo.ViewModel/version.txt /DaSaSo.ViewModel/version.txt
/DaSaSo.Wpf/version.txt

View File

@@ -5,6 +5,7 @@
SewerStammdaten, SewerStammdaten,
SewerDamageList, SewerDamageList,
SewerDamageEdit, SewerDamageEdit,
SewerPipeLiner SewerPipeLiner,
SewerPictureDocumentation
} }
} }

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DaSaSo.Domain.Model
{
public class PhotoDocumentation : DomainObject
{
public string PicturePath { get; set; }
public string Description { get; set; }
}
}

View File

@@ -6,13 +6,13 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0-rc.1.21452.10" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0-rc.1.21452.10" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.21452.10"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0-rc.1" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -28,6 +28,7 @@ namespace DaSaSo.EntityFramework
public DbSet<PipeLiner>? PipeLiners { get; set; } public DbSet<PipeLiner>? PipeLiners { get; set; }
public DbSet<Impregnation>? Impregnations { get; set; } public DbSet<Impregnation>? Impregnations { get; set; }
public DbSet<SewerPoint>? SewerPoints { get; set; } public DbSet<SewerPoint>? SewerPoints { get; set; }
public DbSet<PhotoDocumentation>? PhotoDocumentation { get; set;}
} }
} }

View File

@@ -0,0 +1,405 @@
// <auto-generated />
using System;
using DaSaSo.EntityFramework;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DaSaSo.EntityFramework.Migrations
{
[DbContext(typeof(DaSaSoDbContext))]
[Migration("20220330120614_PhotoDocumentation_Added")]
partial class PhotoDocumentation_Added
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("BuildingSiteNumber")
.HasColumnType("text");
b.Property<int?>("ClientId")
.HasColumnType("integer");
b.Property<string>("ContactPerson")
.HasColumnType("text");
b.Property<string>("Country")
.HasColumnType("text");
b.Property<int?>("ProjectId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ClientId");
b.HasIndex("ProjectId");
b.ToTable("Buildingsites");
});
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Country")
.HasColumnType("text");
b.Property<string>("Firstname")
.HasColumnType("text");
b.Property<string>("LastName")
.HasColumnType("text");
b.Property<string>("Postcode")
.HasColumnType("text");
b.Property<string>("Street")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Clients");
});
modelBuilder.Entity("DaSaSo.Domain.Model.Impregnation", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DN")
.HasColumnType("integer");
b.Property<DateOnly>("Date")
.HasColumnType("date");
b.Property<bool>("IsAvaible")
.HasColumnType("boolean");
b.Property<string>("LinerNumber")
.HasColumnType("text");
b.Property<decimal>("Linerlength")
.HasColumnType("numeric");
b.Property<string>("Number")
.HasColumnType("text");
b.Property<decimal>("WallThickness")
.HasColumnType("numeric");
b.HasKey("Id");
b.ToTable("Impregnations");
});
modelBuilder.Entity("DaSaSo.Domain.Model.PhotoDocumentation", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("PicturePath")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("PhotoDocumentation");
});
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool>("ClosedEnd")
.HasColumnType("boolean");
b.Property<DateOnly>("Date")
.HasColumnType("date");
b.Property<int?>("ImpregnationId")
.HasColumnType("integer");
b.Property<decimal>("InversionPressure")
.HasColumnType("numeric");
b.Property<decimal>("LinerLength")
.HasColumnType("numeric");
b.Property<string>("Operator")
.HasColumnType("text");
b.Property<bool>("Preliner")
.HasColumnType("boolean");
b.Property<int>("PreparationType")
.HasColumnType("integer");
b.Property<decimal>("TemperaturAssembly")
.HasColumnType("numeric");
b.Property<decimal>("TemperaturStorage")
.HasColumnType("numeric");
b.Property<decimal>("TemperatureOutdoors")
.HasColumnType("numeric");
b.Property<decimal>("TemperatureSewer")
.HasColumnType("numeric");
b.Property<string>("Weather")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ImpregnationId");
b.ToTable("PipeLiners");
});
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.HasColumnType("text");
b.Property<string>("Projektnummer")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Projects");
});
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DamageType")
.HasColumnType("integer");
b.Property<decimal>("Distance")
.HasColumnType("numeric");
b.Property<int?>("SewerObjectId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("SewerObjectId");
b.ToTable("SewerDamages");
});
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int?>("BuildingSiteId")
.HasColumnType("integer");
b.Property<bool>("BuildingsiteBarier")
.HasColumnType("boolean");
b.Property<int>("DN")
.HasColumnType("integer");
b.Property<string>("Hausnummer")
.HasColumnType("text");
b.Property<string>("Material")
.HasColumnType("text");
b.Property<string>("ObjektName")
.HasColumnType("text");
b.Property<bool>("PermitNeeded")
.HasColumnType("boolean");
b.Property<int?>("PipeLinerId")
.HasColumnType("integer");
b.Property<int?>("PunktObenId")
.HasColumnType("integer");
b.Property<int>("PunktObenType")
.HasColumnType("integer");
b.Property<int?>("PunktUntenId")
.HasColumnType("integer");
b.Property<int>("PunktUntenType")
.HasColumnType("integer");
b.Property<string>("SanNummer")
.HasColumnType("text");
b.Property<bool>("SewerActivated")
.HasColumnType("boolean");
b.Property<bool>("SewerCleaned")
.HasColumnType("boolean");
b.Property<decimal>("SewerLength")
.HasColumnType("numeric");
b.Property<string>("StreetName")
.HasColumnType("text");
b.Property<bool>("WaterBarrier")
.HasColumnType("boolean");
b.HasKey("Id");
b.HasIndex("BuildingSiteId");
b.HasIndex("PipeLinerId");
b.HasIndex("PunktObenId");
b.HasIndex("PunktUntenId");
b.ToTable("SewerObjects");
});
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Objektnummer")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("SewerPoints");
});
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
{
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
.WithMany()
.HasForeignKey("ClientId");
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
.WithMany("BuildingSites")
.HasForeignKey("ProjectId");
b.Navigation("Client");
b.Navigation("Project");
});
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
{
b.HasOne("DaSaSo.Domain.Model.Impregnation", "Impregnation")
.WithMany()
.HasForeignKey("ImpregnationId");
b.Navigation("Impregnation");
});
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
{
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
.WithMany("SewerDamages")
.HasForeignKey("SewerObjectId");
b.Navigation("SewerObject");
});
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
{
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
.WithMany("SewerObjects")
.HasForeignKey("BuildingSiteId");
b.HasOne("DaSaSo.Domain.Model.PipeLiner", "PipeLiner")
.WithMany()
.HasForeignKey("PipeLinerId");
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
.WithMany()
.HasForeignKey("PunktObenId");
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
.WithMany()
.HasForeignKey("PunktUntenId");
b.Navigation("BuildingSite");
b.Navigation("PipeLiner");
b.Navigation("PunktOben");
b.Navigation("PunktUnten");
});
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
{
b.Navigation("SewerObjects");
});
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
{
b.Navigation("BuildingSites");
});
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
{
b.Navigation("SewerDamages");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,33 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DaSaSo.EntityFramework.Migrations
{
public partial class PhotoDocumentation_Added : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PhotoDocumentation",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
PicturePath = table.Column<string>(type: "text", nullable: true),
Description = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PhotoDocumentation", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PhotoDocumentation");
}
}
}

View File

@@ -17,7 +17,7 @@ namespace DaSaSo.EntityFramework.Migrations
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10") .HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63); .HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -116,6 +116,25 @@ namespace DaSaSo.EntityFramework.Migrations
b.ToTable("Impregnations"); b.ToTable("Impregnations");
}); });
modelBuilder.Entity("DaSaSo.Domain.Model.PhotoDocumentation", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("PicturePath")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("PhotoDocumentation");
});
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b => modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")

View File

@@ -1,32 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Remove="version.txt" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="version.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DaSaSo.Domain\DaSaSo.Domain.csproj" />
<ProjectReference Include="..\DaSaSo.EntityFramework\DaSaSo.EntityFramework.csproj" />
<ProjectReference Include="..\DaSaSo.InMemoryProvider\DaSaSo.InMemoryProvider.csproj" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="git rev-parse HEAD &gt; $(ProjectDir)\version.txt&#xD;&#xA;" />
</Target>
</Project>

View File

@@ -5,11 +5,11 @@ using DaSaSo.Domain.Services.ProjectServices;
using DaSaSo.Domain.Services.SewerObjectService; using DaSaSo.Domain.Services.SewerObjectService;
using DaSaSo.EntityFramework; using DaSaSo.EntityFramework;
using DaSaSo.EntityFramework.Services; using DaSaSo.EntityFramework.Services;
using DaSaSo.ViewModel; using DaSaSo.Wpf.ViewModel;
using DaSaSo.ViewModel.Factories; using DaSaSo.Wpf.ViewModel.Factories;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using DaSaSo.ViewModel.State.ActualState; using DaSaSo.Wpf.ViewModel.State.ActualState;
using DaSaSo.ViewModel.State.Navigation; using DaSaSo.Wpf.ViewModel.State.Navigation;
using DaSaSo.Wpf.HostBuilders; using DaSaSo.Wpf.HostBuilders;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;

View File

@@ -5,10 +5,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls" xmlns:local="clr-namespace:DaSaSo.Wpf.Controls"
xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain" xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain"
xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel"
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters" xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="375" d:DesignWidth="200"> d:DesignHeight="375" d:DesignWidth="200">
<UserControl.Resources> <UserControl.Resources>

View File

@@ -4,9 +4,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain" xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain"
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="607.5" d:DesignWidth="200"> d:DesignHeight="647.5" d:DesignWidth="200">
<Grid> <Grid>
<StackPanel> <StackPanel>
<RadioButton Content="Stammdaten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerStammdaten}" Margin="20" /> <RadioButton Content="Stammdaten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerStammdaten}" Margin="20" />
@@ -15,6 +15,7 @@
<RadioButton Content="Schließen" Style="{StaticResource ToggleButtonList}" Command="{Binding CloseCommand}" Margin="20" /> <RadioButton Content="Schließen" Style="{StaticResource ToggleButtonList}" Command="{Binding CloseCommand}" Margin="20" />
<RadioButton Content="{Binding Schaden.Distance,FallbackValue='Damage'}" Command="{Binding UpdateCurrentSewerViewModelCommand}" IsEnabled="{Binding CanSelectDamage}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerDamageEdit}" Style="{StaticResource ToggleButtonList}" Margin="20" /> <RadioButton Content="{Binding Schaden.Distance,FallbackValue='Damage'}" Command="{Binding UpdateCurrentSewerViewModelCommand}" IsEnabled="{Binding CanSelectDamage}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerDamageEdit}" Style="{StaticResource ToggleButtonList}" Margin="20" />
<RadioButton Content="Schlauchliner" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerPipeLiner}" Margin="20" /> <RadioButton Content="Schlauchliner" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerPipeLiner}" Margin="20" />
<RadioButton Content="Fotodokumentation" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerPictureDocumentation}" Margin="20" />
</StackPanel> </StackPanel>

View File

@@ -8,16 +8,28 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-preview.7.21378.4"> <None Remove="version.txt" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="version.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-rc.1.21451.13" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\DaSaSo.Domain\DaSaSo.Domain.csproj" /> <ProjectReference Include="..\DaSaSo.Domain\DaSaSo.Domain.csproj" />
<ProjectReference Include="..\DaSaSo.ViewModel\DaSaSo.ViewModel.csproj" /> <ProjectReference Include="..\DaSaSo.EntityFramework\DaSaSo.EntityFramework.csproj" />
<ProjectReference Include="..\DaSaSo.InMemoryProvider\DaSaSo.InMemoryProvider.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -26,4 +38,8 @@
</None> </None>
</ItemGroup> </ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="git rev-parse HEAD &gt; $(ProjectDir)\version.txt" />
</Target>
</Project> </Project>

View File

@@ -52,6 +52,9 @@
<Compile Update="View\SewerObject\Controls\SewerRehabilation.xaml.cs"> <Compile Update="View\SewerObject\Controls\SewerRehabilation.xaml.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Update="View\SewerObject\PhotodocumentationView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="View\SewerObject\SewerPipeLinerView.xaml.cs"> <Compile Update="View\SewerObject\SewerPipeLinerView.xaml.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
@@ -120,6 +123,9 @@
<Page Update="View\SewerObject\Controls\SewerRehabilation.xaml"> <Page Update="View\SewerObject\Controls\SewerRehabilation.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Update="View\SewerObject\PhotodocumentationView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="View\SewerObject\SewerPipeLinerView.xaml"> <Page Update="View\SewerObject\SewerPipeLinerView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>

View File

@@ -1,6 +1,6 @@
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using DaSaSo.ViewModel.State.ActualState; using DaSaSo.Wpf.ViewModel.State.ActualState;
using DaSaSo.ViewModel.State.Navigation; using DaSaSo.Wpf.ViewModel.State.Navigation;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using System; using System;

View File

@@ -4,10 +4,10 @@ using DaSaSo.Domain.Services.BuildingsiteServices;
using DaSaSo.Domain.Services.ProjectServices; using DaSaSo.Domain.Services.ProjectServices;
using DaSaSo.Domain.Services.SewerObjectService; using DaSaSo.Domain.Services.SewerObjectService;
using DaSaSo.Domain.Services.SewerPointServices; using DaSaSo.Domain.Services.SewerPointServices;
using DaSaSo.ViewModel; using DaSaSo.Wpf.ViewModel;
using DaSaSo.ViewModel.Factories; using DaSaSo.Wpf.ViewModel.Factories;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using DaSaSo.ViewModel.State.Navigation; using DaSaSo.Wpf.ViewModel.State.Navigation;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using System; using System;
@@ -114,6 +114,11 @@ namespace DaSaSo.Wpf.HostBuilders
); );
}); });
services.AddTransient<CreateViewModel<SewerPictureDocumentationViewModel>>(services =>
{
return () => new SewerPictureDocumentationViewModel();
});
services.AddTransient<CreateViewModel<ClientListViewModel>>(services => services.AddTransient<CreateViewModel<ClientListViewModel>>(services =>
{ {
return () => new ClientListViewModel( return () => new ClientListViewModel(

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Buildingsites" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:BuildingsiteEditViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.Buildingsites" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:BuildingsiteEditViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Buildingsites" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:BuildingsiteListViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.Buildingsites" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:BuildingsiteListViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientEditViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientEditViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientListViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientListViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources> <UserControl.Resources>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:HomeViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Impregnation" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ImpregnierungEditViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.Impregnation" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ImpregnierungEditViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Impregnation" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ImpregnierungListViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.Impregnation" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ImpregnierungListViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources> <UserControl.Resources>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Project" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ProjectEditViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.Project" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ProjectEditViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Project" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ProjectListViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.Project" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ProjectListViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:damagetype="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain" xmlns:damagetype="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:controls="clr-namespace:DaSaSo.ViewModel.Controls;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=controls:SewerDamageControllViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:controls="clr-namespace:DaSaSo.Wpf.ViewModel.Controls" d:DataContext="{d:DesignInstance Type=controls:SewerDamageControllViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid Background="LightBlue"> <Grid Background="LightBlue">

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:controls="clr-namespace:DaSaSo.ViewModel.Controls;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=controls:SewerPreperationControllViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:controls="clr-namespace:DaSaSo.Wpf.ViewModel.Controls" d:DataContext="{d:DesignInstance Type=controls:SewerPreperationControllViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid Background="LightBlue"> <Grid Background="LightBlue">

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" xmlns:controls="clr-namespace:DaSaSo.ViewModel.Controls;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=controls:SewerRhebalationControllViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" xmlns:controls="clr-namespace:DaSaSo.Wpf.ViewModel.Controls" d:DataContext="{d:DesignInstance Type=controls:SewerRhebalationControllViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -0,0 +1,28 @@
<UserControl x:Class="DaSaSo.Wpf.View.SewerObject.PhotodocumentationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerPictureDocumentationViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="9*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition Width="300" />
</Grid.ColumnDefinitions>
<TabControl ItemsSource="{Binding Tabs}" Name="tabImages" Grid.Column="1" Background="#00FFFFFF" TabStripPlacement="Bottom" MinHeight="150" AllowDrop="False" Focusable="False" TextOptions.TextFormattingMode="Display">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Header}" />
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
<TextBlock Name="txtBemerkung" Grid.Column="1" Grid.Row="1" TextWrapping="Wrap" Background="#FFFFFFFF" Foreground="#FF000000" VerticalAlignment="Center" Text="Kommentar" />
<Button Name="btnAddPhoto" Content="Hinzufügen" Width="50" Grid.RowSpan="2" VerticalAlignment="Top" />
</Grid>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace DaSaSo.Wpf.View.SewerObject
{
/// <summary>
/// Interaction logic for PhotodocumentationView.xaml
/// </summary>
public partial class PhotodocumentationView : UserControl
{
public PhotodocumentationView()
{
InitializeComponent();
}
}
}

View File

@@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:selfControls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:selfControls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerDamageEditViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerDamageEditViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sd="clr-namespace:DaSaSo.Wpf.Sampledata" xmlns:sd="clr-namespace:DaSaSo.Wpf.Sampledata"
xmlns:damagetype ="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain" xmlns:damagetype ="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel"
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters" xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1020"> d:DesignHeight="450" d:DesignWidth="1020">

View File

@@ -3,11 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:viewModel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" xmlns:viewModel="clr-namespace:DaSaSo.Wpf.ViewModel"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:Controls="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:Controls="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
xmlns:views ="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:views ="clr-namespace:DaSaSo.Wpf.View.SewerObject"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="900" d:DesignWidth="800">
<UserControl.Resources> <UserControl.Resources>
<DataTemplate DataType="{x:Type viewmodel:SewerStammdatenViewModel}"> <DataTemplate DataType="{x:Type viewmodel:SewerStammdatenViewModel}">
<views:SewerStammdatenView /> <views:SewerStammdatenView />
@@ -21,6 +21,9 @@
<DataTemplate DataType="{x:Type viewmodel:SewerPipeLinerViewModel}"> <DataTemplate DataType="{x:Type viewmodel:SewerPipeLinerViewModel}">
<views:SewerPipeLinerView /> <views:SewerPipeLinerView />
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type viewmodel:SewerPictureDocumentationViewModel}">
<views:PhotodocumentationView />
</DataTemplate>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</UserControl.Resources> </UserControl.Resources>
<Grid> <Grid>

View File

@@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject"
xmlns:controls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerPipeLinerViewModel}" xmlns:controls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerPipeLinerViewModel}"
mc:Ignorable="d" d:DesignWidth="800" Height="722"> mc:Ignorable="d" d:DesignWidth="800" Height="722">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerStammdatenViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerStammdatenViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>

View File

@@ -1,4 +1,5 @@
namespace DaSaSo.ViewModel 
namespace DaSaSo.Wpf.ViewModel
{ {
public delegate TViewModel CreateViewModel<TViewModel>() where TViewModel : BaseViewModel; public delegate TViewModel CreateViewModel<TViewModel>() where TViewModel : BaseViewModel;
public class BaseViewModel : ObservableObject public class BaseViewModel : ObservableObject

View File

@@ -1,7 +1,7 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.BuildingsiteServices; using DaSaSo.Domain.Services.BuildingsiteServices;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Input;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -10,7 +10,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class BuildingsiteEditViewModel : BaseViewModel public class BuildingsiteEditViewModel : BaseViewModel
{ {

View File

@@ -2,8 +2,8 @@
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.BuildingsiteServices; using DaSaSo.Domain.Services.BuildingsiteServices;
using DaSaSo.EntityFramework.Services; using DaSaSo.EntityFramework.Services;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
@@ -12,7 +12,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class BuildingsiteListViewModel: BaseViewModel public class BuildingsiteListViewModel: BaseViewModel
{ {

View File

@@ -1,6 +1,6 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Input;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -9,7 +9,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class ClientEditViewModel : BaseViewModel public class ClientEditViewModel : BaseViewModel
{ {

View File

@@ -1,8 +1,8 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Enums; using DaSaSo.Wpf.ViewModel.Enums;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Input;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -13,7 +13,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class ClientListViewModel : BaseViewModel public class ClientListViewModel : BaseViewModel
{ {

View File

@@ -1,14 +1,10 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.BuildingsiteServices; using DaSaSo.Domain.Services.BuildingsiteServices;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class AddBuildingsiteCommand: AsyncCommandBase public class AddBuildingsiteCommand: AsyncCommandBase
{ {

View File

@@ -1,13 +1,9 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class AddClientCommand : AsyncCommandBase public class AddClientCommand : AsyncCommandBase
{ {

View File

@@ -1,13 +1,9 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Wpf.ViewModel.Interface;
using DaSaSo.ViewModel.Interface;
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
class AddDamageCommand : AsyncCommandBase class AddDamageCommand : AsyncCommandBase
{ {

View File

@@ -1,13 +1,10 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
internal class AddImpregnationCommand : AsyncCommandBase internal class AddImpregnationCommand : AsyncCommandBase
{ {

View File

@@ -1,14 +1,10 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.ProjectServices; using DaSaSo.Domain.Services.ProjectServices;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class AddProjectCommand : AsyncCommandBase public class AddProjectCommand : AsyncCommandBase
{ {

View File

@@ -1,13 +1,9 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services.SewerObjectService; using DaSaSo.Domain.Services.SewerObjectService;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class AddSewerObjectCommand : AsyncCommandBase public class AddSewerObjectCommand : AsyncCommandBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public abstract class AsyncCommandBase : ICommand public abstract class AsyncCommandBase : ICommand
{ {

View File

@@ -1,15 +1,11 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.BuildingsiteServices; using DaSaSo.Domain.Services.BuildingsiteServices;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class EditBuildingsiteCommand : AsyncCommandBase public class EditBuildingsiteCommand : AsyncCommandBase
{ {

View File

@@ -1,16 +1,10 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class EditClientCommand : AsyncCommandBase public class EditClientCommand : AsyncCommandBase
{ {

View File

@@ -1,13 +1,9 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
internal class EditImpregnationCommand : AsyncCommandBase internal class EditImpregnationCommand : AsyncCommandBase
{ {
@@ -15,6 +11,10 @@ namespace DaSaSo.ViewModel.Commands
private ImpregnierungListViewModel _impregnierungListViewModel; private ImpregnierungListViewModel _impregnierungListViewModel;
private IRenavigator _editRenavigator; private IRenavigator _editRenavigator;
private IActualProject _actualProject; private IActualProject _actualProject;
public override bool CanExecute(object? parameter)
{
return _impregnierungListViewModel.SelectedImpregnation != null;
}
public EditImpregnationCommand( public EditImpregnationCommand(
IDataService<Impregnation> impregnationService, IDataService<Impregnation> impregnationService,
@@ -26,6 +26,13 @@ namespace DaSaSo.ViewModel.Commands
_impregnierungListViewModel = impregnierungListViewModel; _impregnierungListViewModel = impregnierungListViewModel;
_actualProject = actualProject; _actualProject = actualProject;
_editRenavigator = editRenavigator; _editRenavigator = editRenavigator;
_impregnierungListViewModel.PropertyChanged += _impregnierungListViewModel_PropertyChanged;
}
private void _impregnierungListViewModel_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(_impregnierungListViewModel.CanSelectImpregnation))
OnCanExecuteChanged();
} }
public override async Task ExecuteAsync(object? parameter) public override async Task ExecuteAsync(object? parameter)

View File

@@ -1,15 +1,11 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.ProjectServices; using DaSaSo.Domain.Services.ProjectServices;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
class EditProjectCommand : AsyncCommandBase class EditProjectCommand : AsyncCommandBase
{ {

View File

@@ -7,7 +7,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
internal class SaveImpregnationCommand : AsyncCommandBase internal class SaveImpregnationCommand : AsyncCommandBase
{ {

View File

@@ -2,7 +2,7 @@
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.SewerObjectService; using DaSaSo.Domain.Services.SewerObjectService;
using DaSaSo.Domain.Services.SewerPointServices; using DaSaSo.Domain.Services.SewerPointServices;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
@@ -10,7 +10,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class SaveSewerCommand : AsyncCommandBase public class SaveSewerCommand : AsyncCommandBase
{ {

View File

@@ -8,7 +8,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
class SaveSewerStammdatenCommand : AsyncCommandBase class SaveSewerStammdatenCommand : AsyncCommandBase
{ {

View File

@@ -1,4 +1,4 @@
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class SelectBuildingsiteCommand : AsyncCommandBase public class SelectBuildingsiteCommand : AsyncCommandBase
{ {

View File

@@ -1,6 +1,6 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -9,7 +9,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class SelectClientCommand : AsyncCommandBase public class SelectClientCommand : AsyncCommandBase
{ {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
class SelectDamageCommand : AsyncCommandBase class SelectDamageCommand : AsyncCommandBase
{ {

View File

@@ -1,4 +1,4 @@
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class SelectProjectCommand : AsyncCommandBase public class SelectProjectCommand : AsyncCommandBase
{ {

View File

@@ -1,12 +1,12 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
public class SelectSewerObjectCommand : AsyncCommandBase public class SelectSewerObjectCommand : AsyncCommandBase
{ {

View File

@@ -1,12 +1,12 @@
using DaSaSo.Domain.Enums; using DaSaSo.Domain.Enums;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
class UpdateCurrentSewerViewModelCommand : AsyncCommandBase class UpdateCurrentSewerViewModelCommand : AsyncCommandBase
{ {

View File

@@ -1,11 +1,11 @@
using DaSaSo.Domain.Enums; using DaSaSo.Domain.Enums;
using DaSaSo.ViewModel.Enums; using DaSaSo.Wpf.ViewModel.Enums;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel.Commands namespace DaSaSo.Wpf.ViewModel.Commands
{ {
class UpdateCurrentViewModelCommand : AsyncCommandBase class UpdateCurrentViewModelCommand : AsyncCommandBase
{ {

View File

@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Controls namespace DaSaSo.Wpf.ViewModel.Controls
{ {
public class SewerDamageControllViewModel : BaseViewModel public class SewerDamageControllViewModel : BaseViewModel
{ {

View File

@@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Controls namespace DaSaSo.Wpf.ViewModel.Controls
{ {
public class SewerPreperationControllViewModel : BaseViewModel public class SewerPreperationControllViewModel : BaseViewModel
{ {

View File

@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Controls namespace DaSaSo.Wpf.ViewModel.Controls
{ {
public class SewerRhebalationControllViewModel : BaseViewModel public class SewerRhebalationControllViewModel : BaseViewModel
{ {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Enums namespace DaSaSo.Wpf.ViewModel.Enums
{ {
enum EMediator enum EMediator

View File

@@ -1,8 +1,8 @@
using DaSaSo.Domain.Enums; using DaSaSo.Domain.Enums;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
namespace DaSaSo.ViewModel.Factories namespace DaSaSo.Wpf.ViewModel.Factories
{ {
public class MainWindowViewModelFactory : IViewModelAbstractFactory public class MainWindowViewModelFactory : IViewModelAbstractFactory
{ {

View File

@@ -1,12 +1,12 @@
using DaSaSo.Domain.Enums; using DaSaSo.Domain.Enums;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Factories namespace DaSaSo.Wpf.ViewModel.Factories
{ {
public class SewerWindowViewModelFactory : IViewModelSewerMainFactory public class SewerWindowViewModelFactory : IViewModelSewerMainFactory
{ {
@@ -14,18 +14,21 @@ namespace DaSaSo.ViewModel.Factories
private CreateViewModel<SewerDamageListViewModel> _createSewerDamageListViewModel; private CreateViewModel<SewerDamageListViewModel> _createSewerDamageListViewModel;
private CreateViewModel<SewerDamageEditViewModel> _createSewerDamageEditViewModel; private CreateViewModel<SewerDamageEditViewModel> _createSewerDamageEditViewModel;
private CreateViewModel<SewerPipeLinerViewModel> _createSewerPipeLinerViewModel; private CreateViewModel<SewerPipeLinerViewModel> _createSewerPipeLinerViewModel;
private CreateViewModel<SewerPictureDocumentationViewModel> _createSewerPictureDocumentationViewModel;
public SewerWindowViewModelFactory( public SewerWindowViewModelFactory(
CreateViewModel<SewerStammdatenViewModel> createSewerStammdatenViewModel, CreateViewModel<SewerStammdatenViewModel> createSewerStammdatenViewModel,
CreateViewModel<SewerDamageListViewModel> createSewerDamageListViewModel, CreateViewModel<SewerDamageListViewModel> createSewerDamageListViewModel,
CreateViewModel<SewerDamageEditViewModel> createSewerDamageEditViewModel, CreateViewModel<SewerDamageEditViewModel> createSewerDamageEditViewModel,
CreateViewModel<SewerPipeLinerViewModel> createSewerPipeLinerViewModel CreateViewModel<SewerPipeLinerViewModel> createSewerPipeLinerViewModel,
CreateViewModel<SewerPictureDocumentationViewModel> createSewerPictureDocumentationViewModel
) )
{ {
_createSewerStammdatenViewModel = createSewerStammdatenViewModel; _createSewerStammdatenViewModel = createSewerStammdatenViewModel;
_createSewerDamageListViewModel = createSewerDamageListViewModel; _createSewerDamageListViewModel = createSewerDamageListViewModel;
_createSewerDamageEditViewModel = createSewerDamageEditViewModel; _createSewerDamageEditViewModel = createSewerDamageEditViewModel;
_createSewerPipeLinerViewModel = createSewerPipeLinerViewModel; _createSewerPipeLinerViewModel = createSewerPipeLinerViewModel;
_createSewerPictureDocumentationViewModel = createSewerPictureDocumentationViewModel;
} }
public BaseViewModel CreateViewModel(ESewerWindowViewType viewType) public BaseViewModel CreateViewModel(ESewerWindowViewType viewType)
@@ -36,6 +39,7 @@ namespace DaSaSo.ViewModel.Factories
case ESewerWindowViewType.SewerDamageList: return _createSewerDamageListViewModel(); case ESewerWindowViewType.SewerDamageList: return _createSewerDamageListViewModel();
case ESewerWindowViewType.SewerDamageEdit: return _createSewerDamageEditViewModel(); case ESewerWindowViewType.SewerDamageEdit: return _createSewerDamageEditViewModel();
case ESewerWindowViewType.SewerPipeLiner: return _createSewerPipeLinerViewModel(); case ESewerWindowViewType.SewerPipeLiner: return _createSewerPipeLinerViewModel();
case ESewerWindowViewType.SewerPictureDocumentation: return _createSewerPictureDocumentationViewModel();
default: default:
throw new ArgumentException("The Viewtype does not have a ViewModel", "viewType"); throw new ArgumentException("The Viewtype does not have a ViewModel", "viewType");
} }

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class HomeViewModel : BaseViewModel public class HomeViewModel : BaseViewModel
{ {

View File

@@ -1,7 +1,7 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@@ -9,7 +9,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class ImpregnierungEditViewModel : BaseViewModel public class ImpregnierungEditViewModel : BaseViewModel
{ {

View File

@@ -1,7 +1,7 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Input;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -11,7 +11,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class ImpregnierungListViewModel : BaseViewModel public class ImpregnierungListViewModel : BaseViewModel
{ {
@@ -27,9 +27,11 @@ namespace DaSaSo.ViewModel
{ {
_selectedImpregnation = value; _selectedImpregnation = value;
OnPropertyChanged(); OnPropertyChanged();
OnPropertyChanged(nameof(CanSelectImpregnation));
} }
} }
} }
public bool CanSelectImpregnation => SelectedImpregnation != null;
public ICommand EditImpregnationCommand { get; set; } public ICommand EditImpregnationCommand { get; set; }
public ICommand AddImpregnationCommand { get; set; } public ICommand AddImpregnationCommand { get; set; }
bool _isLoading; bool _isLoading;

View File

@@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Interface namespace DaSaSo.Wpf.ViewModel.Interface
{ {
public interface IActualProject public interface IActualProject
{ {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Interface namespace DaSaSo.Wpf.ViewModel.Interface
{ {
public interface IMainWindowNavigator : INavigator public interface IMainWindowNavigator : INavigator
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel.Interface namespace DaSaSo.Wpf.ViewModel.Interface
{ {
public interface INavigator public interface INavigator
{ {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Interface namespace DaSaSo.Wpf.ViewModel.Interface
{ {
public interface IRenavigator public interface IRenavigator
{ {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Interface namespace DaSaSo.Wpf.ViewModel.Interface
{ {
public interface ISewerMainNavigator : INavigator public interface ISewerMainNavigator : INavigator
{ {

View File

@@ -1,6 +1,6 @@
using DaSaSo.Domain.Enums; using DaSaSo.Domain.Enums;
namespace DaSaSo.ViewModel.Interface namespace DaSaSo.Wpf.ViewModel.Interface
{ {
public interface IViewModelAbstractFactory public interface IViewModelAbstractFactory
{ {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Interface namespace DaSaSo.Wpf.ViewModel.Interface
{ {
public interface IViewModelFactory<T> where T: BaseViewModel public interface IViewModelFactory<T> where T: BaseViewModel
{ {

View File

@@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Interface namespace DaSaSo.Wpf.ViewModel.Interface
{ {
public interface IViewModelSewerMainFactory public interface IViewModelSewerMainFactory
{ {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.Interface namespace DaSaSo.Wpf.ViewModel.Interface
{ {
public interface IWindowService public interface IWindowService
{ {

View File

@@ -1,11 +1,11 @@
using DaSaSo.ViewModel.Enums; using DaSaSo.Wpf.ViewModel.Enums;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
class Mediator class Mediator
{ {

View File

@@ -6,7 +6,7 @@ using System.Runtime.CompilerServices;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class ObservableObject : INotifyPropertyChanged public class ObservableObject : INotifyPropertyChanged
{ {

View File

@@ -1,8 +1,8 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.ProjectServices; using DaSaSo.Domain.Services.ProjectServices;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Input;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -11,7 +11,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class ProjectEditViewModel : BaseViewModel public class ProjectEditViewModel : BaseViewModel
{ {

View File

@@ -2,8 +2,8 @@
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.ProjectServices; using DaSaSo.Domain.Services.ProjectServices;
using DaSaSo.EntityFramework.Services; using DaSaSo.EntityFramework.Services;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
@@ -13,7 +13,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class ProjectListViewModel : BaseViewModel public class ProjectListViewModel : BaseViewModel
{ {

View File

@@ -1,6 +1,6 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.ViewModel.Controls; using DaSaSo.Wpf.ViewModel.Controls;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Input;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -9,7 +9,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class SewerDamageEditViewModel : BaseViewModel public class SewerDamageEditViewModel : BaseViewModel
{ {

View File

@@ -1,7 +1,7 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@@ -9,7 +9,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class SewerDamageListViewModel : BaseViewModel public class SewerDamageListViewModel : BaseViewModel
{ {

View File

@@ -3,8 +3,8 @@ using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.SewerObjectService; using DaSaSo.Domain.Services.SewerObjectService;
using DaSaSo.Domain.Services.SewerPointServices; using DaSaSo.Domain.Services.SewerPointServices;
using DaSaSo.EntityFramework.Services; using DaSaSo.EntityFramework.Services;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Input;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -13,7 +13,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class SewerMainListViewModel : BaseViewModel public class SewerMainListViewModel : BaseViewModel
{ {

View File

@@ -4,8 +4,8 @@ using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.SewerObjectService; using DaSaSo.Domain.Services.SewerObjectService;
using DaSaSo.EntityFramework.Services; using DaSaSo.EntityFramework.Services;
using DaSaSo.InMemoryProvider; using DaSaSo.InMemoryProvider;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Input;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -16,7 +16,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class SewerObjectListViewModel : BaseViewModel public class SewerObjectListViewModel : BaseViewModel
{ {

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DaSaSo.Wpf.ViewModel
{
public static class BitmapConversion
{
//BitmapSource
}
public class SewerPictureDocumentationViewModel : BaseViewModel
{
public ObservableCollection<TabItem> Tabs { get; set; }
public SewerPictureDocumentationViewModel()
{
Tabs = new ObservableCollection<TabItem>();
Tabs.Add(new TabItem { Header = "One", Content = "One's content" });
Tabs.Add(new TabItem { Header = "Two", Content = "Two content" });
}
}
public sealed class TabItem
{
public string Header { get; set; }
public string Content { get; set; }
}
}

View File

@@ -1,6 +1,6 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.ViewModel.Controls; using DaSaSo.Wpf.ViewModel.Controls;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
@@ -8,7 +8,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class SewerPipeLinerViewModel : BaseViewModel public class SewerPipeLinerViewModel : BaseViewModel
{ {

View File

@@ -2,8 +2,8 @@
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.Domain.Services.SewerPointServices; using DaSaSo.Domain.Services.SewerPointServices;
using DaSaSo.EntityFramework.Services; using DaSaSo.EntityFramework.Services;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
@@ -12,7 +12,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public class SewerStammdatenViewModel : BaseViewModel public class SewerStammdatenViewModel : BaseViewModel
{ {

View File

@@ -1,12 +1,12 @@
using DaSaSo.Domain.Model; using DaSaSo.Domain.Model;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.State.ActualState namespace DaSaSo.Wpf.ViewModel.State.ActualState
{ {
public class ActualProject : IActualProject public class ActualProject : IActualProject
{ {

View File

@@ -1,11 +1,11 @@
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel.State.Navigation namespace DaSaSo.Wpf.ViewModel.State.Navigation
{ {
public class MainWindowNavigator : ObservableObject, IMainWindowNavigator public class MainWindowNavigator : ObservableObject, IMainWindowNavigator
{ {

View File

@@ -1,11 +1,11 @@
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.State.Navigation namespace DaSaSo.Wpf.ViewModel.State.Navigation
{ {
public class SewerMainNavigator : ISewerMainNavigator public class SewerMainNavigator : ISewerMainNavigator
{ {

View File

@@ -1,11 +1,11 @@
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DaSaSo.ViewModel.State.Navigation namespace DaSaSo.Wpf.ViewModel.State.Navigation
{ {
public class ViewModelDelegateRenavigator<TViewModel> : IRenavigator where TViewModel: BaseViewModel public class ViewModelDelegateRenavigator<TViewModel> : IRenavigator where TViewModel: BaseViewModel
{ {

View File

@@ -3,10 +3,10 @@ using DaSaSo.Domain.Model;
using DaSaSo.Domain.Services; using DaSaSo.Domain.Services;
using DaSaSo.EntityFramework; using DaSaSo.EntityFramework;
using DaSaSo.EntityFramework.Services; using DaSaSo.EntityFramework.Services;
using DaSaSo.ViewModel.Commands; using DaSaSo.Wpf.ViewModel.Commands;
using DaSaSo.ViewModel.Enums; using DaSaSo.Wpf.ViewModel.Enums;
using DaSaSo.ViewModel.Interface; using DaSaSo.Wpf.ViewModel.Interface;
using DaSaSo.ViewModel.State.Navigation; using DaSaSo.Wpf.ViewModel.State.Navigation;
using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Input;
using Microsoft.Win32; using Microsoft.Win32;
using System; using System;
@@ -19,7 +19,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
namespace DaSaSo.ViewModel namespace DaSaSo.Wpf.ViewModel
{ {
public sealed class MainWindowViewModel : BaseViewModel public sealed class MainWindowViewModel : BaseViewModel
{ {
@@ -103,7 +103,7 @@ namespace DaSaSo.ViewModel
{ {
string gitVersion; string gitVersion;
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type. #pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("DaSaSo.ViewModel.version.txt")) using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("DaSaSo.Wpf.version.txt"))
#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type. #pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type.
#pragma warning disable CS8604 // Possible null reference argument. #pragma warning disable CS8604 // Possible null reference argument.
using (StreamReader reader = new(stream)) using (StreamReader reader = new(stream))
@@ -145,17 +145,6 @@ namespace DaSaSo.ViewModel
private async void LadeRegistry() private async void LadeRegistry()
{ {
int clientid = Convert.ToInt32((string)registry.GetValue("lastclient", "-1"));
if (clientid == -1)
return;
Client lastClient = await _clientDataService.Get(clientid);
if (lastClient == null)
{
SaveInRegistry("lastclient", "-1");
return;
}
_actualProject.SetClient(lastClient);
int projectid = Convert.ToInt32((string)registry.GetValue("lastproject", "-1")); int projectid = Convert.ToInt32((string)registry.GetValue("lastproject", "-1"));
if (projectid == -1) if (projectid == -1)
return; return;

View File

@@ -11,7 +11,7 @@
xmlns:ImpregnationViews="clr-namespace:DaSaSo.Wpf.View.Impregnation" xmlns:ImpregnationViews="clr-namespace:DaSaSo.Wpf.View.Impregnation"
xmlns:controls="clr-namespace:DaSaSo.Wpf.Controls" xmlns:controls="clr-namespace:DaSaSo.Wpf.Controls"
xmlns:View="clr-namespace:DaSaSo.Wpf.View" xmlns:View="clr-namespace:DaSaSo.Wpf.View"
xmlns:local="clr-namespace:DaSaSo.Wpf" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}" xmlns:local="clr-namespace:DaSaSo.Wpf" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel"
mc:Ignorable="d" mc:Ignorable="d"
Title="{Binding ApplicationTitle}" Height="450" Width="800" WindowState="Maximized" FontSize="20"> Title="{Binding ApplicationTitle}" Height="450" Width="800" WindowState="Maximized" FontSize="20">
<Window.Resources> <Window.Resources>
@@ -61,8 +61,6 @@
<controls:MainWindowNavigationBar Grid.Column="0" Grid.Row="0"/> <controls:MainWindowNavigationBar Grid.Column="0" Grid.Row="0"/>
<ContentControl Grid.Column="1" Grid.Row="0" Content="{Binding CurrentViewModel}" /> <ContentControl Grid.Column="1" Grid.Row="0" Content="{Binding CurrentViewModel}" />
<StatusBar FontSize="20" Grid.Row="1" Grid.ColumnSpan="2"> <StatusBar FontSize="20" Grid.Row="1" Grid.ColumnSpan="2">
<StatusBarItem FontSize="20" Content="{Binding ClientName}" />
<Separator />
<StatusBarItem FontSize="20" Content="{Binding Projektnummer}" /> <StatusBarItem FontSize="20" Content="{Binding Projektnummer}" />
<Separator /> <Separator />
<StatusBarItem FontSize="20" Content="{Binding Buildingsitename}" /> <StatusBarItem FontSize="20" Content="{Binding Buildingsitename}" />

View File

@@ -11,8 +11,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.ConsoleApp", "DaSaSo
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.Wpf", "DaSaSo.Wpf\DaSaSo.Wpf.csproj", "{0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.Wpf", "DaSaSo.Wpf\DaSaSo.Wpf.csproj", "{0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.ViewModel", "DaSaSo.ViewModel\DaSaSo.ViewModel.csproj", "{7CC8889C-87AD-4E32-B9AB-C4B322828797}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.InMemoryProvider", "DaSaSo.InMemoryProvider\DaSaSo.InMemoryProvider.csproj", "{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.InMemoryProvider", "DaSaSo.InMemoryProvider\DaSaSo.InMemoryProvider.csproj", "{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.DatabaseConverter", "DaSaSo.DatabaseConverter\DaSaSo.DatabaseConverter.csproj", "{E0842F1A-E74D-4B84-BD27-3585901B0DE9}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.DatabaseConverter", "DaSaSo.DatabaseConverter\DaSaSo.DatabaseConverter.csproj", "{E0842F1A-E74D-4B84-BD27-3585901B0DE9}"
@@ -44,10 +42,6 @@ Global
{0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}.Debug|Any CPU.Build.0 = Debug|Any CPU {0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}.Release|Any CPU.ActiveCfg = Release|Any CPU {0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}.Release|Any CPU.Build.0 = Release|Any CPU {0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}.Release|Any CPU.Build.0 = Release|Any CPU
{7CC8889C-87AD-4E32-B9AB-C4B322828797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7CC8889C-87AD-4E32-B9AB-C4B322828797}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7CC8889C-87AD-4E32-B9AB-C4B322828797}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CC8889C-87AD-4E32-B9AB-C4B322828797}.Release|Any CPU.Build.0 = Release|Any CPU
{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Debug|Any CPU.Build.0 = Debug|Any CPU {838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Release|Any CPU.ActiveCfg = Release|Any CPU {838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Release|Any CPU.ActiveCfg = Release|Any CPU