리크 테스트 gui
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
11 KiB

<Window x:Class="leak_test_project.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:viewmodels="clr-namespace:leak_test_project.ViewModels"
Title="Pressure Leak Inspect System" Height="800" Width="1024"
MinWidth="1150" MinHeight="700"
WindowState="Maximized" Background="#F0F0F0" WindowStyle="None"
2 weeks ago
ContentRendered="Window_ContentRendered"
Icon="EOL.ico">
<Window.DataContext>
<viewmodels:MainViewModel/>
</Window.DataContext>
<Window.Resources>
<!-- 로그아웃용 빨간색 버튼 스타일 -->
<Style x:Key="RedButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#EF4444"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="4"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#DC2626"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#D1D5DB"/>
<Setter Property="Foreground" Value="#9CA3AF"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="55"/> <!-- Increased slightly for visibility -->
<RowDefinition Height="*"/>
<RowDefinition Height="75"/> <!-- Increased slightly for visibility -->
</Grid.RowDefinitions>
<!-- Top Bar: Unified dark gray theme aligned with marking_gui -->
<Border Grid.Row="0" Background="#111827" Padding="20,10" MouseLeftButtonDown="TopBar_MouseLeftButtonDown">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="Pressure Leak" Foreground="White" FontSize="20" FontWeight="Bold" VerticalAlignment="Center"/>
<TextBlock Text="v1.0.0 (Updated: 2026-07-01)" Foreground="#6B7280" FontSize="12" VerticalAlignment="Bottom" Margin="12,0,0,2"/>
<TextBlock x:Name="txtCurrentDateTime" Text="0000-00-00 00:00:00" Foreground="#E5E7EB" FontSize="15" FontWeight="Bold" VerticalAlignment="Bottom" Margin="25,0,0,2"/>
</StackPanel>
<!-- Right Side badges, logout and system buttons -->
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
<!-- 작업자 정보 배지 -->
<Border Background="#1F2937" CornerRadius="4" Padding="10,6" Margin="0,0,10,0" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<TextBlock Text="작업자" Foreground="#9CA3AF" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" Margin="0,0,6,0"/>
<TextBlock x:Name="txtOperatorInfo" Text="---" Foreground="White" FontSize="13" FontWeight="Bold" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<!-- 모델 정보 배지 -->
<Border Background="#1F2937" CornerRadius="4" Padding="10,6" Margin="0,0,10,0" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<TextBlock Text="모델" Foreground="#9CA3AF" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" Margin="0,0,6,0"/>
<TextBlock x:Name="txtModelInfo" Text="---" Foreground="White" FontSize="13" FontWeight="Bold" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<!-- 라인 정보 배지 -->
<Border Background="#1F2937" CornerRadius="4" Padding="10,6" Margin="0,0,15,0" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<TextBlock Text="라인" Foreground="#9CA3AF" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" Margin="0,0,6,0"/>
<TextBlock x:Name="txtLineInfo" Text="---" Foreground="White" FontSize="13" FontWeight="Bold" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<!-- 로그아웃 버튼 -->
<Button x:Name="btnLogout" Content="로그아웃" Style="{StaticResource RedButtonStyle}" Click="BtnLogout_Click" VerticalAlignment="Center" Width="70" Height="28" Margin="0,0,20,0"/>
<!-- 시스템 창 제어 버튼 -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Button Width="40" Height="40" Background="Transparent" BorderThickness="0" Click="BtnMinimize_Click" ToolTip="최소화">
<TextBlock Text="0" FontFamily="Marlett" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
<Button x:Name="btnMaximize" Width="40" Height="40" Background="Transparent" BorderThickness="0" Click="BtnMaximize_Click" ToolTip="창 모드">
<TextBlock x:Name="txtMaximizeIcon" Text="2" FontFamily="Marlett" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
<Button Width="40" Height="40" Background="Transparent" BorderThickness="0" Command="{Binding ExitCommand}" ToolTip="프로그램 종료">
<TextBlock Text="r" FontFamily="Marlett" FontSize="18" Foreground="#E74C3C" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
</StackPanel>
</StackPanel>
</Grid>
</Border>
<!-- Main Content Area -->
<ContentControl Grid.Row="1" Content="{Binding CurrentViewModel}" />
<!-- Bottom Menu: Unified Aesthetics -->
<Border Grid.Row="2" Background="#D5DBDB" BorderBrush="#AEB6BF" BorderThickness="0,2,0,0">
<Grid>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="15,0">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Width" Value="140"/>
<Setter Property="Height" Value="55"/>
<Setter Property="Margin" Value="0,0,10,0"/>
<Setter Property="Background" Value="#F2F4F4"/>
<Setter Property="BorderBrush" Value="#85929E"/>
<Setter Property="BorderThickness" Value="1.5"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#E5E8E8"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Foreground" Value="#2C3E50"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</StackPanel.Resources>
2 months ago
<Button Command="{Binding NavigateDataCommand}">
<StackPanel>
<TextBlock Text="Data" FontSize="14"/>
<TextBlock Text="(측정 데이터)" FontSize="10" FontWeight="Normal" Foreground="#566573"/>
</StackPanel>
</Button>
<Button Command="{Binding NavigateParametersCommand}">
<StackPanel>
<TextBlock Text="Parameters" FontSize="14"/>
<TextBlock Text="(시험 설정)" FontSize="10" FontWeight="Normal" Foreground="#566573"/>
</StackPanel>
</Button>
<Button Command="{Binding NavigateCommunicationCommand}">
<StackPanel>
<TextBlock Text="Comm. Settings" FontSize="14"/>
<TextBlock Text="(통신 설정)" FontSize="10" FontWeight="Normal" Foreground="#566573"/>
</StackPanel>
</Button>
4 months ago
<Button Command="{Binding ReadIdTestCommand}" CommandParameter="0">
<StackPanel>
<TextBlock Text="ID Test (L)" FontSize="14" Foreground="#2980B9"/>
<TextBlock Text="(좌측 ID 테스트)" FontSize="10" FontWeight="Normal" Foreground="#566573"/>
</StackPanel>
</Button>
<Button Command="{Binding ReadIdTestCommand}" CommandParameter="1">
<StackPanel>
<TextBlock Text="ID Test (R)" FontSize="14" Foreground="#2980B9"/>
<TextBlock Text="(우측 ID 테스트)" FontSize="10" FontWeight="Normal" Foreground="#566573"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
</Border>
</Grid>
</Window>