ObjekteListe angefangen
This commit is contained in:
28
KanSan/UI/Objekte/FrmNewObjekt.xaml
Normal file
28
KanSan/UI/Objekte/FrmNewObjekt.xaml
Normal file
@@ -0,0 +1,28 @@
|
||||
<Window x:Class="KanSan.UI.FrmNewObjekt"
|
||||
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:local="clr-namespace:KanSan.UI"
|
||||
mc:Ignorable="d"
|
||||
Title="FrmNewObjekt" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Button Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Content="Speichern" Name="Speichern" Click="Speichern_Click" />
|
||||
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding PunktOben}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding PunktUnten}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Strasse}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding DN}" />
|
||||
</Grid>
|
||||
</Window>
|
||||
34
KanSan/UI/Objekte/FrmNewObjekt.xaml.cs
Normal file
34
KanSan/UI/Objekte/FrmNewObjekt.xaml.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using KanSan.Base.Models;
|
||||
using KanSan.ViewModel.Objekte;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
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.Shapes;
|
||||
|
||||
namespace KanSan.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für FrmNewObjekt.xaml
|
||||
/// </summary>
|
||||
public partial class FrmNewObjekt : Window
|
||||
{
|
||||
public FrmNewObjekt(Baustelle baustelle)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new ObjekteAddViewModel(baustelle);
|
||||
}
|
||||
|
||||
private void Speichern_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
(DataContext as ObjekteAddViewModel).Hinzufügen();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
KanSan/UI/Objekte/UCObjekteList.xaml
Normal file
37
KanSan/UI/Objekte/UCObjekteList.xaml
Normal file
@@ -0,0 +1,37 @@
|
||||
<UserControl x:Class="KanSan.UI.UCObjekteList"
|
||||
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:KanSan.UI"
|
||||
xmlns:sd ="clr-namespace:KanSan.SampleData"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1024" d:DesignWidth="5000">
|
||||
<d:UserControl.DataContext>
|
||||
<sd:ObjekteListViewModelSampleData />
|
||||
</d:UserControl.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
</Grid.RowDefinitions>
|
||||
<TreeView ItemsSource="{Binding KanalObjekte}">
|
||||
|
||||
</TreeView>
|
||||
<!--<DataGrid ItemsSource="{Binding KanalObjekte}" Name="dgObjekte" AutoGenerateColumns="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Strasse" Binding="{Binding StrasseName}" />
|
||||
<DataGridTextColumn Header="Objektnummer" Binding="{Binding ObjektNummer}" />
|
||||
<DataGridTextColumn Header="Durchmesser" Binding="{Binding DN}" />
|
||||
<DataGridTextColumn Header="Material" Binding="{Binding Material}" />
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>-->
|
||||
<Button Grid.Row="1" x:Name="ProjektSelect" Content="Objekt Auswählen" />
|
||||
<Button Grid.Row="2" Name="ProjektEdit" Content="Objekt Editieren" />
|
||||
<Button Grid.Row="3" Name="ObjektNew" Content="Neue Objekt Hinzufügen" Click="ObjektNew_Click" />
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
37
KanSan/UI/Objekte/UCObjekteList.xaml.cs
Normal file
37
KanSan/UI/Objekte/UCObjekteList.xaml.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using KanSan.Base.Models;
|
||||
using KanSan.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
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 KanSan.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für UCObjekteList.xaml
|
||||
/// </summary>
|
||||
public partial class UCObjekteList : UserControl
|
||||
{
|
||||
Baustelle baustelle;
|
||||
public UCObjekteList(Baustelle baustelle)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.baustelle = baustelle;
|
||||
this.DataContext = new ObjekteListViewModel(baustelle);
|
||||
}
|
||||
|
||||
private void ObjektNew_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrmNewObjekt frmNewObjekt = new FrmNewObjekt(baustelle);
|
||||
frmNewObjekt.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user