diff --git a/.gitignore b/.gitignore index a599aa4..5270014 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.vs/* */obj/* +*/bin/Debug/* diff --git a/SewerStammGen/App.xaml b/SewerStammGen/App.xaml index 1905fcb..b4be063 100644 --- a/SewerStammGen/App.xaml +++ b/SewerStammGen/App.xaml @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:SewerStammGen" - StartupUri="MainWindow.xaml"> + > diff --git a/SewerStammGen/App.xaml.cs b/SewerStammGen/App.xaml.cs index 8ae58bb..39f7dc6 100644 --- a/SewerStammGen/App.xaml.cs +++ b/SewerStammGen/App.xaml.cs @@ -1,4 +1,8 @@ -using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using SewerStammGen.HostBuilders; +using SewerStammGen.ViewModel; +using System; using System.Collections.Generic; using System.Configuration; using System.Data; @@ -13,5 +17,52 @@ namespace SewerStammGen /// 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() + .AddDBContext(); + } + + 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() }; + 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. Plrease 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(); + } } } diff --git a/SewerStammGen/EMainWindowViewType.cs b/SewerStammGen/EMainWindowViewType.cs new file mode 100644 index 0000000..f2f7bbc --- /dev/null +++ b/SewerStammGen/EMainWindowViewType.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen +{ + public enum EMainWindowViewType + { + Home + } +} diff --git a/SewerStammGen/HostBuilders/AddConfigurationHostBuilderExtensions.cs b/SewerStammGen/HostBuilders/AddConfigurationHostBuilderExtensions.cs new file mode 100644 index 0000000..790ffcb --- /dev/null +++ b/SewerStammGen/HostBuilders/AddConfigurationHostBuilderExtensions.cs @@ -0,0 +1,24 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.HostBuilders +{ + static class AddConfigurationHostBuilderExtensions + { + public static IHostBuilder AddConfiguration(this IHostBuilder hostBuilder) + { + hostBuilder.ConfigureAppConfiguration(c => + { + c.AddJsonFile("appsettings.json"); + c.AddEnvironmentVariables(); + } + ); + return hostBuilder; + } + } +} diff --git a/SewerStammGen/HostBuilders/AddDBContextHostBuilderExtensions.cs b/SewerStammGen/HostBuilders/AddDBContextHostBuilderExtensions.cs new file mode 100644 index 0000000..86a7333 --- /dev/null +++ b/SewerStammGen/HostBuilders/AddDBContextHostBuilderExtensions.cs @@ -0,0 +1,21 @@ +using Microsoft.Extensions.Hosting; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.HostBuilders +{ + static class AddDBContextHostBuilderExtensions + { + public static IHostBuilder AddDBContext(this IHostBuilder hostBuilder) + { + hostBuilder.ConfigureServices((context, services) => + { + + }); + return hostBuilder; + } + } +} diff --git a/SewerStammGen/HostBuilders/AddServicesHostBuilderExtensions.cs b/SewerStammGen/HostBuilders/AddServicesHostBuilderExtensions.cs new file mode 100644 index 0000000..d554946 --- /dev/null +++ b/SewerStammGen/HostBuilders/AddServicesHostBuilderExtensions.cs @@ -0,0 +1,25 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using SewerStammGen.Interface.Navigator; +using SewerStammGen.ViewModel.State.Navigation; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.HostBuilders +{ + internal static class AddServicesHostBuilderExtensions + { + public static IHostBuilder AddServices(this IHostBuilder host) + { + host.ConfigureServices(services => + { + services.AddSingleton(); + }); + return host; + } + } +} diff --git a/SewerStammGen/HostBuilders/AddStoresHostBuilderExtensions.cs b/SewerStammGen/HostBuilders/AddStoresHostBuilderExtensions.cs new file mode 100644 index 0000000..6fe3add --- /dev/null +++ b/SewerStammGen/HostBuilders/AddStoresHostBuilderExtensions.cs @@ -0,0 +1,21 @@ +using Microsoft.Extensions.Hosting; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.HostBuilders +{ + static class AddStoresHostBuilderExtensions + { + public static IHostBuilder AddStores(this IHostBuilder hostBuilder) + { + hostBuilder.ConfigureServices(services => + { + + }); + return hostBuilder; + } + } +} diff --git a/SewerStammGen/HostBuilders/AddViewModelsHostBuilderExtensions.cs b/SewerStammGen/HostBuilders/AddViewModelsHostBuilderExtensions.cs new file mode 100644 index 0000000..c225ff2 --- /dev/null +++ b/SewerStammGen/HostBuilders/AddViewModelsHostBuilderExtensions.cs @@ -0,0 +1,24 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using SewerStammGen.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.HostBuilders +{ + static class AddViewModelsHostBuilderExtensions + { + public static IHostBuilder AddViewModels(this IHostBuilder hostBuilder) + { + hostBuilder.ConfigureServices(services => + { + services.AddTransient(); + }); + + return hostBuilder; + } + } +} diff --git a/SewerStammGen/Interface/IViewModelAbstractFactory.cs b/SewerStammGen/Interface/IViewModelAbstractFactory.cs new file mode 100644 index 0000000..00a887a --- /dev/null +++ b/SewerStammGen/Interface/IViewModelAbstractFactory.cs @@ -0,0 +1,14 @@ +using SewerStammGen.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.Interface +{ + public interface IViewModelAbstractFactory + { + BaseViewModel CreateViewModel(EMainWindowViewType viewType); + } +} diff --git a/SewerStammGen/Interface/Navigator/IMainWindowNavigator.cs b/SewerStammGen/Interface/Navigator/IMainWindowNavigator.cs new file mode 100644 index 0000000..4b94778 --- /dev/null +++ b/SewerStammGen/Interface/Navigator/IMainWindowNavigator.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.Interface.Navigator +{ + internal interface IMainWindowNavigator : INavigator + { + } +} diff --git a/SewerStammGen/Interface/Navigator/INavigator.cs b/SewerStammGen/Interface/Navigator/INavigator.cs new file mode 100644 index 0000000..bb3a267 --- /dev/null +++ b/SewerStammGen/Interface/Navigator/INavigator.cs @@ -0,0 +1,19 @@ +using SewerStammGen.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.Interface.Navigator +{ + internal interface INavigator + { + BaseViewModel CurrentViewModel + { + get; + set; + } + event Action StateChanged; + } +} diff --git a/SewerStammGen/MainWindow.xaml b/SewerStammGen/MainWindow.xaml index 4352748..b2ce5b6 100644 --- a/SewerStammGen/MainWindow.xaml +++ b/SewerStammGen/MainWindow.xaml @@ -3,10 +3,16 @@ 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.Views" xmlns:local="clr-namespace:SewerStammGen" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> - + + + + + + diff --git a/SewerStammGen/MainWindow.xaml.cs b/SewerStammGen/MainWindow.xaml.cs index b7de14d..fcda81c 100644 --- a/SewerStammGen/MainWindow.xaml.cs +++ b/SewerStammGen/MainWindow.xaml.cs @@ -23,6 +23,8 @@ namespace SewerStammGen public MainWindow() { InitializeComponent(); + + SewerConnector.DataContext = new ViewModel.SewerConnectorViewModel(); } } } diff --git a/SewerStammGen/SewerStammGen.csproj b/SewerStammGen/SewerStammGen.csproj index d84276c..819c0f6 100644 --- a/SewerStammGen/SewerStammGen.csproj +++ b/SewerStammGen/SewerStammGen.csproj @@ -7,4 +7,16 @@ true + + + + + + + + + Always + + + diff --git a/SewerStammGen/SewerStammGen.csproj.user b/SewerStammGen/SewerStammGen.csproj.user index 88a5509..3f5f9d0 100644 --- a/SewerStammGen/SewerStammGen.csproj.user +++ b/SewerStammGen/SewerStammGen.csproj.user @@ -1,4 +1,34 @@  + + + Designer + + + + + Code + + + Code + + + Code + + + + + Designer + + + Designer + + + Designer + + + Designer + + \ No newline at end of file diff --git a/SewerStammGen/ViewModel/BaseViewModel.cs b/SewerStammGen/ViewModel/BaseViewModel.cs new file mode 100644 index 0000000..5861806 --- /dev/null +++ b/SewerStammGen/ViewModel/BaseViewModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.ViewModel +{ + public delegate TViewModel CreateViewModel() where TViewModel : BaseViewModel; + public class BaseViewModel : ObservableObject + { + public virtual void Dispose() { } + } +} diff --git a/SewerStammGen/ViewModel/IViewModel.cs b/SewerStammGen/ViewModel/IViewModel.cs new file mode 100644 index 0000000..9ea11a4 --- /dev/null +++ b/SewerStammGen/ViewModel/IViewModel.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.ViewModel +{ + public interface IViewModel : INotifyPropertyChanged + { + + } + + public interface IViewModel : IViewModel + { + [Browsable(false)] + [Bindable(false)] + TModel Model { get; set; } + } +} diff --git a/SewerStammGen/ViewModel/MainWindowViewModel.cs b/SewerStammGen/ViewModel/MainWindowViewModel.cs new file mode 100644 index 0000000..92f0392 --- /dev/null +++ b/SewerStammGen/ViewModel/MainWindowViewModel.cs @@ -0,0 +1,21 @@ +using SewerStammGen.Interface.Navigator; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.ViewModel +{ + internal class MainWindowViewModel : BaseViewModel + { + public IMainWindowNavigator Navigator { get; set; } + public BaseViewModel CurrentView => Navigator.CurrentViewModel; + + public MainWindowViewModel(IMainWindowNavigator navigator) + { + Navigator = navigator; + } + } +} diff --git a/SewerStammGen/ViewModel/ObservableObject.cs b/SewerStammGen/ViewModel/ObservableObject.cs new file mode 100644 index 0000000..22ee986 --- /dev/null +++ b/SewerStammGen/ViewModel/ObservableObject.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace SewerStammGen.ViewModel +{ + public class ObservableObject : INotifyPropertyChanged + { + public event PropertyChangedEventHandler? PropertyChanged; + protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + } +} \ No newline at end of file diff --git a/SewerStammGen/ViewModel/RelayCommand.cs b/SewerStammGen/ViewModel/RelayCommand.cs new file mode 100644 index 0000000..db205d4 --- /dev/null +++ b/SewerStammGen/ViewModel/RelayCommand.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; + +namespace SewerStammGen.ViewModel +{ + [Serializable] + class RelayCommand : ICommand + { + #region Fields + private readonly Action execute; + private readonly Predicate canExecute; + #endregion + + #region Constructors + public RelayCommand(Action execute) : this(execute, null) { } + + public RelayCommand(Action execute, Predicate canExecute) + { + if (execute == null) throw new ArgumentNullException("execute"); + this.execute = execute; + this.canExecute = canExecute; + } + #endregion + + #region ICommand Members + [DebuggerStepThrough] + public bool CanExecute(object parameter) + { + if (canExecute == null) return true; + return canExecute(parameter); + } + + public event EventHandler CanExecuteChanged + { + add { CommandManager.RequerySuggested += value; } + remove { CommandManager.RequerySuggested -= value; } + } + + public void Execute(object parameter) + { + execute(parameter); + } + #endregion + } +} diff --git a/SewerStammGen/ViewModel/SewerConnectorViewModel.cs b/SewerStammGen/ViewModel/SewerConnectorViewModel.cs new file mode 100644 index 0000000..0d46598 --- /dev/null +++ b/SewerStammGen/ViewModel/SewerConnectorViewModel.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.ViewModel +{ + class SewerConnectorViewModel : ViewModel + { + } +} diff --git a/SewerStammGen/ViewModel/State/Navigation/MainWindowNavigator.cs b/SewerStammGen/ViewModel/State/Navigation/MainWindowNavigator.cs new file mode 100644 index 0000000..8a5c0bc --- /dev/null +++ b/SewerStammGen/ViewModel/State/Navigation/MainWindowNavigator.cs @@ -0,0 +1,25 @@ +using SewerStammGen.Interface.Navigator; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.ViewModel.State.Navigation +{ + internal class MainWindowNavigator : ObservableObject, IMainWindowNavigator + { + private BaseViewModel _currentViewModel; + public BaseViewModel CurrentViewModel + { + get => _currentViewModel; + set + { + _currentViewModel?.Dispose(); + _currentViewModel = value; + StateChanged?.Invoke(); + } + } + public event Action StateChanged; + } +} diff --git a/SewerStammGen/ViewModel/ViewModel.cs b/SewerStammGen/ViewModel/ViewModel.cs new file mode 100644 index 0000000..a878ffe --- /dev/null +++ b/SewerStammGen/ViewModel/ViewModel.cs @@ -0,0 +1,179 @@ +using Syncfusion.UI.Xaml.Collections.Generic; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.ViewModel +{ + [Serializable] + public abstract class ViewModel : IViewModel + { + protected ViewModel() + { + var initializationTask = new Task(() => Initialize()); + initializationTask.ContinueWith(result => InitializationCompletedCallback(result)); + initializationTask.Start(); + } + + + /// + /// Initializes this instance. + /// + protected virtual void Initialize() + { + } + + + /// + /// Callback method for the async initialization. + /// + /// The result. + private void InitializationCompletedCallback(IAsyncResult result) + { + var initializationCompleted = InitializationCompleted; + if (initializationCompleted != null) + { + InitializationCompleted(this, new AsyncCompletedEventArgs(null, !result.IsCompleted, result.AsyncState)); + } + InitializationCompleted = null; + } + + /// + /// Occurs when the initialization is completed. + /// + public event AsyncCompletedEventHandler InitializationCompleted; + + /// + /// Called when a property has changed. + /// + /// Name of the property. + /// + protected virtual void OnPropertyChanged([CallerMemberName]string propertyName = "") + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + + #region INotifyPropertyChanged Members + + /// + /// Occurs when a property value changes. + /// + /// + public event PropertyChangedEventHandler PropertyChanged; + + #endregion + } + + public abstract class ViewModel : ViewModel, IViewModel where TModel : class + { + private TModel model; + + /// + /// The Model encapsulated by this ViewModel. + /// + /// If you change this, all needed PropertyChanged events will be raised automatically. + [Browsable(false)] + [Bindable(false)] + public TModel Model + { + get + { + return model; + } + set + { + if (Model != value) + { + // get all properties + var properties = this.GetType().GetProperties(BindingFlags.Public); + // all values before the model has changed + var oldValues = properties.Select(p => p.GetValue(this, null)); + var enumerator = oldValues.GetEnumerator(); + + model = value; + + // call OnPropertyChanged for all changed properties + foreach (var property in properties) + { + enumerator.MoveNext(); + var oldValue = enumerator.Current; + var newValue = property.GetValue(this, null); + + if ((oldValue == null && newValue != null) + || (oldValue != null && newValue == null) + || (!oldValue.Equals(newValue))) + { + OnPropertyChanged(property.Name); + } + } + } + } + } + + + /// + /// Initializes a new instance of the class. + /// + /// + protected ViewModel(TModel model) + : base() + { + this.Model = model; + } + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + public override int GetHashCode() + { + return Model.GetHashCode(); + } + + /// + /// Determines whether the specified is equal to this instance. + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + public override bool Equals(object obj) + { + if (obj == null) + return false; + + var other = obj as IViewModel; + + if (other == null) + return false; + + return Equals(other); + } + + + /// + /// Determines whether the specified is equal to this instance. + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + public bool Equals(IViewModel other) + { + if (other == null) + return false; + + if (Model == null) + return Model == other.Model; + + return Model.Equals(other.Model); + } + } +} diff --git a/SewerStammGen/Views/EditSchacht.xaml b/SewerStammGen/Views/EditSchacht.xaml new file mode 100644 index 0000000..d3ae6ec --- /dev/null +++ b/SewerStammGen/Views/EditSchacht.xaml @@ -0,0 +1,14 @@ + + + + + + diff --git a/SewerStammGen/Views/EditSchacht.xaml.cs b/SewerStammGen/Views/EditSchacht.xaml.cs new file mode 100644 index 0000000..2052993 --- /dev/null +++ b/SewerStammGen/Views/EditSchacht.xaml.cs @@ -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 SewerStammGen.Views +{ + /// + /// Interaktionslogik für EditSchacht.xaml + /// + public partial class EditSchacht : Page + { + public EditSchacht() + { + InitializeComponent(); + } + } +} diff --git a/SewerStammGen/Views/UCNormXML.xaml b/SewerStammGen/Views/UCNormXML.xaml new file mode 100644 index 0000000..368e785 --- /dev/null +++ b/SewerStammGen/Views/UCNormXML.xaml @@ -0,0 +1,36 @@ + + + + + + + + DIN - EN 13508 - 2: 2003 / Ohne nationale Festlegung + DIN - EN 13508 - 2: 2003 / Nationale Festlegung DWA M 149-2 + DIN - EN 13508 - 2: 2003 / andere nationale Festlegung (Bemerkung erforderlich) + ISYBAU 2001 + ISYBAU 1996 + anderes Kodiersystem (Bemerkung erfolrderlich) + DIN - EN 13508 - 2: 2003 / Nationale Festlegung Arbeitshilfen Abwasser + DIN - EN 13508 - 2: 2011 / Ohne nationale Festlegung + DIN - EN 13508 - 2: 2011 / Nationale Festlegung DWA M 149 - 2 + DIN - EN 13508 - 2: 2011 / Nationale Festlegung Arbeitshilfen Abwasser + + + + Arbeitshilfen Abwasser (ISYBAU 1996/2001) + Arbeitshilfen Abwasser (ISYBAU 2006) + Sonstige Festlegungen + keine Angaben + Arbeitshilfen Abwasser (ISYBAU 2013) + Arbeitshilfen Abwasser (ISYBAU 2017) + + + diff --git a/SewerStammGen/Views/UCNormXML.xaml.cs b/SewerStammGen/Views/UCNormXML.xaml.cs new file mode 100644 index 0000000..bce2000 --- /dev/null +++ b/SewerStammGen/Views/UCNormXML.xaml.cs @@ -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 SewerStammGen.Views +{ + /// + /// Interaktionslogik für UCNormXML.xaml + /// + public partial class UCNormXML : UserControl + { + public UCNormXML() + { + InitializeComponent(); + } + } +} diff --git a/SewerStammGen/Views/UCSewerConnector.xaml b/SewerStammGen/Views/UCSewerConnector.xaml new file mode 100644 index 0000000..f65bf30 --- /dev/null +++ b/SewerStammGen/Views/UCSewerConnector.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + diff --git a/SewerStammGen/Views/UCSewerConnector.xaml.cs b/SewerStammGen/Views/UCSewerConnector.xaml.cs new file mode 100644 index 0000000..35f7b3f --- /dev/null +++ b/SewerStammGen/Views/UCSewerConnector.xaml.cs @@ -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 SewerStammGen.Views +{ + /// + /// Interaktionslogik für UCSewerConnector.xaml + /// + public partial class UCSewerConnector : UserControl + { + public UCSewerConnector() + { + InitializeComponent(); + } + } +} diff --git a/SewerStammGen/appsettings.json b/SewerStammGen/appsettings.json new file mode 100644 index 0000000..0da8e7f --- /dev/null +++ b/SewerStammGen/appsettings.json @@ -0,0 +1,7 @@ +{ + "ConnectionStrings": { + "databaseToUse": "default", + "default": "Host = localhost; Database = dasaso; Username = kansan; Password = kansan", + "sqlite": "Data Source=database.db" + } +} \ No newline at end of file diff --git a/Shared/Contracts/IExport.cs b/Shared/Contracts/IExport.cs new file mode 100644 index 0000000..ce7fa52 --- /dev/null +++ b/Shared/Contracts/IExport.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Shared.Contracts +{ + internal interface IExport + { + bool Export(); + } +} diff --git a/Shared/Domain/Manhole.cs b/Shared/Contracts/IImport.cs similarity index 69% rename from Shared/Domain/Manhole.cs rename to Shared/Contracts/IImport.cs index 2bf8240..34e8e5d 100644 --- a/Shared/Domain/Manhole.cs +++ b/Shared/Contracts/IImport.cs @@ -4,9 +4,10 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Shared.Domain +namespace Shared.Contracts { - internal class Manhole + internal interface IImport { + } } diff --git a/Shared/Domain/Kanal.cs b/Shared/Domain/Kanal.cs new file mode 100644 index 0000000..d06c001 --- /dev/null +++ b/Shared/Domain/Kanal.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Shared.Domain +{ + internal class Kanal + { + Schacht? startSchacht = null; + Schacht? endSchacht = null; + string objektbezeichnung = ""; + } +} diff --git a/Shared/Domain/Schacht.cs b/Shared/Domain/Schacht.cs new file mode 100644 index 0000000..46d1c67 --- /dev/null +++ b/Shared/Domain/Schacht.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Shared.Domain +{ + internal class Schacht + { + string objektbezeichnung = ""; + decimal rechtsWert; + decimal hochwert; + decimal hoehe; + } +} diff --git a/Stammdatengenerator.sln b/Stammdatengenerator.sln index 80c744b..279c2ab 100644 --- a/Stammdatengenerator.sln +++ b/Stammdatengenerator.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 17.5.33502.453 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SewerStammGen", "SewerStammGen\SewerStammGen.csproj", "{7052AE7B-9E3C-4C04-9756-7488D21512C1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{3A47BD31-36C2-45C4-9609-D0D9D92A993B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {7052AE7B-9E3C-4C04-9756-7488D21512C1}.Debug|Any CPU.Build.0 = Debug|Any CPU {7052AE7B-9E3C-4C04-9756-7488D21512C1}.Release|Any CPU.ActiveCfg = Release|Any CPU {7052AE7B-9E3C-4C04-9756-7488D21512C1}.Release|Any CPU.Build.0 = Release|Any CPU + {3A47BD31-36C2-45C4-9609-D0D9D92A993B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A47BD31-36C2-45C4-9609-D0D9D92A993B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A47BD31-36C2-45C4-9609-D0D9D92A993B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A47BD31-36C2-45C4-9609-D0D9D92A993B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE