A bit of organizing

This commit is contained in:
MiskolcziRichard
2024-04-28 18:00:25 +02:00
parent bcff26a17c
commit c91356cdfa
16 changed files with 455 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.Windows.CreateNewCustomer"
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.Windows"
mc:Ignorable="d"
Title="CreateNewCustomer" Height="450" Width="800">
<Grid>
</Grid>
</Window>

View File

@@ -0,0 +1,27 @@
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.Shapes;
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
{
/// <summary>
/// Interaction logic for CreateNewCustomer.xaml
/// </summary>
public partial class CreateNewCustomer : Window
{
public CreateNewCustomer()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,12 @@
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.Windows.CreateNewEmployee"
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.Windows"
mc:Ignorable="d"
Title="CreateNewEmployee" Height="450" Width="800">
<Grid>
</Grid>
</Window>

View File

@@ -0,0 +1,27 @@
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.Shapes;
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
{
/// <summary>
/// Interaction logic for CreateNewEmployee.xaml
/// </summary>
public partial class CreateNewEmployee : Window
{
public CreateNewEmployee()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,12 @@
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.Windows.CreateNewMaintainerTeam"
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.Windows"
mc:Ignorable="d"
Title="CreateNewMaintainerTeam" Height="450" Width="800">
<Grid>
</Grid>
</Window>

View File

@@ -0,0 +1,27 @@
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.Shapes;
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
{
/// <summary>
/// Interaction logic for CreateNewMaintainerTeam.xaml
/// </summary>
public partial class CreateNewMaintainerTeam : Window
{
public CreateNewMaintainerTeam()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,12 @@
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.Windows.CreateNewService"
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.Windows"
mc:Ignorable="d"
Title="CreateNewService" Height="450" Width="800">
<Grid>
</Grid>
</Window>

View File

@@ -0,0 +1,27 @@
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.Shapes;
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
{
/// <summary>
/// Interaction logic for CreateNewService.xaml
/// </summary>
public partial class CreateNewService : Window
{
public CreateNewService()
{
InitializeComponent();
}
}
}

View File

@@ -1,12 +1,11 @@
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.GetAllServices"
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.Windows.GetAllCustomers"
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"
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.Windows"
mc:Ignorable="d"
Title="GetAllServices" Height="550" Width="350">
Title="Customers" Height="550" Width="350">
<Grid>
<ListBox ItemsSource="{Binding Services}">
<ListBox.ItemTemplate>

View File

@@ -0,0 +1,27 @@
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.Shapes;
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
{
/// <summary>
/// Interaction logic for GetAllCustomers.xaml
/// </summary>
public partial class GetAllCustomers : Window
{
public GetAllCustomers()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,62 @@
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.Windows.GetAllEmployees"
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.Windows"
mc:Ignorable="d"
Title="Employees" Height="550" Width="350">
<Grid>
<ListBox ItemsSource="{Binding Services}">
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Gray" BorderThickness="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="8*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
<Label Grid.Row="0" Grid.Column="1" Content="{Binding ID}" />
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
<Label Grid.Row="1" Grid.Column="1" Content="{Binding NAME}" />
<Label Grid.Row="2" Grid.Column="0" Content="Version:" />
<Label Grid.Row="2" Grid.Column="1" Content="{Binding VERSION}" />
<Label Grid.Row="3" Grid.Column="0" Content="Account:" />
<Label Grid.Row="3" Grid.Column="1" Content="{Binding ACCOUNT}" />
<Label Grid.Row="4" Grid.Column="0" Content="Domain:" />
<Label Grid.Row="4" Grid.Column="1" Content="{Binding SERVICE_DOMAIN}" />
<Label Grid.Row="5" Grid.Column="0" Content="IP address:" />
<Label Grid.Row="5" Grid.Column="1" Content="{Binding IP}" />
<Label Grid.Row="6" Grid.Column="0" Content="Port:" />
<Label Grid.Row="6" Grid.Column="1" Content="{Binding PORT}" />
<Label Grid.Row="7" Grid.Column="0" Content="Notes:" />
<Label Grid.Row="7" Grid.Column="1" Content="{Binding NOTES}" />
<Label Grid.Row="8" Grid.Column="0" Content="Maintainer Team ID:" />
<Label Grid.Row="8" Grid.Column="1" Content="{Binding MAINTAINER_ID}" />
</Grid>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Window>

View File

@@ -0,0 +1,27 @@
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.Shapes;
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
{
/// <summary>
/// Interaction logic for GetAllEmployees.xaml
/// </summary>
public partial class GetAllEmployees : Window
{
public GetAllEmployees()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,62 @@
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.Windows.GetAllMaintainerTeams"
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.Windows"
mc:Ignorable="d"
Title="Maintainer teams" Height="550" Width="350">
<Grid>
<ListBox ItemsSource="{Binding Services}">
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Gray" BorderThickness="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="8*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
<Label Grid.Row="0" Grid.Column="1" Content="{Binding ID}" />
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
<Label Grid.Row="1" Grid.Column="1" Content="{Binding NAME}" />
<Label Grid.Row="2" Grid.Column="0" Content="Version:" />
<Label Grid.Row="2" Grid.Column="1" Content="{Binding VERSION}" />
<Label Grid.Row="3" Grid.Column="0" Content="Account:" />
<Label Grid.Row="3" Grid.Column="1" Content="{Binding ACCOUNT}" />
<Label Grid.Row="4" Grid.Column="0" Content="Domain:" />
<Label Grid.Row="4" Grid.Column="1" Content="{Binding SERVICE_DOMAIN}" />
<Label Grid.Row="5" Grid.Column="0" Content="IP address:" />
<Label Grid.Row="5" Grid.Column="1" Content="{Binding IP}" />
<Label Grid.Row="6" Grid.Column="0" Content="Port:" />
<Label Grid.Row="6" Grid.Column="1" Content="{Binding PORT}" />
<Label Grid.Row="7" Grid.Column="0" Content="Notes:" />
<Label Grid.Row="7" Grid.Column="1" Content="{Binding NOTES}" />
<Label Grid.Row="8" Grid.Column="0" Content="Maintainer Team ID:" />
<Label Grid.Row="8" Grid.Column="1" Content="{Binding MAINTAINER_ID}" />
</Grid>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Window>

View File

@@ -0,0 +1,27 @@
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.Shapes;
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
{
/// <summary>
/// Interaction logic for GetAllMaintainerTeams.xaml
/// </summary>
public partial class GetAllMaintainerTeams : Window
{
public GetAllMaintainerTeams()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,84 @@
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.GetAllServices"
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="Services" Height="550" Width="500">
<Window.DataContext>
<local:GetAllServicesViewModel/>
</Window.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="9*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding Services}" Grid.Row="0">
<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>
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="8*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ID}" />
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding NAME}" />
<Label Grid.Row="2" Grid.Column="0" Content="Version:" />
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding VERSION}" />
<Label Grid.Row="3" Grid.Column="0" Content="Account:" />
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding ACCOUNT}" />
<Label Grid.Row="4" Grid.Column="0" Content="Domain:" />
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding SERVICE_DOMAIN}" />
<Label Grid.Row="5" Grid.Column="0" Content="IP address:" />
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding IP}" />
<Label Grid.Row="6" Grid.Column="0" Content="Port:" />
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding PORT}" />
<Label Grid.Row="7" Grid.Column="0" Content="Notes:" />
<TextBox Grid.Row="7" Grid.Column="1" Text="{Binding NOTES}" />
<Label Grid.Row="8" Grid.Column="0" Content="Maintainer Team ID:" />
<TextBox Grid.Row="8" Grid.Column="1" Text="{Binding MAINTAINER_ID}" />
</Grid>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Rows="2" Grid.Row="1">
<Button Content="Create new" Click="CreateNewService" />
<Button Content="Edit selected" />
</UniformGrid>
</Grid>
</Window>

View File

@@ -1,5 +1,6 @@
using System.Windows;
using WD7UVN_HFT_2023241.Models;
using WD7UVN_SzTGUI_2023242.Client.WPF.Windows;
namespace WD7UVN_SzTGUI_2023242.Client.WPF
{
@@ -16,5 +17,11 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF
Services = new RestCollection<Service>("http://localhost:5000/", "api/Service");
}
private void CreateNewService(object sender, RoutedEventArgs e)
{
Window window = new CreateNewService();
window.Show();
}
}
}