SinglePage erweitert
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
public delegate TViewModel CreateViewModel<TViewModel>() where TViewModel : BaseViewModel;
|
||||
public class BaseViewModel : ObservableObject
|
||||
{
|
||||
|
||||
public virtual void Dispose() { }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ namespace DaSaSo.ViewModel.Commands
|
||||
|
||||
public override async Task ExecuteAsync(object? parameter)
|
||||
{
|
||||
if(parameter is EViewType)
|
||||
if(parameter is EMainWindowViewType)
|
||||
{
|
||||
EViewType viewType = (EViewType)parameter;
|
||||
EMainWindowViewType viewType = (EMainWindowViewType)parameter;
|
||||
_navigator.CurrentViewModel = _viewModelFactory.CreateViewModel(viewType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace DaSaSo.ViewModel.Enums
|
||||
{
|
||||
public enum EViewType
|
||||
public enum EMainWindowViewType
|
||||
{
|
||||
Home,
|
||||
Clients,
|
||||
@@ -11,7 +11,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace DaSaSo.ViewModel.Factories
|
||||
{
|
||||
public class ViewModelAbstractFactory : IViewModelAbstractFactory
|
||||
public class MainWindowViewModelFactory : IViewModelAbstractFactory
|
||||
{
|
||||
private CreateViewModel<HomeViewModel> _createHomeViewModel;
|
||||
private CreateViewModel<ClientListViewModel> _createClientListViewModel;
|
||||
@@ -20,7 +20,7 @@ namespace DaSaSo.ViewModel.Factories
|
||||
private CreateViewModel<BuildingsiteListViewModel> _createBuildingsiteListViewModel;
|
||||
private CreateViewModel<SewerObjectListViewModel> _createSewerObjectListViewModel;
|
||||
|
||||
public ViewModelAbstractFactory(
|
||||
public MainWindowViewModelFactory(
|
||||
CreateViewModel<HomeViewModel> createHomeViewModel,
|
||||
CreateViewModel<ClientListViewModel> createClientListViewModel,
|
||||
CreateViewModel<ClientEditViewModel> createClientEditViewModel,
|
||||
@@ -35,22 +35,22 @@ namespace DaSaSo.ViewModel.Factories
|
||||
_createSewerObjectListViewModel = createSewerObjectListViewModel;
|
||||
}
|
||||
|
||||
public BaseViewModel CreateViewModel(EViewType viewType)
|
||||
public BaseViewModel CreateViewModel(EMainWindowViewType viewType)
|
||||
{
|
||||
|
||||
switch (viewType)
|
||||
{
|
||||
case EViewType.Home:
|
||||
case EMainWindowViewType.Home:
|
||||
return _createHomeViewModel();
|
||||
case EViewType.Clients:
|
||||
case EMainWindowViewType.Clients:
|
||||
return _createClientListViewModel();
|
||||
case EViewType.ClientEdit:
|
||||
case EMainWindowViewType.ClientEdit:
|
||||
return _createClientEditViewModel();
|
||||
case EViewType.Projects:
|
||||
case EMainWindowViewType.Projects:
|
||||
return _createProjektListViewModel();
|
||||
case EViewType.Buildingsites:
|
||||
case EMainWindowViewType.Buildingsites:
|
||||
return _createBuildingsiteListViewModel();
|
||||
case EViewType.SewerObjects:
|
||||
case EMainWindowViewType.SewerObjects:
|
||||
return _createSewerObjectListViewModel();
|
||||
|
||||
default:
|
||||
@@ -12,12 +12,17 @@ namespace DaSaSo.ViewModel.Interface
|
||||
event EventHandler? ClientChanged;
|
||||
event EventHandler? ProjectChanged;
|
||||
event EventHandler? BuildingSiteChanged;
|
||||
event EventHandler? SewerObjectChanged;
|
||||
Client AktuellClient { get; }
|
||||
Project AktuellProjekt { get; }
|
||||
Buildingsite AktuellBaustelle { get; }
|
||||
SewerObject AktuellSewerObject { get; }
|
||||
|
||||
void SetClient(Client client);
|
||||
void SetProject(Project project);
|
||||
void SetBuildingSite(Buildingsite buildingsite);
|
||||
void SetSewerObject(SewerObject sewerObject);
|
||||
void ResetProject();
|
||||
void ResetBuildingSite();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,6 @@ namespace DaSaSo.ViewModel.Interface
|
||||
public interface INavigator
|
||||
{
|
||||
BaseViewModel CurrentViewModel { get; set; }
|
||||
|
||||
event Action StateChanged;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@ namespace DaSaSo.ViewModel.Interface
|
||||
{
|
||||
public interface IViewModelAbstractFactory
|
||||
{
|
||||
BaseViewModel CreateViewModel(EViewType viewType);
|
||||
BaseViewModel CreateViewModel(EMainWindowViewType viewType);
|
||||
}
|
||||
}
|
||||
|
||||
13
DaSaSo.ViewModel/Interface/IWindowService.cs
Normal file
13
DaSaSo.ViewModel/Interface/IWindowService.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DaSaSo.ViewModel.Interface
|
||||
{
|
||||
public interface IWindowService
|
||||
{
|
||||
void ShowWindow<T>(object DataContext);
|
||||
}
|
||||
}
|
||||
@@ -38,10 +38,11 @@ namespace DaSaSo.ViewModel
|
||||
{
|
||||
SewerObject? SelectedSewer = GetSelectedSewer();
|
||||
if (SelectedSewer == null) return;
|
||||
|
||||
Debugger.Break();
|
||||
}
|
||||
|
||||
private SewerObject? GetSelectedSewer()
|
||||
public SewerObject? GetSelectedSewer()
|
||||
{
|
||||
SewerObject? result = null;
|
||||
foreach(SewerObjectsToStreet? streetcollection in SewerObjects)
|
||||
@@ -57,7 +58,6 @@ namespace DaSaSo.ViewModel
|
||||
if (result != null)
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,14 +10,18 @@ namespace DaSaSo.ViewModel.State.ActualState
|
||||
{
|
||||
public class ActualProject : IActualProject
|
||||
{
|
||||
public Client AktuellClient { get; private set; }
|
||||
public Buildingsite AktuellBaustelle { get; private set; }
|
||||
public Project AktuellProjekt { get; private set; }
|
||||
public Client? AktuellClient { get; private set; }
|
||||
public Buildingsite? AktuellBaustelle { get; private set; }
|
||||
public Project? AktuellProjekt { get; private set; }
|
||||
public SewerObject? AktuellSewerObject { get; private set; }
|
||||
|
||||
|
||||
#region events
|
||||
public event EventHandler? ClientChanged;
|
||||
public event EventHandler? ProjectChanged;
|
||||
public event EventHandler? BuildingSiteChanged;
|
||||
public event EventHandler? SewerObjectChanged;
|
||||
|
||||
protected void OnClientChanged()
|
||||
{
|
||||
ClientChanged?.Invoke(this, new EventArgs());
|
||||
@@ -48,5 +52,22 @@ namespace DaSaSo.ViewModel.State.ActualState
|
||||
AktuellBaustelle = buildingsite;
|
||||
OnBuildingSiteChanged();
|
||||
}
|
||||
|
||||
public void SetSewerObject(SewerObject sewerObject)
|
||||
{
|
||||
AktuellSewerObject = sewerObject;
|
||||
|
||||
}
|
||||
|
||||
public void ResetProject()
|
||||
{
|
||||
SetProject(null);
|
||||
ResetBuildingSite();
|
||||
}
|
||||
|
||||
public void ResetBuildingSite()
|
||||
{
|
||||
SetBuildingSite(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,11 @@ namespace DaSaSo.ViewModel.State.Navigation
|
||||
get => _currentViewModel;
|
||||
set
|
||||
{
|
||||
_currentViewModel?.Dispose();
|
||||
_currentViewModel = value;
|
||||
OnPropertyChanged();
|
||||
StateChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
public event Action StateChanged;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,9 @@ namespace DaSaSo.ViewModel
|
||||
public bool CanSelectBuildingSite { get => _actualProject.AktuellProjekt != null; }
|
||||
public bool CanSelectSewerObjects { get => _actualProject.AktuellBaustelle != null; }
|
||||
|
||||
public INavigator Navigator { get; set; }
|
||||
public INavigator _navigator { get; set; }
|
||||
public ICommand UpdateCurrentViewModelCommand { get; }
|
||||
public BaseViewModel CurrentViewModel => _navigator.CurrentViewModel;
|
||||
|
||||
public string ClientName
|
||||
{
|
||||
@@ -70,32 +71,43 @@ namespace DaSaSo.ViewModel
|
||||
|
||||
public MainWindowViewModel(INavigator navigator,IViewModelAbstractFactory viewModelFactory, IActualProject actualProject)
|
||||
{
|
||||
this.Navigator = navigator;
|
||||
this._navigator = navigator;
|
||||
this.viewModelFactory = viewModelFactory;
|
||||
|
||||
_navigator.StateChanged += _navigator_StateChanged;
|
||||
|
||||
UpdateCurrentViewModelCommand = new UpdateCurrentViewModelCommand(navigator, viewModelFactory);
|
||||
UpdateCurrentViewModelCommand.Execute(EViewType.Home);
|
||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Home);
|
||||
_actualProject = actualProject;
|
||||
_actualProject.ClientChanged += _actualProject_ClientChanged;
|
||||
_actualProject.ProjectChanged += _actualProject_ProjectChanged;
|
||||
_actualProject.BuildingSiteChanged += _actualProject_BuildingSiteChanged;
|
||||
}
|
||||
|
||||
private void _navigator_StateChanged()
|
||||
{
|
||||
OnPropertyChanged(nameof(CurrentViewModel));
|
||||
}
|
||||
|
||||
private void _actualProject_BuildingSiteChanged(object? sender, EventArgs e)
|
||||
{
|
||||
Buildingsitename = _actualProject.AktuellBaustelle.BuildingSiteNumber;
|
||||
OnPropertyChanged(nameof(CanSelectSewerObjects));
|
||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.SewerObjects);
|
||||
}
|
||||
|
||||
private void _actualProject_ProjectChanged(object? sender, EventArgs e)
|
||||
{
|
||||
Projektname = _actualProject.AktuellProjekt.Name;
|
||||
OnPropertyChanged(nameof(CanSelectBuildingSite));
|
||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Buildingsites);
|
||||
}
|
||||
|
||||
private void _actualProject_ClientChanged(object? sender, EventArgs e)
|
||||
{
|
||||
ClientName = _actualProject.AktuellClient.Firstname;
|
||||
OnPropertyChanged(nameof(CanSelectProject));
|
||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Projects);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace DaSaSo.Wpf
|
||||
string connectionString = context.Configuration.GetConnectionString("default");
|
||||
|
||||
services.AddSingleton<DaSaSoDbContextFactory>(new DaSaSoDbContextFactory(connectionString));
|
||||
|
||||
services.AddSingleton<IDataService<Client>, ClientDataService>();
|
||||
services.AddSingleton<IDataService<Project>, ProjectDataService>();
|
||||
services.AddSingleton<IDataService<Buildingsite>, BuildingsiteDataService>();
|
||||
@@ -48,7 +49,7 @@ namespace DaSaSo.Wpf
|
||||
|
||||
|
||||
|
||||
services.AddSingleton<IViewModelAbstractFactory, ViewModelAbstractFactory>();
|
||||
services.AddSingleton<IViewModelAbstractFactory, MainWindowViewModelFactory>();
|
||||
services.AddSingleton<CreateViewModel<ClientEditViewModel>>(services =>
|
||||
{
|
||||
return () => new ClientEditViewModel(
|
||||
@@ -115,6 +116,9 @@ namespace DaSaSo.Wpf
|
||||
|
||||
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
|
||||
window.Show();
|
||||
|
||||
|
||||
|
||||
base.OnStartup(e);
|
||||
}
|
||||
|
||||
|
||||
29
DaSaSo.Wpf/Controls/MainWindowNavigationBar.xaml
Normal file
29
DaSaSo.Wpf/Controls/MainWindowNavigationBar.xaml
Normal file
@@ -0,0 +1,29 @@
|
||||
<UserControl x:Class="DaSaSo.Wpf.Controls.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:local="clr-namespace:DaSaSo.Wpf.Controls"
|
||||
xmlns:nav="clr-namespace:DaSaSo.ViewModel.Enums;assembly=DaSaSo.ViewModel"
|
||||
xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel"
|
||||
|
||||
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<converters:EqualValueToParameterConverter x:Key="EqualValueToParameterConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<RadioButton Grid.Row="0" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ClientListViewModel}}" Content="Kunden" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="True" CommandParameter="{x:Static nav:EMainWindowViewType.Clients}"/>
|
||||
<RadioButton Grid.Row="1" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ProjectListViewModel}}" Content="Projekte" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectProject}" CommandParameter="{x:Static nav:EMainWindowViewType.Projects}" />
|
||||
<RadioButton Grid.Row="2" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:BuildingsiteListViewModel}}" Content="Baustellen" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectBuildingSite}" CommandParameter="{x:Static nav:EMainWindowViewType.Buildingsites}" />
|
||||
<RadioButton Grid.Row="3" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:SewerObjectListViewModel}}" Content="Objekten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectSewerObjects}" CommandParameter="{x:Static nav:EMainWindowViewType.SewerObjects}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -18,9 +18,9 @@ namespace DaSaSo.Wpf.Controls
|
||||
/// <summary>
|
||||
/// Interaction logic for NavigationBar.xaml
|
||||
/// </summary>
|
||||
public partial class NavigationBar : UserControl
|
||||
public partial class MainWindowNavigationBar : UserControl
|
||||
{
|
||||
public NavigationBar()
|
||||
public MainWindowNavigationBar()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<UserControl x:Class="DaSaSo.Wpf.Controls.NavigationBar"
|
||||
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.Controls"
|
||||
xmlns:nav="clr-namespace:DaSaSo.ViewModel.Enums;assembly=DaSaSo.ViewModel" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<RadioButton Grid.Row="0" Content="Kunden" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="True" CommandParameter="{x:Static nav:EViewType.Clients}" />
|
||||
<RadioButton Grid.Row="1" Content="Projekte" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectProject}" CommandParameter="{x:Static nav:EViewType.Projects}" />
|
||||
<RadioButton Grid.Row="2" Content="Baustellen" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectBuildingSite}" CommandParameter="{x:Static nav:EViewType.Buildingsites}" />
|
||||
<RadioButton Grid.Row="3" Content="Objekten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectSewerObjects}" CommandParameter="{x:Static nav:EViewType.SewerObjects}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
16
DaSaSo.Wpf/Controls/SewerObjectNavigationBar.xaml
Normal file
16
DaSaSo.Wpf/Controls/SewerObjectNavigationBar.xaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="DaSaSo.Wpf.Controls.SewerObjectNavigationBar"
|
||||
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.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="200">
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<RadioButton Content="Stammdaten" Style="{StaticResource ToggleButtonList}" Margin="20" />
|
||||
<RadioButton Content="Schäden" Style="{StaticResource ToggleButtonList}" Margin="20" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
DaSaSo.Wpf/Controls/SewerObjectNavigationBar.xaml.cs
Normal file
28
DaSaSo.Wpf/Controls/SewerObjectNavigationBar.xaml.cs
Normal 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.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SewerObjectNavigationBar.xaml
|
||||
/// </summary>
|
||||
public partial class SewerObjectNavigationBar : UserControl
|
||||
{
|
||||
public SewerObjectNavigationBar()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
23
DaSaSo.Wpf/Converters/EqualValueToParameterConverter.cs
Normal file
23
DaSaSo.Wpf/Converters/EqualValueToParameterConverter.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DaSaSo.Wpf.Converters
|
||||
{
|
||||
public class EqualValueToParameterConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return value.ToString() == parameter.ToString();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,10 @@
|
||||
</ApplicationDefinition>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Controls\NavigationBar.xaml.cs">
|
||||
<Compile Update="Controls\MainWindowNavigationBar.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Controls\SewerObjectNavigationBar.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="View\Buildingsites\BuildingSiteListView.xaml.cs">
|
||||
@@ -28,9 +31,15 @@
|
||||
<Compile Update="View\SewerObjecte\SewerObjecteListView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="View\SewerObject\SewerMainView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Update="Controls\NavigationBar.xaml">
|
||||
<Page Update="Controls\MainWindowNavigationBar.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Controls\SewerObjectNavigationBar.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="my_controls.xaml">
|
||||
@@ -57,6 +66,9 @@
|
||||
<Page Update="View\SewerObjecte\SewerObjecteListView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="View\SewerObject\SewerMainView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Window\MainWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
|
||||
15
DaSaSo.Wpf/Service/WindowService.cs
Normal file
15
DaSaSo.Wpf/Service/WindowService.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using DaSaSo.ViewModel.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace DaSaSo.Wpf.Service
|
||||
{
|
||||
class WindowService
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
24
DaSaSo.Wpf/View/SewerObject/SewerMainView.xaml
Normal file
24
DaSaSo.Wpf/View/SewerObject/SewerMainView.xaml
Normal file
@@ -0,0 +1,24 @@
|
||||
<UserControl x:Class="DaSaSo.Wpf.View.SewerObject.SewerMainView"
|
||||
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:Controls="clr-namespace:DaSaSo.Wpf.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Controls:SewerObjectNavigationBar Grid.Column="0" />
|
||||
<ContentControl Grid.Column="1" />
|
||||
<StatusBar Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<StatusBarItem Content="Dada" />
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
DaSaSo.Wpf/View/SewerObject/SewerMainView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/SewerObject/SewerMainView.xaml.cs
Normal 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 SewerMainView.xaml
|
||||
/// </summary>
|
||||
public partial class SewerMainView : UserControl
|
||||
{
|
||||
public SewerMainView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@
|
||||
</Style>
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
<Button Content="Bearbeiten" Command="{Binding Bearbeiten}" />
|
||||
<Button Content="Bearbeiten" Name="bearbeiten" Command="{Binding Bearbeiten}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
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.SewerObjecte
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
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}"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
Title="Cosysda Sanierungs Software" Height="450" Width="800" WindowState="Maximized">
|
||||
<Window.Resources>
|
||||
<DataTemplate DataType="{x:Type viewmodel:ClientListViewModel}">
|
||||
<ClientViews:ClientListView />
|
||||
@@ -41,8 +41,8 @@
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="20" />
|
||||
</Grid.RowDefinitions>
|
||||
<controls:NavigationBar Grid.Column="0" Grid.Row="0"/>
|
||||
<ContentControl Grid.Column="1" Grid.Row="0" Content="{Binding Navigator.CurrentViewModel}" />
|
||||
<controls:MainWindowNavigationBar Grid.Column="0" Grid.Row="0"/>
|
||||
<ContentControl Grid.Column="1" Grid.Row="0" Content="{Binding CurrentViewModel}" />
|
||||
<StatusBar Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<StatusBarItem Content="{Binding ClientName}" />
|
||||
<StatusBarItem Content="{Binding Projektname}" />
|
||||
|
||||
Reference in New Issue
Block a user