TeamsNetphoneLink/TeamsNetphoneLinkWPF/WPF/SettingsWindow.xaml
2025-03-25 22:43:13 +01:00

143 lines
7.2 KiB
XML

<Window x:Class="TeamsNetphoneLink.WPF.SettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Einstellungen" Height="373" Width="500"
WindowStyle="ToolWindow" ResizeMode="NoResize"
Background="#FF1E1E1E" FontFamily="Segoe UI"
WindowStartupLocation="CenterScreen">
<!-- Dark Mode Resources -->
<Window.Resources>
<!-- Button Style -->
<Style TargetType="Button">
<Setter Property="Background" Value="#FF0078D4"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border"
Background="{TemplateBinding Background}"
CornerRadius="4"
Padding="{TemplateBinding Padding}"
Opacity="1">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<!-- Hover Effect -->
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#0066B3"/>
</Trigger>
<!-- Pressed Effect -->
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="#004D86"/>
<Setter TargetName="border" Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="0.98" ScaleY="0.98"/>
</Setter.Value>
</Setter>
</Trigger>
<!-- Disabled State -->
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Background" Value="#3A3A3A"/>
<Setter TargetName="border" Property="Opacity" Value="0.7"/>
<Setter Property="Foreground" Value="#A0A0A0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="OverridesDefaultStyle" Value="True"/>
</Style>
<!-- TextBox Style -->
<Style TargetType="TextBox">
<Setter Property="Background" Value="#FF252526"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="#FF3E3E40"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Padding" Value="3,0,0,0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<Border BorderBrush="Red" BorderThickness="1">
<AdornedElementPlaceholder/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ScrollViewer x:Name="PART_ContentHost" Margin="0,0,0,0"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- CheckBox Style -->
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!-- TextBlock Style -->
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
</Window.Resources>
<Grid Margin="20">
<StackPanel Orientation="Vertical">
<!-- Title -->
<TextBlock Text="Einstellungen" FontSize="24" FontWeight="SemiBold" Margin="0,0,0,20"/>
<!-- Microsoft 365 Tenant ID -->
<StackPanel Orientation="Horizontal" Margin="0,10">
<TextBlock Text="Tenant ID" VerticalAlignment="Center" Width="70" FontSize="14"/>
<TextBox x:Name="TenantIDTextBox" Width="372" Height="30" FontSize="14" TextChanged="TextBox_TextChanged" Text="dddddd"/>
</StackPanel>
<!-- Microsoft 365 App ID -->
<StackPanel Orientation="Horizontal" Margin="0,10">
<TextBlock Text="App ID" VerticalAlignment="Center" Width="70" FontSize="14"/>
<TextBox x:Name="AppIDTextBox" Width="372" Height="30" TextChanged="TextBox_TextChanged"/>
</StackPanel>
<!-- Toggle SaveEntraCredentials -->
<StackPanel Orientation="Horizontal" Margin="0,10">
<CheckBox x:Name="SaveEntraCredentialsCheck" VerticalAlignment="Center"/>
<TextBlock Text="Entra Login speichern" Width="137" FontSize="14" Margin="10,0,0,0"/>
</StackPanel>
<!-- Toggle UseGraphForMeetingState -->
<StackPanel Orientation="Horizontal" Margin="0,10" ToolTip="Nutzt statt der lokalen Teams API die Graph API um festzustellen das ein Meeting läuft">
<CheckBox x:Name="UseGraphForMeetingStateCheck"/>
<TextBlock Text="Graph für den Meeting Status verwenden" VerticalAlignment="Center" Width="259" FontSize="14" Margin="10,0,0,0"/>
</StackPanel>
<!-- Save and Reset Buttons -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,30,0,0">
<Button x:Name="ResetButton" Background="DarkRed" Content="Alles zurücksetzen" Width="140" Height="35" Margin="0,0,10,0" Click="ResetButton_Click"/>
<Button x:Name="SaveButton" Content="Speichern" Width="100" Height="35" Click="SaveButton_Click" IsEnabled="False"/>
</StackPanel>
</StackPanel>
</Grid>
</Window>