Files
Prog4_Beadando/WD7UVN_SzTGUI_2023242.Client.WPF/MainWindow.xaml
2024-04-30 10:16:25 +02:00

139 lines
6.3 KiB
XML

<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.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:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels"
mc:Ignorable="d"
Title="Company database manager" Height="450" Width="900">
<Window.DataContext>
<local:MainWindowViewModel/>
</Window.DataContext>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="8*" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<ListBox Grid.Row="0" ItemsSource="{Binding Services}" SelectedItem="{Binding SelectedService}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding NAME}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="1" Rows="3">
<Button Content="Delete selected" Command="{Binding DeleteServiceCommand}"></Button>
<Button Content="Create new" Command="{Binding CreateServiceCommand}"></Button>
<Button Content="Expand all" Click="ExpandAllServices"/>
</UniformGrid>
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="8*" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<ListBox Grid.Row="0" ItemsSource="{Binding Customers}" SelectedItem="{Binding SelectedCustomer}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding NAME}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="1" Rows="3">
<Button Content="Delete selected" Command="{Binding DeleteCustomerCommand}"></Button>
<Button Content="Create new" Command="{Binding CreateCustomerCommand}"></Button>
<Button Content="Expand all" Click="ExpandAllCustomers"/>
</UniformGrid>
</Grid>
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="8*" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<ListBox Grid.Row="0" ItemsSource="{Binding MaintainerTeams}" SelectedItem="{Binding SelectedMaintainerTeam}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding NAME}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="1" Rows="3">
<Button Content="Delete selected" Command="{Binding DeleteMaintainerTeamCommand}"></Button>
<Button Content="Create new" Command="{Binding CreateMaintainerTeamCommand}"></Button>
<Button Content="Expand all" Click="ExpandAllMaintainerTeams"/>
</UniformGrid>
</Grid>
<Grid Grid.Column="3">
<Grid.RowDefinitions>
<RowDefinition Height="8*" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<ListBox Grid.Row="0" ItemsSource="{Binding Employees}" SelectedItem="{Binding SelectedEmployee}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding NAME}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="1" Rows="3">
<Button Content="Delete selected" Command="{Binding DeleteEmployeeCommand}"></Button>
<Button Content="Create new" Command="{Binding CreateEmployeeCommand}"></Button>
<Button Content="Expand all" Click="ExpandAllEmployees"/>
</UniformGrid>
</Grid>
</Grid>
</Window>