Mehrsprachigkeit mit Resx-Ressourcen und Sprachwechsel hinzugefügt

This commit is contained in:
2026-02-13 11:44:52 +01:00
parent 57735cdf93
commit b4d70c4825
10 changed files with 610 additions and 27 deletions

View File

@@ -1,18 +1,18 @@
using System.Windows; using BCrypt.Net;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;
using BCrypt.Net; using System.Globalization;
using System.Reflection;
using System.Windows;
namespace SkyTeam namespace SkyTeam
{ {
public partial class App : Application public partial class App : Application
{ {
// Beim Start der Anwendung einen Standard Admin-Benutzer erstellen, falls keiner existiert , selbGedacht. // Beim Start der Anwendung einen Standard Admin-Benutzer erstellen, falls keiner existiert , selbGedacht.
public App()
protected override void OnStartup(StartupEventArgs e)
{ {
base.OnStartup(e); Thread.CurrentThread.CurrentUICulture = new CultureInfo("de");
CreateDefaultAdmin(); Thread.CurrentThread.CurrentUICulture = new CultureInfo("de");
} }
private void CreateDefaultAdmin() private void CreateDefaultAdmin()

View File

@@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:properties="clr-namespace:SkyTeam"
Title="NavigationPage" Title="NavigationPage"
Background="{DynamicResource PageBackground}"> Background="{DynamicResource PageBackground}">
@@ -19,8 +20,8 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Ellipse Width="36" Height="36" Fill="White" Margin="0,0,10,0"/> <Ellipse Width="36" Height="36" Fill="White" Margin="0,0,10,0"/>
<StackPanel> <StackPanel>
<TextBlock Text="Sky Team Airlines" FontSize="20" FontWeight="Bold" Foreground="White"/> <TextBlock Text="{x:Static properties:Resources.HeaderTitle}" FontSize="20" FontWeight="Bold" Foreground="White"/>
<TextBlock Text="Sichere und komfortable Flüge weltweit" FontSize="12" Foreground="White"/> <TextBlock Text="{x:Static properties:Resources.HeaderSubtitle}" FontSize="12" Foreground="White"/>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Border> </Border>
@@ -30,28 +31,28 @@
<Button x:Name="HomeButton" Height="50" Margin="5" Click="HomeButton_Click" Background="{DynamicResource CardBackground}" BorderThickness="0"> <Button x:Name="HomeButton" Height="50" Margin="5" Click="HomeButton_Click" Background="{DynamicResource CardBackground}" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="Home" Width="20" Margin="0,0,10,0" Foreground="{DynamicResource PrimaryText}"/> <iconPacks:PackIconMaterial Kind="Home" Width="20" Margin="0,0,10,0" Foreground="{DynamicResource PrimaryText}"/>
<TextBlock Text="Home" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}"/> <TextBlock Text="{x:Static properties:Resources.SidebarHome}" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}"/>
</StackPanel> </StackPanel>
</Button> </Button>
<Button x:Name="BookingsButton" Height="50" Margin="5" Click="BookingsButton_Click" Background="Transparent" BorderThickness="0"> <Button x:Name="BookingsButton" Height="50" Margin="5" Click="BookingsButton_Click" Background="Transparent" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="Airplane" Width="20" Margin="0,0,10,0" Foreground="{DynamicResource PrimaryText}"/> <iconPacks:PackIconMaterial Kind="Airplane" Width="20" Margin="0,0,10,0" Foreground="{DynamicResource PrimaryText}"/>
<TextBlock Text="Meine Buchungen" Foreground="{DynamicResource PrimaryText}"/> <TextBlock Text="{x:Static properties:Resources.SidebarBookings}" Foreground="{DynamicResource PrimaryText}"/>
</StackPanel> </StackPanel>
</Button> </Button>
<Button x:Name="SettingsButton" Height="50" Margin="5" Click="SettingsButton_Click" Background="Transparent" BorderThickness="0"> <Button x:Name="SettingsButton" Height="50" Margin="5" Click="SettingsButton_Click" Background="Transparent" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="Cog" Width="20" Margin="0,0,10,0" Foreground="{DynamicResource PrimaryText}"/> <iconPacks:PackIconMaterial Kind="Cog" Width="20" Margin="0,0,10,0" Foreground="{DynamicResource PrimaryText}"/>
<TextBlock Text="Einstellungen" Foreground="{DynamicResource PrimaryText}"/> <TextBlock Text="{x:Static properties:Resources.SidebarSettings}" Foreground="{DynamicResource PrimaryText}"/>
</StackPanel> </StackPanel>
</Button> </Button>
<Button x:Name="LogoutButton" Height="50" Margin="5" Background="#FFEBEB" BorderBrush="#FFB71C1C" Foreground="#D32F2F" FontWeight="Bold" Click="LogoutButton_Click"> <Button x:Name="LogoutButton" Height="50" Margin="5" Background="#FFEBEB" BorderBrush="#FFB71C1C" Foreground="#D32F2F" FontWeight="Bold" Click="LogoutButton_Click">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="Logout" Width="20" Margin="0,0,10,0"/> <iconPacks:PackIconMaterial Kind="Logout" Width="20" Margin="0,0,10,0"/>
<TextBlock Text="Abmelden"/> <TextBlock Text="{x:Static properties:Resources.SidebarLogout}"/>
</StackPanel> </StackPanel>
</Button> </Button>
</StackPanel> </StackPanel>
@@ -62,17 +63,17 @@
<StackPanel Orientation="Horizontal" Margin="0,0,0,30"> <StackPanel Orientation="Horizontal" Margin="0,0,0,30">
<iconPacks:PackIconMaterial Kind="AirplaneTakeoff" Width="48" Height="48" Foreground="{DynamicResource PrimaryText}" Margin="0,0,15,0"/> <iconPacks:PackIconMaterial Kind="AirplaneTakeoff" Width="48" Height="48" Foreground="{DynamicResource PrimaryText}" Margin="0,0,15,0"/>
<StackPanel> <StackPanel>
<TextBlock Text="Willkommen bei Sky Team Airlines" FontSize="28" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}"/> <TextBlock Text="{x:Static properties:Resources.WelcomeTitle}" FontSize="28" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}"/>
<TextBlock Text="Exklusive Flugservices für Privatjets" FontSize="16" Foreground="{DynamicResource SecondaryText}"/> <TextBlock Text="{x:Static properties:Resources.WelcomeSubtitle}" FontSize="16" Foreground="{DynamicResource SecondaryText}"/>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<Border Background="{DynamicResource CardBackground}" Padding="25" CornerRadius="8" Margin="0,0,0,25"> <Border Background="{DynamicResource CardBackground}" Padding="25" CornerRadius="8" Margin="0,0,0,25">
<TextBlock Text="Sky Team Airlines bietet komfortable Veranstaltung von Privatjets für Geschäftsreisende. Unsere moderne Flotte mit den neuesten Businessjets garantiert Ihnen maximalen Komfort auf Ihren Flügen." <TextBlock Text="{x:Static properties:Resources.WelcomeDescription}"
FontSize="14" LineHeight="22" TextWrapping="Wrap" Foreground="{DynamicResource PrimaryText}"/> FontSize="14" LineHeight="22" TextWrapping="Wrap" Foreground="{DynamicResource PrimaryText}"/>
</Border> </Border>
<TextBlock Text="Unsere Services" FontSize="20" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" Margin="0,0,15,0"/> <TextBlock Text="{x:Static properties:Resources.ServicesTitle}" FontSize="20" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" Margin="0,0,15,0"/>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -83,16 +84,16 @@
<Border Grid.Column="0" Margin="0,0,15,0" Padding="20" Background="{DynamicResource CardBackground}" CornerRadius="8"> <Border Grid.Column="0" Margin="0,0,15,0" Padding="20" Background="{DynamicResource CardBackground}" CornerRadius="8">
<StackPanel> <StackPanel>
<iconPacks:PackIconMaterial Kind="AccountGroup" Width="32" Height="32" Foreground="#1E88E5"/> <iconPacks:PackIconMaterial Kind="AccountGroup" Width="32" Height="32" Foreground="#1E88E5"/>
<TextBlock Text="Persönliche Kundenbetreuung" FontSize="16" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" Margin="0,10,0,5"/> <TextBlock Text="{x:Static properties:Resources.ServicePersonalSupport}" FontSize="16" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" Margin="0,10,0,5"/>
<TextBlock Text="Dedizierte Flugplanung und individuelle Bedürfnisse" FontSize="13" Foreground="{DynamicResource SecondaryText}" TextWrapping="Wrap"/> <TextBlock Text="{x:Static properties:Resources.ServicePersonalSupportDesc}" FontSize="13" Foreground="{DynamicResource SecondaryText}" TextWrapping="Wrap"/>
</StackPanel> </StackPanel>
</Border> </Border>
<Border Grid.Column="1" Padding="20" Background="{DynamicResource CardBackground}" CornerRadius="8"> <Border Grid.Column="1" Padding="20" Background="{DynamicResource CardBackground}" CornerRadius="8">
<StackPanel> <StackPanel>
<iconPacks:PackIconMaterial Kind="Database" Width="32" Height="32" Foreground="#388E3C"/> <iconPacks:PackIconMaterial Kind="Database" Width="32" Height="32" Foreground="#388E3C"/>
<TextBlock Text="Sichere Datenverwaltung" FontSize="16" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" Margin="0,10,0,5"/> <TextBlock Text="{x:Static properties:Resources.ServiceDataSecurity}" FontSize="16" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" Margin="0,10,0,5"/>
<TextBlock Text="Vollständiger CRUD für Kunden, Flüge, Piloten" FontSize="13" Foreground="{DynamicResource SecondaryText}" TextWrapping="Wrap"/> <TextBlock Text="{x:Static properties:Resources.ServiceDataSecurityDesc}" FontSize="13" Foreground="{DynamicResource SecondaryText}" TextWrapping="Wrap"/>
</StackPanel> </StackPanel>
</Border> </Border>
</Grid> </Grid>
@@ -101,7 +102,7 @@
<Button Width="200" Height="50" Background="#FF1E88E5" Foreground="White" FontSize="16" FontWeight="Bold" Click="BookFlightButton_Click"> <Button Width="200" Height="50" Background="#FF1E88E5" Foreground="White" FontSize="16" FontWeight="Bold" Click="BookFlightButton_Click">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="Airplane" Width="24" Height="24" Margin="0,0,12,0"/> <iconPacks:PackIconMaterial Kind="Airplane" Width="24" Height="24" Margin="0,0,12,0"/>
<TextBlock Text="Jetzt Flug buchen"/> <TextBlock Text="{x:Static properties:Resources.BookFlightButton}"/>
</StackPanel> </StackPanel>
</Button> </Button>
</StackPanel> </StackPanel>

View File

@@ -8,7 +8,6 @@ namespace SkyTeam
public NavigationPage() public NavigationPage()
{ {
InitializeComponent(); InitializeComponent();
} }
private void HomeButton_Click(object sender, RoutedEventArgs e) private void HomeButton_Click(object sender, RoutedEventArgs e)

View File

@@ -4,7 +4,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SkyTeam" xmlns:local="clr-namespace:SkyTeam"
mc:Ignorable="d"
Title="Sky Team Airlines" Title="Sky Team Airlines"
Height="700" Height="700"
Width="1100" Width="1100"

198
SkyTeam/Resources.Designer.cs generated Normal file
View File

@@ -0,0 +1,198 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SkyTeam {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SkyTeam.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Jetzt Flug buchen ähnelt.
/// </summary>
public static string BookFlightButton {
get {
return ResourceManager.GetString("BookFlightButton", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Sichere und komfortable Flüge weltweit ähnelt.
/// </summary>
public static string HeaderSubtitle {
get {
return ResourceManager.GetString("HeaderSubtitle", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Sky Team Airlines ähnelt.
/// </summary>
public static string HeaderTitle {
get {
return ResourceManager.GetString("HeaderTitle", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Sichere Datenverwaltung ähnelt.
/// </summary>
public static string ServiceDataSecurity {
get {
return ResourceManager.GetString("ServiceDataSecurity", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Vollständiger CRUD für Kunden, Flüge, Piloten ähnelt.
/// </summary>
public static string ServiceDataSecurityDesc {
get {
return ResourceManager.GetString("ServiceDataSecurityDesc", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Persönliche Kundenbetreuung ähnelt.
/// </summary>
public static string ServicePersonalSupport {
get {
return ResourceManager.GetString("ServicePersonalSupport", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Individuelle Flugplanung und maßgeschneiderte Lösungen ähnelt.
/// </summary>
public static string ServicePersonalSupportDesc {
get {
return ResourceManager.GetString("ServicePersonalSupportDesc", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Unsere Services ähnelt.
/// </summary>
public static string ServicesTitle {
get {
return ResourceManager.GetString("ServicesTitle", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Meine Buchungen ähnelt.
/// </summary>
public static string SidebarBookings {
get {
return ResourceManager.GetString("SidebarBookings", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Startseite ähnelt.
/// </summary>
public static string SidebarHome {
get {
return ResourceManager.GetString("SidebarHome", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Abmelden ähnelt.
/// </summary>
public static string SidebarLogout {
get {
return ResourceManager.GetString("SidebarLogout", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Einstellungen ähnelt.
/// </summary>
public static string SidebarSettings {
get {
return ResourceManager.GetString("SidebarSettings", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Sky Team Airlines bietet komfortable Veranstaltung von Privatjets für Geschäftsreisende. Unsere moderne Flotte mit den neuesten Businessjets garantiert Ihnen maximalen Komfort auf Ihren Flügen. ähnelt.
/// </summary>
public static string WelcomeDescription {
get {
return ResourceManager.GetString("WelcomeDescription", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Exklusive Flugservices für Privatjets ähnelt.
/// </summary>
public static string WelcomeSubtitle {
get {
return ResourceManager.GetString("WelcomeSubtitle", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Willkommen bei Sky Team Airlines ähnelt.
/// </summary>
public static string WelcomeTitle {
get {
return ResourceManager.GetString("WelcomeTitle", resourceCulture);
}
}
}
}

165
SkyTeam/Resources.en.resx Normal file
View File

@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BookFlightButton" xml:space="preserve">
<value />
</data>
<data name="HeaderSubtitle" xml:space="preserve">
<value>Safe and comfortable flights worldwide</value>
</data>
<data name="HeaderTitle" xml:space="preserve">
<value>Sky Team Airlines</value>
</data>
<data name="ServiceDataSecurity" xml:space="preserve">
<value>Secure Data Management</value>
</data>
<data name="ServiceDataSecurityDesc" xml:space="preserve">
<value>Full management of customers, flights and pilots</value>
</data>
<data name="ServicePersonalSupport" xml:space="preserve">
<value>Personal Customer Support</value>
</data>
<data name="ServicePersonalSupportDesc" xml:space="preserve">
<value>Individual flight planning and tailored solutions</value>
</data>
<data name="ServicesTitle" xml:space="preserve">
<value>Our Services</value>
</data>
<data name="SidebarBookings" xml:space="preserve">
<value>My Bookings</value>
</data>
<data name="SidebarHome" xml:space="preserve">
<value>Home</value>
</data>
<data name="SidebarLogout" xml:space="preserve">
<value>Logout</value>
</data>
<data name="SidebarSettings" xml:space="preserve">
<value>Settings</value>
</data>
<data name="WelcomeDescription" xml:space="preserve">
<value>Sky Team Airlines offers comfortable private jet services for business travelers. Our modern fleet with the latest business jets guarantees maximum comfort on your flights.</value>
</data>
<data name="WelcomeSubtitle" xml:space="preserve">
<value>Exclusive private jet flight services</value>
</data>
<data name="WelcomeTitle" xml:space="preserve">
<value>Welcome to Sky Team Airlines</value>
</data>
</root>

165
SkyTeam/Resources.resx Normal file
View File

@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BookFlightButton" xml:space="preserve">
<value>Jetzt Flug buchen</value>
</data>
<data name="HeaderSubtitle" xml:space="preserve">
<value>Sichere und komfortable Flüge weltweit</value>
</data>
<data name="HeaderTitle" xml:space="preserve">
<value>Sky Team Airlines</value>
</data>
<data name="ServiceDataSecurity" xml:space="preserve">
<value>Sichere Datenverwaltung</value>
</data>
<data name="ServiceDataSecurityDesc" xml:space="preserve">
<value>Vollständiger CRUD für Kunden, Flüge, Piloten</value>
</data>
<data name="ServicePersonalSupport" xml:space="preserve">
<value>Persönliche Kundenbetreuung</value>
</data>
<data name="ServicePersonalSupportDesc" xml:space="preserve">
<value>Individuelle Flugplanung und maßgeschneiderte Lösungen</value>
</data>
<data name="ServicesTitle" xml:space="preserve">
<value>Unsere Services</value>
</data>
<data name="SidebarBookings" xml:space="preserve">
<value>Meine Buchungen</value>
</data>
<data name="SidebarHome" xml:space="preserve">
<value>Startseite</value>
</data>
<data name="SidebarLogout" xml:space="preserve">
<value>Abmelden</value>
</data>
<data name="SidebarSettings" xml:space="preserve">
<value>Einstellungen</value>
</data>
<data name="WelcomeDescription" xml:space="preserve">
<value>Sky Team Airlines bietet komfortable Veranstaltung von Privatjets für Geschäftsreisende. Unsere moderne Flotte mit den neuesten Businessjets garantiert Ihnen maximalen Komfort auf Ihren Flügen.</value>
</data>
<data name="WelcomeSubtitle" xml:space="preserve">
<value>Exklusive Flugservices für Privatjets</value>
</data>
<data name="WelcomeTitle" xml:space="preserve">
<value>Willkommen bei Sky Team Airlines</value>
</data>
</root>

View File

@@ -101,6 +101,36 @@
</StackPanel> </StackPanel>
</Border> </Border>
<Border Background="{DynamicResource CardBackground}" CornerRadius="12" Padding="25" Margin="0,0,0,25">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<iconPacks:PackIconMaterial Kind="Translate"
Width="32"
Height="32"
Foreground="{DynamicResource PrimaryText}"
Margin="0,0,15,0"/>
<StackPanel Width="300">
<TextBlock Text="Sprache"
FontSize="18"
FontWeight="Bold"
Foreground="{DynamicResource PrimaryText}"/>
<TextBlock Text="Wählen Sie Ihre bevorzugte Sprache"
FontSize="14"
Foreground="{DynamicResource SecondaryText}"/>
</StackPanel>
<ComboBox x:Name="LanguageComboBox"
Width="150"
SelectionChanged="LanguageComboBox_SelectionChanged">
<ComboBoxItem Content="Deutsch" Tag="de"/>
<ComboBoxItem Content="English" Tag="en"/>
</ComboBox>
</StackPanel>
</Border>
<Border Background="#FEF2F2" CornerRadius="12" Padding="25" BorderBrush="#EF5350" BorderThickness="1"> <Border Background="#FEF2F2" CornerRadius="12" Padding="25" BorderBrush="#EF5350" BorderThickness="1">
<StackPanel> <StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,15"> <StackPanel Orientation="Horizontal" Margin="0,0,0,15">
@@ -118,7 +148,6 @@
</Button> </Button>
</StackPanel> </StackPanel>
</Border> </Border>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>

View File

@@ -1,9 +1,10 @@
using System; using MySql.Data.MySqlClient;
using System;
using System.Globalization;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Navigation; using System.Windows.Navigation;
using MySql.Data.MySqlClient;
namespace SkyTeam namespace SkyTeam
{ {
@@ -91,5 +92,16 @@ namespace SkyTeam
SessionManager.CurrentUserId = 0; SessionManager.CurrentUserId = 0;
NavigationService.Navigate(new LogInPage()); NavigationService.Navigate(new LogInPage());
} }
private void LanguageComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (LanguageComboBox.SelectedItem is ComboBoxItem selectedItem)
{
string culture = selectedItem.Tag.ToString();
Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
NavigationService.Navigate(new SettingsPage());
}
}
} }
} }

View File

@@ -14,4 +14,19 @@
<PackageReference Include="MySql.Data" Version="9.6.0" /> <PackageReference Include="MySql.Data" Version="9.6.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Update="Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project> </Project>