Files
Prog4_Beadando/WD7UVN_SzTGUI_2023242.Client.WPF/MainWindow.xaml

151 lines
6.9 KiB
Plaintext
Raw Normal View History

<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"
2024-03-31 10:03:31 +02:00
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels"
mc:Ignorable="d"
2024-03-26 12:54:51 +01:00
Title="Company database manager" Height="450" Width="900">
2024-03-31 10:03:31 +02:00
<Window.DataContext>
<local:MainWindowViewModel/>
</Window.DataContext>
<Grid>
2024-03-26 12:54:51 +01:00
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="7*" />
<RowDefinition Height="2*" />
2024-03-26 12:54:51 +01:00
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="Services" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ListBox Grid.Row="1" 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>
2024-03-26 12:54:51 +01:00
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding NAME}"/>
2024-03-26 12:54:51 +01:00
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="2" Rows="3">
<Button Content="Delete selected" Command="{Binding DeleteServiceCommand}"></Button>
<Button Content="Create new" Click="CreateNewService"></Button>
<Button Content="Expand all" Click="ExpandAllServices"/>
</UniformGrid>
2024-03-26 12:54:51 +01:00
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="7*" />
<RowDefinition Height="2*" />
2024-03-26 12:54:51 +01:00
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="Customers" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ListBox Grid.Row="1" 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>
2024-03-26 12:54:51 +01:00
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding NAME}"/>
2024-03-26 12:54:51 +01:00
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="2" Rows="3">
<Button Content="Delete selected" Command="{Binding DeleteCustomerCommand}"></Button>
<Button Content="Create new" Click="CreateNewCustomer"></Button>
<Button Content="Expand all" Click="ExpandAllCustomers"/>
</UniformGrid>
2024-03-26 12:54:51 +01:00
</Grid>
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="7*" />
<RowDefinition Height="2*" />
2024-03-26 12:54:51 +01:00
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="Teams" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ListBox Grid.Row="1" 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>
2024-03-26 12:54:51 +01:00
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding NAME}"/>
2024-03-26 12:54:51 +01:00
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="2" Rows="3">
<Button Content="Delete selected" Command="{Binding DeleteMaintainerTeamCommand}"></Button>
<Button Content="Create new" Click="CreateNewMaintainerTeam"></Button>
<Button Content="Expand all" Click="ExpandAllMaintainerTeams"/>
</UniformGrid>
2024-03-26 12:54:51 +01:00
</Grid>
<Grid Grid.Column="3">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="7*" />
<RowDefinition Height="2*" />
2024-03-26 12:54:51 +01:00
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="Employees" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ListBox Grid.Row="1" 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>
2024-03-26 12:54:51 +01:00
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding NAME}"/>
2024-03-26 12:54:51 +01:00
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="2" Rows="3">
<Button Content="Delete selected" Command="{Binding DeleteEmployeeCommand}"></Button>
<Button Content="Create new" Click="CreateNewEmployee"></Button>
<Button Content="Expand all" Click="ExpandAllEmployees"/>
</UniformGrid>
2024-03-26 12:54:51 +01:00
</Grid>
</Grid>
</Window>