Gui neu angelegt

This commit is contained in:
2023-04-20 20:37:39 +02:00
parent 0877d2b308
commit bcbda7622c
83 changed files with 389 additions and 502 deletions

View File

@@ -1,6 +1,7 @@
using Npgsql;
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.Shared.Enum;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -16,9 +17,27 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
{
}
public Task<Kanal> Create(Kanal entity)
public async Task<Kanal> Create(Kanal entity)
{
throw new NotImplementedException();
string command = "INSERT INTO " + tableName + " (" +
"objektbezeichnung,ref_startschacht_id,ref_endschacht_id," +
"dn,material,haltungslaenge, entwaesserung,ref_projekt_id) VALUES " +
"(@1,@2,@3,@4,@5,@6,@7,@8) RETURNING haltung_id";
using (var cmd = new NpgsqlCommand(command, conn))
{
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
cmd.Parameters.AddWithValue("2", entity.StartSchacht.Id);
cmd.Parameters.AddWithValue("3", entity.EndSchacht.Id);
cmd.Parameters.AddWithValue("4", entity.DN);
cmd.Parameters.AddWithValue("5", entity.Material);
cmd.Parameters.AddWithValue("6", entity.Haltungslaenge);
cmd.Parameters.AddWithValue("7", (int)entity.Entwaesserung);
cmd.Parameters.AddWithValue("8", entity.Projekt.Id);
using var reader = await cmd.ExecuteReaderAsync();
reader.Read();
entity.Id = reader.GetInt32(0);
}
return entity;
}
public Task<Kanal> Get(int id)
@@ -47,8 +66,11 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
{
Kanal adding = parseHaltung(reader);
adding.StartSchacht = schaechte.Where(x => x.Id == reader.GetInt32(2)).Last();
adding.EndSchacht = schaechte.Where(x => x.Id == reader.GetInt32(3)).Last();
int startSchachtID = reader.GetInt32(2);
int endSchachtID = reader.GetInt32(3);
adding.StartSchacht = schaechte.Where(x => x.Id == startSchachtID).Last();
adding.EndSchacht = schaechte.Where(x => x.Id == endSchachtID).Last();
result.Add(adding);
}
}

View File

@@ -1,6 +1,7 @@
using Npgsql;
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.Shared.Enum;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@@ -1,4 +1,5 @@
using SewerStammGen.Shared.Domain;
using SewerStammGen.Shared.Enum;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@@ -1,4 +1,5 @@
using System;
using SewerStammGen.Shared.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

View File

@@ -1,4 +1,5 @@
using System;
using SewerStammGen.Shared.Enum;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
@@ -19,11 +20,4 @@ namespace SewerStammGen.Shared.Domain
public Projekt Projekt { get; set; } = new Projekt();
public EEntwaeserung Entwaesserung { get; set; }
}
public enum EEntwaeserung
{
Regenwasser,
Schmutzwasser,
Mischwasser
}
}

View File

@@ -0,0 +1,9 @@
namespace SewerStammGen.Shared.Enum
{
public enum EEntwaeserung
{
Regenwasser,
Schmutzwasser,
Mischwasser
}
}

View File

@@ -1,70 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SewerStammGen.HostBuilders;
using SewerStammGen.WPF.ViewModel;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace SewerStammGen.WPF
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private readonly IHost _host;
public App()
{
_host = CreateHostBuilder().Build();
}
static IHostBuilder CreateHostBuilder(string[]? args = null)
{
return Host.CreateDefaultBuilder(args)
.AddConfiguration()
.AddServices()
.AddViewModels()
.AddStores();
}
protected override void OnStartup(StartupEventArgs e)
{
Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
_host.Start();
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
window.Show();
base.OnStartup(e);
}
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
try
{
Exception ex = (Exception)e.ExceptionObject;
string text = "An application error occured. Please contact the Administrator with the following information:\n\n";
MessageBox.Show(text + " " + ex.Message + "\n\n" + ex.StackTrace);
}
catch (Exception ex2)
{
MessageBox.Show("Fatal Non-UI error", ex2.Message, MessageBoxButton.OK, MessageBoxImage.Error);
}
}
private void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
throw new NotImplementedException();
}
}
}

View File

@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
{
internal class HaltungAddCommand : AsyncCommandBase
{
public HaltungAddCommand()
{
}
public override Task ExecuteAsync(object? parameter)
{
throw new NotImplementedException();
}
}
}

View File

@@ -1,28 +0,0 @@
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 SewerStammGen.WPF.Views.Controls
{
/// <summary>
/// Interaktionslogik für UCMainWindowNavigationBar.xaml
/// </summary>
public partial class UCMainWindowNavigationBar : UserControl
{
public UCMainWindowNavigationBar()
{
InitializeComponent();
}
}
}

View File

@@ -1,36 +0,0 @@
<UserControl x:Class="SewerStammGen.WPF.Views.UCNormXML"
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:SewerStammGen.WPF.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2003 / Ohne nationale Festlegung</RadioButton>
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2003 / Nationale Festlegung DWA M 149-2</RadioButton>
<RadioButton GroupName="Norm" IsEnabled="False">DIN - EN 13508 - 2: 2003 / andere nationale Festlegung (Bemerkung erforderlich)</RadioButton>
<RadioButton GroupName="Norm" IsEnabled="False">ISYBAU 2001</RadioButton>
<RadioButton GroupName="Norm" IsEnabled="False">ISYBAU 1996</RadioButton>
<RadioButton GroupName="Norm" IsEnabled="False">anderes Kodiersystem (Bemerkung erfolrderlich)</RadioButton>
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2003 / Nationale Festlegung Arbeitshilfen Abwasser</RadioButton>
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2011 / Ohne nationale Festlegung</RadioButton>
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2011 / Nationale Festlegung DWA M 149 - 2</RadioButton>
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2011 / Nationale Festlegung Arbeitshilfen Abwasser</RadioButton>
</StackPanel>
<StackPanel Grid.Row="1">
<RadioButton GroupName="Regelwerk" IsEnabled="False">Arbeitshilfen Abwasser (ISYBAU 1996/2001)</RadioButton>
<RadioButton GroupName="Regelwerk">Arbeitshilfen Abwasser (ISYBAU 2006)</RadioButton>
<RadioButton GroupName="Regelwerk" IsEnabled="False">Sonstige Festlegungen</RadioButton>
<RadioButton GroupName="Regelwerk" IsEnabled="False">keine Angaben</RadioButton>
<RadioButton GroupName="Regelwerk">Arbeitshilfen Abwasser (ISYBAU 2013)</RadioButton>
<RadioButton GroupName="Regelwerk">Arbeitshilfen Abwasser (ISYBAU 2017)</RadioButton>
</StackPanel>
</Grid>
</UserControl>

View File

@@ -1,13 +1,15 @@
<Application x:Class="SewerStammGen.WPF.App"
<Application x:Class="StammGenerator.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SewerStammGen"
xmlns:local="clr-namespace:StammGenerator"
>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="./Views/styles/my_controls.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

View File

@@ -0,0 +1,47 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using StammGenerator.HostBuilders;
using StammGenerator.ViewModel;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace StammGenerator
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private readonly IHost _host;
public App()
{
_host = CreateHostBuilder().Build();
}
static IHostBuilder CreateHostBuilder(string[]? args = null)
{
return Host.CreateDefaultBuilder(args)
.AddConfiguration()
.AddServices()
.AddViewModels()
.AddStores();
}
protected override void OnStartup(StartupEventArgs e)
{
_host.Start();
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
window.Show();
base.OnStartup(e);
}
}
}

View File

@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
internal abstract class AsyncCommandBase : ICommand
{

View File

@@ -0,0 +1,30 @@
using SewerStammGen.Shared.Domain;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using System.Threading.Tasks;
namespace StammGenerator.Commands
{
internal class HaltungAddCommand : AsyncCommandBase
{
private readonly IActualState actualState;
private readonly IRenavigator renavigator;
public HaltungAddCommand(IActualState actualState, IRenavigator renavigator)
{
this.actualState = actualState;
this.renavigator = renavigator;
}
public override async Task ExecuteAsync(object? parameter)
{
Kanal haltung = new Kanal()
{
Id = -1,
Projekt = new Projekt() { Id = actualState.ProjektID },
};
actualState.SetHaltung(haltung);
renavigator.Renavigate();
}
}
}

View File

@@ -1,14 +1,9 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StammGenerator.Commands;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
internal class HaltungEditCommand : AsyncCommandBase
{

View File

@@ -1,33 +1,36 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel;
using Shared.Contracts;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using StammGenerator.Commands;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
internal class HaltungEditSaveCommand : AsyncCommandBase
{
private readonly HaltungEditViewModel _haltungEditViewModel;
private readonly IHaltungDataService _haltungDataService;
private readonly IRenavigator _renavigator;
private readonly Kanal _model;
public HaltungEditSaveCommand(IHaltungDataService haltungDataService,IRenavigator renavigator,HaltungEditViewModel haltungEditViewModel)
{
this._haltungEditViewModel = haltungEditViewModel;
this._haltungDataService = haltungDataService;
this._renavigator = renavigator;
this._model = haltungEditViewModel.Model;
}
public override async Task ExecuteAsync(object? parameter)
{
_haltungEditViewModel.Model = await _haltungDataService.Update(_haltungEditViewModel.Model);
if(_model.Id == -1) // Neu anlegen
{
await _haltungDataService.Create(_model);
}
else
{
await _haltungDataService.Update(_model);
}
_renavigator.Renavigate();
}

View File

@@ -1,13 +1,11 @@
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using System;
using StammGenerator.Commands;
using StammGenerator.ViewModel;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
internal class ProjectExportCommand : AsyncCommandBase
{

View File

@@ -1,15 +1,12 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using System;
using StammGenerator.Commands;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
internal class ProjektAddCommand : AsyncCommandBase
{

View File

@@ -1,12 +1,11 @@
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using System.Runtime.CompilerServices;
using StammGenerator.Commands;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
internal class ProjektEditCommand : AsyncCommandBase
{

View File

@@ -1,9 +1,8 @@
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State;
using System;
using StammGenerator.Commands;
using StammGenerator.ViewModel;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
internal class ProjektSelectCommand : AsyncCommandBase
{

View File

@@ -1,15 +1,10 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SewerStammGen.Shared.Domain;
using StammGenerator.Commands;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
class SchachtAddCommand : AsyncCommandBase
{

View File

@@ -1,14 +1,11 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State;
using StammGenerator.Commands;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
class SchachtDeleteCommand : AsyncCommandBase
{

View File

@@ -1,14 +1,9 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StammGenerator.Commands;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
class SchachtEditCommand : AsyncCommandBase
{

View File

@@ -1,13 +1,9 @@
using SewerStammGen.Enum;
using SewerStammGen.WPF.Interface;
using SewerStammGen.WPF.Interface.Navigator;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StammGenerator.Commands;
using StammGenerator.Enum;
using StammGenerator.Interface;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
namespace StammGenerator.Commands
{
internal class UpdateCurrentViewModelCommand : AsyncCommandBase
{

View File

@@ -7,7 +7,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace SewerStammGen.WPF.Views.Converters
namespace StammGenerator.Converters
{
public class EqualValueToParameterConverter : IValueConverter
{

View File

@@ -1,4 +1,5 @@
using SewerStammGen.Shared.Domain;
using SewerStammGen.Shared.Enum;
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -7,9 +8,9 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace SewerStammGen.WPF.Views.Converters
namespace StammGenerator.Converters
{
public class EqualValueToEntwaesserungConverter : IValueConverter
public class ValueToEntConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
@@ -18,6 +19,7 @@ namespace SewerStammGen.WPF.Views.Converters
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return (EEntwaeserung)parameter;
}
}

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.Enum
namespace StammGenerator.Enum
{
public enum EMainWindowViewType
{

View File

@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.HostBuilders
namespace StammGenerator.HostBuilders
{
static class AddConfigurationHostBuilderExtensions
{

View File

@@ -9,7 +9,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.HostBuilders
namespace StammGenerator.HostBuilders
{
static class AddDBContextHostBuilderExtensions
{

View File

@@ -2,20 +2,11 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SewerStammGen.Shared.Contracts;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State.Navigation;
using Shared.Contracts;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.HostBuilders
namespace StammGenerator.HostBuilders
{
internal static class AddServicesHostBuilderExtensions
{
@@ -33,10 +24,10 @@ namespace SewerStammGen.HostBuilders
{
string? connectionstring = context.Configuration.GetConnectionString("postgresql");
if(connectionstring == null) throw new ArgumentNullException(nameof(connectionstring));
services.AddSingleton<IProjektDataService>(_=> new DAL.Services.PostgresqlData.ProjektDataService(connectionstring));
services.AddSingleton<IAuftraggeberDataService>(_ => new DAL.Services.PostgresqlData.AuftraggeberDataService(connectionstring));
services.AddSingleton<ISchachtDataService>(_ => new DAL.Services.PostgresqlData.SchachtDataService(connectionstring));
services.AddSingleton<IHaltungDataService>(_ => new DAL.Services.PostgresqlData.HaltungDataService(connectionstring));
services.AddSingleton<IProjektDataService>(_=> new SewerStammGen.DAL.Services.PostgresqlData.ProjektDataService(connectionstring));
services.AddSingleton<IAuftraggeberDataService>(_ => new SewerStammGen.DAL.Services.PostgresqlData.AuftraggeberDataService(connectionstring));
services.AddSingleton<ISchachtDataService>(_ => new SewerStammGen.DAL.Services.PostgresqlData.SchachtDataService(connectionstring));
services.AddSingleton<IHaltungDataService>(_ => new SewerStammGen.DAL.Services.PostgresqlData.HaltungDataService(connectionstring));
}
}

View File

@@ -1,13 +1,8 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SewerStammGen.WPF.ViewModel.State;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StammGenerator.ViewModel;
namespace SewerStammGen.HostBuilders
namespace StammGenerator.HostBuilders
{
static class AddStoresHostBuilderExtensions
{

View File

@@ -1,22 +1,11 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SewerStammGen.WPF.Commands;
using SewerStammGen.WPF.Interface;
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State.Navigation;
using SewerStammGen.WPF.ViewModel.Factories;
using Shared.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Security;
using System.Text;
using System.Threading.Tasks;
using SewerStammGen.WPF.ViewModel.State;
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using StammGenerator.Interface;
using StammGenerator.ViewModel;
using StammGenerator.ViewModel.Factories;
namespace SewerStammGen.HostBuilders
namespace StammGenerator.HostBuilders
{
static class AddViewModelsHostBuilderExtensions
{

View File

@@ -1,12 +1,12 @@
using SewerStammGen.Enum;
using SewerStammGen.WPF.ViewModel;
using StammGenerator.Enum;
using StammGenerator.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Interface
namespace StammGenerator.Interface
{
public interface IViewModelAbstractFactory
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Interface.Navigator
namespace StammGenerator.Interface
{
public interface IMainWindowNavigator : INavigator
{

View File

@@ -1,11 +1,11 @@
using SewerStammGen.WPF.ViewModel;
using StammGenerator.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Interface.Navigator
namespace StammGenerator.Interface
{
public interface INavigator
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Interface.Navigator
namespace StammGenerator.Interface
{
public interface IRenavigator
{

View File

@@ -1,17 +1,16 @@
<Window x:Class="SewerStammGen.WPF.MainWindow"
<Window x:Class="StammGenerator.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:my="clr-namespace:SewerStammGen.WPF.Views"
xmlns:local="clr-namespace:SewerStammGen.WPF"
xmlns:view="clr-namespace:SewerStammGen.WPF.Views"
xmlns:viewmodel="clr-namespace:SewerStammGen.WPF.ViewModel"
xmlns:controls="clr-namespace:SewerStammGen.WPF.Views.Controls"
xmlns:local="clr-namespace:StammGenerator"
mc:Ignorable="d"
Title="{Binding ApplicationTitle}" Height="450" Width="800" FontSize="20"
WindowState="Maximized"
>
xmlns:view="clr-namespace:StammGenerator.Views"
xmlns:viewmodel="clr-namespace:StammGenerator.ViewModel"
Title="MainWindow" Height="450" Width="800">
<Window.Resources>
<DataTemplate DataType="{x:Type viewmodel:HomeViewModel}">
<view:HomeView />
@@ -48,7 +47,8 @@
<ColumnDefinition Width="200" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<controls:UCMainWindowNavigationBar Grid.Column="0" />
<view:MainWindowNavigationBar Grid.Column="0" />
<ContentControl Grid.Column="1" Content="{Binding CurrentViewModel}" />
<StatusBar Grid.Row="1" Grid.ColumnSpan="2">
<StatusBarItem Content="{Binding Projektnummer}" />

View File

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF
namespace StammGenerator
{
/// <summary>
/// Interaction logic for MainWindow.xaml
@@ -23,8 +23,6 @@ namespace SewerStammGen.WPF
public MainWindow()
{
InitializeComponent();
//SewerConnector.DataContext = new ViewModel.SewerConnectorViewModel();
}
}
}

View File

@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Services
namespace StammGenerator.Services
{
internal class OpenFileDialogService
{

View File

@@ -8,10 +8,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoCompleteTextBox" Version="1.6.0" />
<Folder Include="ViewModel\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
</ItemGroup>
<ItemGroup>

View File

@@ -13,10 +13,10 @@
<Compile Update="Views\Haltung\HaltungListView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Controls\UCMainWindowNavigationBar.xaml.cs">
<Compile Update="Views\HomeView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\HomeView.xaml.cs">
<Compile Update="Views\MainWindowNavigationBar.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Projekt\ProjektEditView.xaml.cs">
@@ -25,18 +25,15 @@
<Compile Update="Views\Projekt\ProjektListView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Schacht\SchachtEditView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Schacht\SchachtImportView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Schacht\SchachtListView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Schacht\SchachtEditView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\UCNormXML.xaml.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Page Update="MainWindow.xaml">
@@ -48,10 +45,10 @@
<Page Update="Views\Haltung\HaltungListView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\Controls\UCMainWindowNavigationBar.xaml">
<Page Update="Views\HomeView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\HomeView.xaml">
<Page Update="Views\MainWindowNavigationBar.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\Projekt\ProjektEditView.xaml">
@@ -60,20 +57,14 @@
<Page Update="Views\Projekt\ProjektListView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\Schacht\SchachtEditView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\Schacht\SchachtImportView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\Schacht\SchachtListView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\styles\my_controls.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\Schacht\SchachtEditView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\UCNormXML.xaml">
<SubType>Designer</SubType>
</Page>
</ItemGroup>
</Project>

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
public delegate TViewModel CreateViewModel<TViewModel>() where TViewModel : BaseViewModel;
public class BaseViewModel : ObservableObject

View File

@@ -1,12 +1,13 @@
using SewerStammGen.Enum;
using SewerStammGen.WPF.Interface;
using StammGenerator;
using StammGenerator.Enum;
using StammGenerator.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.ViewModel.Factories
namespace StammGenerator.ViewModel.Factories
{
public class MainWindowViewModelFactory : IViewModelAbstractFactory
{

View File

@@ -1,20 +1,14 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Commands;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using SewerStammGen.Shared.Enum;
using StammGenerator.Commands;
using StammGenerator.Interface;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
internal class HaltungEditViewModel : BaseViewModel
{
@@ -22,6 +16,9 @@ namespace SewerStammGen.WPF.ViewModel
private readonly IHaltungDataService _haltungDataService;
private readonly ISchachtDataService _schachtDataService;
private List<Schacht> avaibleSchaechte;
private int _selectedObenIndex;
private int _selectedUntenIndex;
private Kanal _model;
public List<Schacht> AvSchaechte
{
@@ -31,8 +28,19 @@ namespace SewerStammGen.WPF.ViewModel
}
}
int _selectedObenIndex;
int _selectedUntenIndex;
public EEntwaeserung Entwaeserung
{
get => _model.Entwaesserung;
set
{
if(_model.Entwaesserung != value)
{
_model.Entwaesserung = value;
OnPropertyChanged();
}
}
}
public int SelectedObenIndex
{
@@ -63,7 +71,7 @@ namespace SewerStammGen.WPF.ViewModel
}
}
private Kanal _model;
public Kanal Model
{
@@ -74,19 +82,7 @@ namespace SewerStammGen.WPF.ViewModel
}
}
private void RecalculateLength()
{
double x1 = (double)Model.StartSchacht.DeckelRechtsWert;
double x2 = (double)Model.EndSchacht.DeckelRechtsWert;
double y1 = (double)Model.StartSchacht.DeckelHochWert;
double y2 = (double)Model.EndSchacht.DeckelHochWert;
double length = Math.Sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
Haltungslaenge = length.ToString();
OnPropertyChanged(nameof(Haltungslaenge));
}
public string Haltungsbezeichnung
{
get => _model.Objektbezeichnung;
@@ -162,6 +158,20 @@ namespace SewerStammGen.WPF.ViewModel
}
private void RecalculateLength()
{
double x1 = (double)Model.StartSchacht.DeckelRechtsWert;
double x2 = (double)Model.EndSchacht.DeckelRechtsWert;
double y1 = (double)Model.StartSchacht.DeckelHochWert;
double y2 = (double)Model.EndSchacht.DeckelHochWert;
double length = Math.Sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
Haltungslaenge = length.ToString();
OnPropertyChanged(nameof(Haltungslaenge));
}
private void Abbruch(IRenavigator renavigator)
{
renavigator.Renavigate();

View File

@@ -1,17 +1,12 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Commands;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel.State;
using System;
using StammGenerator.Commands;
using StammGenerator.Interface;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
public class HaltungListViewModel : BaseViewModel
{
@@ -35,7 +30,7 @@ namespace SewerStammGen.WPF.ViewModel
EditCommand = new HaltungEditCommand(actualState, renavigator, this);
AddCommand = new HaltungAddCommand();
AddCommand = new HaltungAddCommand(actualState, renavigator);
ExportCommand = new ProjectExportCommand(actualState);
LoadHaltungen();

View File

@@ -1,4 +1,4 @@
using Microsoft.Xaml.Behaviors;
//using Microsoft.Xaml.Behaviors;
//using Syncfusion.UI.Xaml.Grid;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/*
public class TextBoxFilterAction : TargetedTriggerAction<SfMultiColumnDropDownControl>

View File

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

View File

@@ -1,7 +1,6 @@
using SewerStammGen.WPF.Commands;
using SewerStammGen.Enum;
using SewerStammGen.WPF.Interface;
using SewerStammGen.WPF.Interface.Navigator;

using StammGenerator.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -9,9 +8,12 @@ using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using SewerStammGen.WPF.ViewModel.State;
namespace SewerStammGen.WPF.ViewModel
using SewerStammGen.Shared.Domain;
using StammGenerator.Interface;
using StammGenerator.Commands;
namespace StammGenerator.ViewModel
{
public class MainWindowViewModel : BaseViewModel
{
@@ -49,7 +51,8 @@ namespace SewerStammGen.WPF.ViewModel
#if DEBUG
_actualState.ProjektID = 5;
_actualState.SetProjekt(new Projekt() { Id = 5 });
#endif
}

View File

@@ -1,7 +1,7 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
public class ObservableObject : INotifyPropertyChanged
{

View File

@@ -1,18 +1,9 @@
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Security.RightsManagement;
using System.Text;
using System.Threading.Tasks;
using StammGenerator.Interface;
using System.Windows.Input;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
internal class ProjektEditViewModel : BaseViewModel
{

View File

@@ -1,19 +1,13 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Commands;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using StammGenerator.Commands;
using StammGenerator.Interface;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
public class ProjektListViewModel : BaseViewModel
{

View File

@@ -6,7 +6,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
[Serializable]
class RelayCommand : ICommand

View File

@@ -1,16 +1,10 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SewerStammGen.Shared.Enum;
using StammGenerator.Interface;
using System.Windows.Input;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
public class ManholeEditViewModel : BaseViewModel
{
@@ -131,6 +125,11 @@ namespace SewerStammGen.WPF.ViewModel
}
public ManholeEditViewModel()
{
}
private async void SaveSchacht()
{
if (_model.Id == 0)

View File

@@ -1,20 +1,13 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.Services;
using SewerStammGen.WPF.ViewModel.State;
using SewerStammGen.Shared.Enum;
using Shared.Contracts;
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StammGenerator.Interface;
using StammGenerator.Services;
using System.Windows.Input;
using WWTech_KanalSchnittstelle.Importer;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
public class ManholeImportViewModel : BaseViewModel
{

View File

@@ -1,18 +1,12 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.Shared.Domain;
using SewerStammGen.WPF.Commands;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using System;
using StammGenerator.Commands;
using StammGenerator.Interface;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace SewerStammGen.WPF.ViewModel
namespace StammGenerator.ViewModel
{
public class ManholeListViewModel : BaseViewModel
{

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StammGenerator.ViewModel
{
public class TestHole : BaseViewModel
{
}
}

View File

@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.ViewModel.State
namespace StammGenerator.ViewModel
{
internal class ActualState : IActualState
{

View File

@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.ViewModel.State
namespace StammGenerator.ViewModel
{
public interface IActualState
{

View File

@@ -1,11 +1,7 @@
using SewerStammGen.WPF.Interface.Navigator;
using StammGenerator.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.ViewModel.State.Navigation
namespace StammGenerator.ViewModel
{
internal class MainWindowNavigator : ObservableObject, IMainWindowNavigator
{

View File

@@ -1,11 +1,6 @@
using SewerStammGen.WPF.Interface.Navigator;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StammGenerator.Interface;
namespace SewerStammGen.WPF.ViewModel.State.Navigation
namespace StammGenerator.ViewModel
{
internal class ViewModelDelegateRenavigator<TViewModel> : IRenavigator where TViewModel : BaseViewModel
{

View File

@@ -1,12 +1,16 @@
<UserControl x:Class="SewerStammGen.WPF.Views.HaltungEditView"
<UserControl x:Class="StammGenerator.Views.HaltungEditView"
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:SewerStammGen.WPF.Views"
xmlns:local="clr-namespace:StammGenerator.Views"
xmlns:converter="clr-namespace:StammGenerator.Converters"
xmlns:stat="clr-namespace:SewerStammGen.Shared.Enum;assembly=SewerStammGen.Shared"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<converter:ValueToEntConverter x:Key="EqualValueToEntwaesserungConverter" />
</UserControl.Resources>
<Grid>
<Grid>
<Grid.RowDefinitions>
@@ -55,9 +59,9 @@
<TextBox Grid.Row="1" Grid.Column="1" Width="200" HorizontalAlignment="Left" Margin="5,5,5,5" Text="{Binding Durchmesser}" Grid.ColumnSpan="2" />
<TextBox Grid.Row="2" Grid.Column="1" Width="100" HorizontalAlignment="Left" Margin="5,5,5,5" Text="{Binding Haltungslaenge}" Grid.ColumnSpan="2" />
<DockPanel Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2">
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Regenwasser" />
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Schmutzwasser" />
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" />
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Regenwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Regenwasser}}" />
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Schmutzwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Schmutzwasser}}" />
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Mischwasser}}" />
</DockPanel>
</Grid>
@@ -67,4 +71,5 @@
</TabPanel>
</Grid>
</Grid>
</UserControl>

View File

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für HaltungEditView.xaml

View File

@@ -1,9 +1,9 @@
<UserControl x:Class="SewerStammGen.WPF.Views.HaltungListView"
<UserControl x:Class="StammGenerator.Views.HaltungListView"
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:SewerStammGen.WPF.Views"
xmlns:local="clr-namespace:StammGenerator.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
@@ -22,6 +22,5 @@
<Button Content="Editieren" Command="{Binding EditCommand}" />
<Button Content="Daten Exportieren" Command="{Binding ExportCommand}" Width="220" Height="220" BorderBrush="AliceBlue" BorderThickness="5" HorizontalAlignment="Left" />
</StackPanel>
</Grid>
</UserControl>

View File

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für HaltungListView.xaml

View File

@@ -1,9 +1,9 @@
<UserControl x:Class="SewerStammGen.WPF.Views.HomeView"
<UserControl x:Class="StammGenerator.Views.HomeView"
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:SewerStammGen.WPF.Views"
xmlns:local="clr-namespace:StammGenerator.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>

View File

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für HomeView.xaml

View File

@@ -1,14 +1,13 @@
<UserControl x:Class="SewerStammGen.WPF.Views.Controls.UCMainWindowNavigationBar"
<UserControl x:Class="StammGenerator.Views.MainWindowNavigationBar"
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:nav="clr-namespace:SewerStammGen.Enum"
xmlns:viewmodel="clr-namespace:SewerStammGen.WPF.ViewModel"
xmlns:converter="clr-namespace:SewerStammGen.WPF.Views.Converters"
xmlns:local="clr-namespace:SewerStammGen.WPF.Views.Controls"
xmlns:local="clr-namespace:StammGenerator.Views"
xmlns:nav="clr-namespace:StammGenerator.Enum"
xmlns:viewmodel="clr-namespace:StammGenerator.ViewModel"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
xmlns:converter="clr-namespace:StammGenerator.Converters"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<converter:EqualValueToParameterConverter x:Key="EqualValueToParameterConverter" />

View File

@@ -13,14 +13,14 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für UCNormXML.xaml
/// Interaktionslogik für MainWindowNavigationBar.xaml
/// </summary>
public partial class UCNormXML : UserControl
public partial class MainWindowNavigationBar : UserControl
{
public UCNormXML()
public MainWindowNavigationBar()
{
InitializeComponent();
}

View File

@@ -1,9 +1,9 @@
<UserControl x:Class="SewerStammGen.WPF.Views.ProjektEditView"
<UserControl x:Class="StammGenerator.Views.ProjektEditView"
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:SewerStammGen.WPF.Views"
xmlns:local="clr-namespace:StammGenerator.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>

View File

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für ProjektEditView.xaml

View File

@@ -1,9 +1,9 @@
<UserControl x:Class="SewerStammGen.WPF.Views.ProjektListView"
<UserControl x:Class="StammGenerator.Views.ProjektListView"
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:SewerStammGen.WPF.Views"
xmlns:local="clr-namespace:StammGenerator.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
@@ -20,6 +20,5 @@
<Button Margin="2" FontSize="20" Content="Projekt Editieren" IsEnabled="{Binding CanSelectProjekt}" Command="{Binding EditCommand}" />
<Button Margin="2" FontSize="20" Content="Projekt Anlegen" Command="{Binding AddCommand}" />
</StackPanel>
</Grid>
</UserControl>

View File

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für ProjektListView.xaml

View File

@@ -1,15 +1,17 @@
<UserControl x:Class="SewerStammGen.WPF.Views.SchachtEditView"
<UserControl x:Class="StammGenerator.Views.SchachtEditView"
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:converter="clr-namespace:SewerStammGen.WPF.Views.Converters"
xmlns:stat="clr-namespace:SewerStammGen.Shared.Domain;assembly=SewerStammGen.Shared"
xmlns:local="clr-namespace:SewerStammGen.WPF.Views"
xmlns:viewmodel="clr-namespace:StammGenerator.ViewModel"
xmlns:local="clr-namespace:StammGenerator.Views"
mc:Ignorable="d"
xmlns:converter="clr-namespace:StammGenerator.Converters"
xmlns:stat="clr-namespace:SewerStammGen.Shared.Enum;assembly=SewerStammGen.Shared"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<converter:EqualValueToEntwaesserungConverter x:Key="EqualValueToEntwaesserungConverter" />
<converter:ValueToEntConverter x:Key="EqualValueToEntwaesserungConverter" />
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>

View File

@@ -13,10 +13,10 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für UCEditSchacht.xaml
/// Interaktionslogik für SchachtEditView.xaml
/// </summary>
public partial class SchachtEditView : UserControl
{

View File

@@ -1,9 +1,9 @@
<UserControl x:Class="SewerStammGen.WPF.Views.SchachtImportView"
<UserControl x:Class="StammGenerator.Views.SchachtImportView"
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:SewerStammGen.WPF.Views"
xmlns:local="clr-namespace:StammGenerator.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>

View File

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für SchachtImportView.xaml

View File

@@ -1,9 +1,9 @@
<UserControl x:Class="SewerStammGen.WPF.Views.SchachtListView"
<UserControl x:Class="StammGenerator.Views.SchachtListView"
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:SewerStammGen.WPF.Views"
xmlns:local="clr-namespace:StammGenerator.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
@@ -28,6 +28,5 @@
<Button Content="Schacht Löschen" Command="{Binding DeleteSchachtCommand}" />
<Button Content="Schächte aus CSV Laden" Command="{Binding ImportSchachtCommand}" />
</StackPanel>
</Grid>
</UserControl>

View File

@@ -13,10 +13,10 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SewerStammGen.WPF.Views
namespace StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für SchachtList.xaml
/// Interaktionslogik für SchachtListView.xaml
/// </summary>
public partial class SchachtListView : UserControl
{

View File

@@ -11,9 +11,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SewerStammGen.DAL", "SewerS
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SewerStammGen.ConsoleApp", "SewerStammGen.ConsoleApp\SewerStammGen.ConsoleApp.csproj", "{774EB800-0C5B-4047-A02D-DB4F1BA58167}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WWTech_KanalSchnittstelle", "WWTech_KanalSchnittstelle\WWTech_KanalSchnittstelle.csproj", "{DB503A96-8B9F-4AF0-826E-17FB69C94AA0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WWTech_KanalSchnittstelle", "WWTech_KanalSchnittstelle\WWTech_KanalSchnittstelle.csproj", "{DB503A96-8B9F-4AF0-826E-17FB69C94AA0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WWTech_KanalSchnittstelleTests", "WWTech_KanalSchnittstelleTests\WWTech_KanalSchnittstelleTests.csproj", "{83F2D043-AB23-4B8C-8751-ABE1F32BF5C1}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WWTech_KanalSchnittstelleTests", "WWTech_KanalSchnittstelleTests\WWTech_KanalSchnittstelleTests.csproj", "{83F2D043-AB23-4B8C-8751-ABE1F32BF5C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StammGenerator", "StammGenerator\StammGenerator.csproj", "{6A4CB3BE-C711-47CC-911E-DC356E18E2F1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -45,6 +47,10 @@ Global
{83F2D043-AB23-4B8C-8751-ABE1F32BF5C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83F2D043-AB23-4B8C-8751-ABE1F32BF5C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83F2D043-AB23-4B8C-8751-ABE1F32BF5C1}.Release|Any CPU.Build.0 = Release|Any CPU
{6A4CB3BE-C711-47CC-911E-DC356E18E2F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A4CB3BE-C711-47CC-911E-DC356E18E2F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A4CB3BE-C711-47CC-911E-DC356E18E2F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A4CB3BE-C711-47CC-911E-DC356E18E2F1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -1,4 +1,5 @@
using SewerStammGen.Shared.Domain;
using SewerStammGen.Shared.Enum;
using Shared.Contracts;
using System;
using System.Collections.Generic;