Files

235 lines
13 KiB
XML
Raw Permalink Normal View History

2026-08-27 11:23:13 -06:00
<Window x:Class="WpfApp1.Windows.Port"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Raton" Height="397.895" Width="340" Background="#141414"
WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="SingleBorderWindow"
AllowsTransparency="false" Icon="/Raton;component/RATA.ico">
<FrameworkElement.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#3A3A6A"/>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="White"/>
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#3A3A6A"/>
<Style x:Key="DarkInput" TargetType="{x:Type TextBox}">
<Setter Property="Control.Background" Value="#1E1E1E"/>
<Setter Property="Control.Foreground" Value="#CCCCCC"/>
<Setter Property="TextBoxBase.CaretBrush" Value="#8B5CF6"/>
<Setter Property="Control.BorderBrush" Value="#2E2E2E"/>
<Setter Property="Control.BorderThickness" Value="1"/>
<Setter Property="Control.FontSize" Value="12"/>
<Setter Property="Control.FontFamily" Value="Consolas"/>
<Setter Property="TextBoxBase.SelectionBrush" Value="#5C3D8F"/>
<Setter Property="Control.VerticalContentAlignment" Value="Center"/>
<Setter Property="Control.Padding" Value="10,0"/>
<Setter Property="FrameworkElement.Height" Value="34"/>
<Setter Property="UIElement.SnapsToDevicePixels" Value="true"/>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border x:Name="border" Background="{TemplateBinding Control.Background}"
BorderBrush="{TemplateBinding Control.BorderBrush}"
BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="6"
Height="{TemplateBinding FrameworkElement.Height}">
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" Margin="{TemplateBinding Control.Padding}"
VerticalAlignment="Center" VerticalContentAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsFocused" Value="true">
<Setter TargetName="border" Property="Border.BorderBrush" Value="#7C4DCC"/>
<Setter TargetName="border" Property="Border.Background" Value="#1A1A2E"/>
</Trigger>
<Trigger Property="UIElement.IsMouseOver" Value="true">
<Setter TargetName="border" Property="Border.BorderBrush" Value="#3E3E5E"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DarkPassword" TargetType="{x:Type PasswordBox}">
<Setter Property="Control.Background" Value="#1E1E1E"/>
<Setter Property="Control.Foreground" Value="#CCCCCC"/>
<Setter Property="PasswordBox.CaretBrush" Value="#8B5CF6"/>
<Setter Property="Control.BorderBrush" Value="#2E2E2E"/>
<Setter Property="Control.BorderThickness" Value="1"/>
<Setter Property="Control.FontSize" Value="14"/>
<Setter Property="PasswordBox.SelectionBrush" Value="#5C3D8F"/>
<Setter Property="Control.VerticalContentAlignment" Value="Center"/>
<Setter Property="Control.Padding" Value="10,0"/>
<Setter Property="FrameworkElement.Height" Value="34"/>
<Setter Property="UIElement.SnapsToDevicePixels" Value="true"/>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type PasswordBox}">
<Border x:Name="border" Background="{TemplateBinding Control.Background}"
BorderBrush="{TemplateBinding Control.BorderBrush}"
BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="6"
Height="{TemplateBinding FrameworkElement.Height}">
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" Margin="{TemplateBinding Control.Padding}"
VerticalAlignment="Center" VerticalContentAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsFocused" Value="true">
<Setter TargetName="border" Property="Border.BorderBrush" Value="#7C4DCC"/>
<Setter TargetName="border" Property="Border.Background" Value="#1A1A2E"/>
</Trigger>
<Trigger Property="UIElement.IsMouseOver" Value="true">
<Setter TargetName="border" Property="Border.BorderBrush" Value="#3E3E5E"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="LoginBtn" TargetType="{x:Type Button}">
<Setter Property="Control.Background" Value="#5C3D8F"/>
<Setter Property="Control.Foreground" Value="White"/>
<Setter Property="Control.BorderThickness" Value="0"/>
<Setter Property="Control.FontSize" Value="13"/>
<Setter Property="Control.FontWeight" Value="SemiBold"/>
<Setter Property="Control.FontFamily" Value="Segoe UI"/>
<Setter Property="FrameworkElement.Cursor" Value="Hand"/>
<Setter Property="FrameworkElement.Height" Value="38"/>
<Setter Property="UIElement.SnapsToDevicePixels" Value="true"/>
<Setter Property="UIElement.RenderTransformOrigin" Value="0.5,0.5"/>
<Setter Property="UIElement.RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="1"/>
</Setter.Value>
</Setter>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="bd" Background="{TemplateBinding Control.Background}" CornerRadius="7"
Height="{TemplateBinding FrameworkElement.Height}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="true">
<Setter TargetName="bd" Property="Border.Background" Value="#6D4AA8"/>
</Trigger>
<Trigger Property="ButtonBase.IsPressed" Value="true">
<Setter TargetName="bd" Property="Border.Background" Value="#4A2E78"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<EventTrigger RoutedEvent="MouseEnter">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" To="1.02"
Duration="0:0:0.12">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" To="1.02"
Duration="0:0:0.12">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" To="1"
Duration="0:0:0.14">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" To="1"
Duration="0:0:0.14">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Style.Triggers>
</Style>
</FrameworkElement.Resources>
<FrameworkElement.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" From="0" To="1"
Duration="0:0:0.30">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="Root"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" From="10" To="0"
Duration="0:0:0.30">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</FrameworkElement.Triggers>
<Grid x:Name="Root" Opacity="0">
<UIElement.RenderTransform>
<TranslateTransform Y="0"/>
</UIElement.RenderTransform>
<Border VerticalAlignment="Top" Height="2" HorizontalAlignment="Stretch">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#00000000" Offset="0"/>
<GradientStop Color="#BB5C3D8F" Offset="0.4"/>
<GradientStop Color="#BB7B52B8" Offset="0.6"/>
<GradientStop Color="#00000000" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
<Border Margin="16" CornerRadius="10" Background="#1A1A1A" BorderBrush="#282838" BorderThickness="1">
<UIElement.Effect>
<DropShadowEffect Color="Black" BlurRadius="22" ShadowDepth="4" Opacity="0.55"/>
</UIElement.Effect>
<StackPanel Margin="20,18,20,20">
<Grid Margin="0,0,0,14">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid Width="44" Height="44" Margin="0,0,12,0" VerticalAlignment="Center">
<Ellipse x:Name="PfpEclipse" Width="44" Height="44">
<Shape.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#3B2060" Offset="0"/>
<GradientStop Color="#7B52B8" Offset="1"/>
</LinearGradientBrush>
</Shape.Fill>
</Ellipse>
<Ellipse Width="11" Height="11" Fill="#4CAF50" Stroke="#1A1A1A" StrokeThickness="2"
HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
</Grid>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock x:Name="TbGreeting" Text="Good night, user" Foreground="White" FontSize="14" FontWeight="Bold"
FontFamily="Segoe UI"/>
<TextBlock x:Name="TbSubtitle" Text="..." Foreground="#555568" FontSize="11" FontFamily="Segoe UI"
Margin="0,3,0,0"/>
</StackPanel>
</Grid>
<Border Height="1" Background="#252535" Margin="0,0,0,16"/>
<TextBlock Text="Password" Foreground="#777788" FontSize="11" FontWeight="SemiBold" FontFamily="Segoe UI"
Margin="0,0,0,6"/>
<PasswordBox x:Name="PbPassword" Style="{StaticResource DarkPassword}" Margin="0,0,0,14"/>
<TextBlock Text="Port" Foreground="#777788" FontSize="11" FontWeight="SemiBold" FontFamily="Segoe UI"
Margin="0,0,0,6"/>
<TextBox x:Name="TbPort" Style="{StaticResource DarkInput}" Text="8080" Margin="0,0,0,20"/>
<Button Click="BtnLogin_Click" x:Name="BtnLogin" Content="Login" Style="{StaticResource LoginBtn}"/>
<TextBlock x:Name="TbStatus" Text="" FontSize="11" FontFamily="Segoe UI" HorizontalAlignment="Center"
Margin="0,8,0,0" Height="16" Visibility="Hidden"/>
</StackPanel>
</Border>
</Grid>
</Window>