096111e983
.claude/ 제외(.gitignore 추가). 기존 초기커밋(5a96a69) 위에 신규·수정·이동분 커밋.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
195 lines
11 KiB
XML
195 lines
11 KiB
XML
<Window x:Class="CvnetPacketProgram.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="CVNET DL 사양 패킷 통신프로그램 (프로토콜 230824 기준)"
|
|
Height="860" Width="1320" MinHeight="600" MinWidth="1000"
|
|
FontFamily="Segoe UI" FontSize="13" Background="#F4F5F7">
|
|
<Window.Resources>
|
|
<Style TargetType="GroupBox">
|
|
<Setter Property="Margin" Value="0,0,0,8"/>
|
|
<Setter Property="Padding" Value="8"/>
|
|
</Style>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Padding" Value="10,4"/>
|
|
<Setter Property="Margin" Value="0,0,6,0"/>
|
|
<Setter Property="MinWidth" Value="72"/>
|
|
</Style>
|
|
<Style x:Key="Mono" TargetType="TextBox">
|
|
<Setter Property="FontFamily" Value="Consolas"/>
|
|
<Setter Property="FontSize" Value="12.5"/>
|
|
<Setter Property="IsReadOnly" Value="True"/>
|
|
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="TextWrapping" Value="NoWrap"/>
|
|
<Setter Property="Background" Value="#1E1E1E"/>
|
|
<Setter Property="Foreground" Value="#DDE6EE"/>
|
|
<Setter Property="Padding" Value="6"/>
|
|
</Style>
|
|
<Style x:Key="Lbl" TargetType="TextBlock">
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="0,0,6,0"/>
|
|
<Setter Property="MinWidth" Value="78"/>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<DockPanel Margin="8">
|
|
|
|
<!-- ===== 상단 연결 바 ===== -->
|
|
<Border DockPanel.Dock="Top" Background="White" BorderBrush="#D0D5DD" BorderThickness="1"
|
|
CornerRadius="6" Padding="10,8" Margin="0,0,0,8">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="COM" Style="{StaticResource Lbl}" MinWidth="34"/>
|
|
<ComboBox x:Name="CmbPort" Width="100" VerticalAlignment="Center"/>
|
|
<Button Content="↻" Click="OnRefreshPorts" Margin="4,0,12,0" MinWidth="30"/>
|
|
<TextBlock Text="Baud" Style="{StaticResource Lbl}" MinWidth="40"/>
|
|
<ComboBox x:Name="CmbBaud" Width="90" VerticalAlignment="Center"/>
|
|
<Button x:Name="BtnOpen" Content="열기" Click="OnToggleOpen" Margin="12,0,6,0" MinWidth="80"/>
|
|
<Ellipse x:Name="LedConn" Width="14" Height="14" Fill="#C0392B" VerticalAlignment="Center" Margin="6,0"/>
|
|
<TextBlock x:Name="TxtConn" Text="닫힘" VerticalAlignment="Center" Foreground="#475467"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="410"/>
|
|
<ColumnDefinition Width="6"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- ===== 좌측 : 패킷 빌더 ===== -->
|
|
<Border Grid.Column="0" Background="White" BorderBrush="#D0D5DD" BorderThickness="1" CornerRadius="6">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" Padding="10">
|
|
<StackPanel>
|
|
<TextBlock Text="패킷 빌더" FontWeight="Bold" FontSize="15" Margin="0,0,0,8"/>
|
|
|
|
<Grid Margin="0,0,0,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="Cmd" Style="{StaticResource Lbl}"/>
|
|
<ComboBox x:Name="CmbCmd" Grid.Column="1" SelectionChanged="OnCmdChanged"/>
|
|
</Grid>
|
|
<Grid Margin="0,0,0,4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="Sub ID(hex)" Style="{StaticResource Lbl}"/>
|
|
<TextBox x:Name="TxtSubId" Grid.Column="1" Text="01" MaxLength="2"/>
|
|
</Grid>
|
|
|
|
<!-- 모드 / 풍량 / 예약 (제어·응답 공통) -->
|
|
<GroupBox x:Name="GrpFields" Header="필드">
|
|
<StackPanel>
|
|
<Grid Margin="0,0,0,5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/><ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="모드" Style="{StaticResource Lbl}"/>
|
|
<ComboBox x:Name="CmbMode" Grid.Column="1"/>
|
|
</Grid>
|
|
<Grid Margin="0,0,0,5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/><ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="풍량" Style="{StaticResource Lbl}"/>
|
|
<ComboBox x:Name="CmbFan" Grid.Column="1"/>
|
|
</Grid>
|
|
|
|
<WrapPanel Margin="0,2,0,4">
|
|
<CheckBox x:Name="ChkBasic" Content="기저모드" Margin="0,2,12,2"/>
|
|
<CheckBox x:Name="ChkRange" Content="렌지연동" Margin="0,2,12,2"/>
|
|
</WrapPanel>
|
|
|
|
<!-- 제어 요구(0x51) 전용 Flag -->
|
|
<StackPanel x:Name="PnlCtrlFlags">
|
|
<TextBlock Text="제어 Flag (요청 항목만 ON)" FontWeight="SemiBold" Margin="0,4,0,2"/>
|
|
<WrapPanel>
|
|
<CheckBox x:Name="ChkModeFlag" Content="모드Flag" IsChecked="True" Margin="0,2,12,2"/>
|
|
<CheckBox x:Name="ChkFanFlag" Content="풍량Flag" IsChecked="True" Margin="0,2,12,2"/>
|
|
<CheckBox x:Name="ChkRsvFlag" Content="예약Flag" Margin="0,2,12,2"/>
|
|
<CheckBox x:Name="ChkFilterReset" Content="필터타이머리셋" Margin="0,2,12,2"/>
|
|
</WrapPanel>
|
|
</StackPanel>
|
|
|
|
<Grid Margin="0,4,0,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/><ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="예약시간(0~24)" Style="{StaticResource Lbl}" MinWidth="100"/>
|
|
<TextBox x:Name="TxtReserve" Grid.Column="1" Text="0"/>
|
|
</Grid>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
|
|
<TextBlock Text="미리보기 (HEX)" FontWeight="SemiBold" Margin="0,4,0,2"/>
|
|
<TextBox x:Name="TxtPreview" Style="{StaticResource Mono}" Height="48"/>
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,8,0,0">
|
|
<Button Content="빌드" Click="OnBuild"/>
|
|
<Button x:Name="BtnSend" Content="전송" Click="OnSendBuilt" Background="#1D6FE0" Foreground="White"/>
|
|
</StackPanel>
|
|
|
|
<Separator Margin="0,12"/>
|
|
|
|
<TextBlock Text="직접 HEX 전송" FontWeight="SemiBold" Margin="0,0,0,4"/>
|
|
<TextBox x:Name="TxtRawHex" Height="44" FontFamily="Consolas"
|
|
TextWrapping="Wrap" AcceptsReturn="True"
|
|
Text="F7 32 01 11 00"/>
|
|
<StackPanel Orientation="Horizontal" Margin="0,6,0,0">
|
|
<CheckBox x:Name="ChkAutoSum" Content="XOR/ADD 자동추가" IsChecked="True" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
|
<Button Content="HEX 전송" Click="OnSendRaw"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<GridSplitter Grid.Column="1" Width="6" HorizontalAlignment="Stretch" Background="Transparent"/>
|
|
|
|
<!-- ===== 우측 : 송신/수신 로그 ===== -->
|
|
<Grid Grid.Column="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="6"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 송신 로그 -->
|
|
<Border Grid.Row="0" Background="White" BorderBrush="#D0D5DD" BorderThickness="1" CornerRadius="6">
|
|
<DockPanel>
|
|
<Border DockPanel.Dock="Top" Background="#0B3D91" CornerRadius="6,6,0,0" Padding="10,6">
|
|
<DockPanel>
|
|
<TextBlock Text="▶ 송신 (TX)" Foreground="White" FontWeight="Bold" FontSize="14"/>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Right">
|
|
<CheckBox x:Name="ChkTxAutoScroll" Content="자동스크롤" IsChecked="True" Foreground="White" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
|
<Button Content="지우기" Click="OnClearTx" MinWidth="60"/>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</Border>
|
|
<TextBox x:Name="TxtTxLog" Style="{StaticResource Mono}" Background="#10243F" BorderThickness="0"/>
|
|
</DockPanel>
|
|
</Border>
|
|
|
|
<GridSplitter Grid.Row="1" Height="6" HorizontalAlignment="Stretch" Background="Transparent"/>
|
|
|
|
<!-- 수신 로그 -->
|
|
<Border Grid.Row="2" Background="White" BorderBrush="#D0D5DD" BorderThickness="1" CornerRadius="6">
|
|
<DockPanel>
|
|
<Border DockPanel.Dock="Top" Background="#0A6B3B" CornerRadius="6,6,0,0" Padding="10,6">
|
|
<DockPanel>
|
|
<TextBlock Text="◀ 수신 (RX)" Foreground="White" FontWeight="Bold" FontSize="14"/>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Right">
|
|
<CheckBox x:Name="ChkRxAutoScroll" Content="자동스크롤" IsChecked="True" Foreground="White" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
|
<Button Content="지우기" Click="OnClearRx" MinWidth="60"/>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</Border>
|
|
<TextBox x:Name="TxtRxLog" Style="{StaticResource Mono}" Background="#0E2418" BorderThickness="0"/>
|
|
</DockPanel>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Window>
|