096111e983
.claude/ 제외(.gitignore 추가). 기존 초기커밋(5a96a69) 위에 신규·수정·이동분 커밋.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
180 lines
17 KiB
XML
180 lines
17 KiB
XML
<Window x:Class="RJ2RoomConSimulator.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="RJ2-232 룸콘 시뮬레이터 - RoomCon Simulator"
|
|
Width="620" Height="860"
|
|
MinWidth="560" MinHeight="740"
|
|
Background="{StaticResource PrimaryBgBrush}"
|
|
WindowStartupLocation="CenterScreen">
|
|
|
|
<Grid Margin="12">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/> <!-- 0: 연결 -->
|
|
<RowDefinition Height="Auto"/> <!-- 1: 룸콘 제어 -->
|
|
<RowDefinition Height="Auto"/> <!-- 2: ERV 응답 -->
|
|
<RowDefinition Height="*"/> <!-- 3: 로그 -->
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Row 0: 연결 설정 (2줄) -->
|
|
<Border Grid.Row="0" Background="{StaticResource SecondaryBgBrush}" CornerRadius="10" Padding="14,10" Margin="0,0,0,8">
|
|
<StackPanel>
|
|
<DockPanel Margin="0,0,0,8">
|
|
<TextBlock Text="RJ2-232 룸콘 시뮬레이터" FontSize="17" FontWeight="Bold"
|
|
Foreground="{StaticResource AccentCyanBrush}" VerticalAlignment="Center"/>
|
|
<StackPanel DockPanel.Dock="Right" VerticalAlignment="Center" HorizontalAlignment="Right">
|
|
<TextBlock Text="만든이 : 전경선" Foreground="{StaticResource TextSecondaryBrush}" FontSize="10" TextAlignment="Right"/>
|
|
<TextBlock Text="수정일 : 2026.06.07" Foreground="{StaticResource TextSecondaryBrush}" FontSize="10" TextAlignment="Right"/>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<ComboBox x:Name="cmbPort" Width="92" Style="{StaticResource ModernComboBox}" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
<Button Content="⟳" Width="28" Height="28" FontSize="13" Style="{StaticResource ModernButton}" Click="RefreshPorts_Click"
|
|
Background="{StaticResource CardBgBrush}" Margin="0,0,8,0" Padding="0"/>
|
|
<TextBlock Text="9600 8N1" Foreground="{StaticResource TextSecondaryBrush}" VerticalAlignment="Center" Margin="0,0,10,0" FontSize="11"/>
|
|
<Ellipse x:Name="statusLed" Width="10" Height="10" Fill="#F7768E" Margin="0,0,5,0" VerticalAlignment="Center"/>
|
|
<TextBlock x:Name="txtStatus" Text="미연결" Foreground="{StaticResource TextSecondaryBrush}" FontSize="12" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
|
<Button x:Name="btnConnect" Content="연결" Style="{StaticResource ModernButton}" Click="Connect_Click" Margin="0,0,4,0" Padding="12,6"/>
|
|
<Button x:Name="btnStart" Content="폴링 시작" Style="{StaticResource ModernButton}" Background="{StaticResource AccentGreenBrush}" Click="Start_Click" IsEnabled="False" Margin="0,0,4,0" Padding="12,6"/>
|
|
<Button x:Name="btnStop" Content="중지" Style="{StaticResource ModernButton}" Background="{StaticResource AccentRedBrush}" Click="Stop_Click" IsEnabled="False" Padding="12,6"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Row 1: 룸콘 제어 -->
|
|
<Border Grid.Row="1" Background="{StaticResource SecondaryBgBrush}" CornerRadius="10" Padding="16" Margin="0,0,0,8">
|
|
<StackPanel>
|
|
<TextBlock Text="룸콘 제어" FontSize="14" FontWeight="Bold" Foreground="{StaticResource TextPrimaryBrush}" Margin="0,0,0,14"/>
|
|
|
|
<!-- 전원 + 후드 연동(표시 전용 : ERV 후드연동 상태 수신, 힘펠 V3.7 HOOD_INFO 0x0A) -->
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,14">
|
|
<TextBlock Text="전원" Width="64" FontSize="13" FontWeight="SemiBold" Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
<ToggleButton x:Name="tglPower" Style="{StaticResource ToggleSwitch}" Click="Power_Click" VerticalAlignment="Center"/>
|
|
<TextBlock x:Name="txtPower" Text="OFF" FontSize="13" FontWeight="Bold" Margin="12,0,0,0" Foreground="{StaticResource TextSecondaryBrush}" VerticalAlignment="Center"/>
|
|
|
|
<Border Width="1" Background="{StaticResource BorderBrush}" Margin="18,2,16,2"/>
|
|
<TextBlock Text="후드 연동" FontSize="13" FontWeight="SemiBold" Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
|
<Ellipse x:Name="HoodLinkLed" Width="11" Height="11" Fill="#3B3B55" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
|
<TextBlock x:Name="txtHoodLink" Text="OFF" FontSize="13" FontWeight="Bold" Foreground="{StaticResource TextSecondaryBrush}" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
|
|
<!-- 모드 -->
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
|
|
<TextBlock Text="모드" Width="64" FontSize="13" FontWeight="SemiBold" Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
<StackPanel Orientation="Horizontal" x:Name="ModePanel">
|
|
<Button Content="환기" Tag="0" Click="Mode_Click" Style="{StaticResource ModernButton}" Margin="0,0,6,0" MinWidth="78" Background="{StaticResource CardBgBrush}"/>
|
|
<Button Content="자동" Tag="1" Click="Mode_Click" Style="{StaticResource ModernButton}" Margin="0,0,6,0" MinWidth="78" Background="{StaticResource CardBgBrush}"/>
|
|
<Button Content="공기청정" Tag="3" Click="Mode_Click" Style="{StaticResource ModernButton}" Margin="0,0,6,0" MinWidth="78" Background="{StaticResource CardBgBrush}"/>
|
|
<Button Content="바이패스" Tag="2" Click="Mode_Click" Style="{StaticResource ModernButton}" MinWidth="78" Background="{StaticResource CardBgBrush}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<!-- 풍량 -->
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
|
|
<TextBlock Text="풍량" Width="64" FontSize="13" FontWeight="SemiBold" Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
<StackPanel Orientation="Horizontal" x:Name="FanPanel">
|
|
<Button Content="0" Tag="0" Click="Fan_Click" Style="{StaticResource ModernButton}" Margin="0,0,5,0" MinWidth="44" Background="{StaticResource CardBgBrush}"/>
|
|
<Button Content="1" Tag="1" Click="Fan_Click" Style="{StaticResource ModernButton}" Margin="0,0,5,0" MinWidth="44" Background="{StaticResource CardBgBrush}"/>
|
|
<Button Content="2" Tag="2" Click="Fan_Click" Style="{StaticResource ModernButton}" Margin="0,0,5,0" MinWidth="44" Background="{StaticResource CardBgBrush}"/>
|
|
<Button Content="3" Tag="3" Click="Fan_Click" Style="{StaticResource ModernButton}" Margin="0,0,5,0" MinWidth="44" Background="{StaticResource CardBgBrush}"/>
|
|
<Button Content="4" Tag="4" Click="Fan_Click" Style="{StaticResource ModernButton}" MinWidth="44" Background="{StaticResource CardBgBrush}"/>
|
|
</StackPanel>
|
|
<TextBlock Text="(자동:변경불가 · 바이패스:1단)" FontSize="10" Foreground="{StaticResource TextSecondaryBrush}" VerticalAlignment="Center" Margin="10,0,0,0"/>
|
|
</StackPanel>
|
|
|
|
<!-- 예약 -->
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
|
|
<TextBlock Text="예약(꺼짐)" Width="64" FontSize="13" FontWeight="SemiBold" Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
<ComboBox x:Name="ReserveCombo" Width="90" Style="{StaticResource ModernComboBox}" VerticalAlignment="Center" SelectionChanged="Reserve_Changed" SelectedIndex="0">
|
|
<ComboBoxItem Content="해제"/>
|
|
<ComboBoxItem Content="1시간"/>
|
|
<ComboBoxItem Content="2시간"/>
|
|
<ComboBoxItem Content="3시간"/>
|
|
<ComboBoxItem Content="4시간"/>
|
|
<ComboBoxItem Content="5시간"/>
|
|
<ComboBoxItem Content="6시간"/>
|
|
<ComboBoxItem Content="7시간"/>
|
|
<ComboBoxItem Content="8시간"/>
|
|
</ComboBox>
|
|
<TextBlock Text="(모드 전환 시 해제)" FontSize="10" Foreground="{StaticResource TextSecondaryBrush}" VerticalAlignment="Center" Margin="10,0,0,0"/>
|
|
</StackPanel>
|
|
|
|
<!-- id / vsp -->
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="ID" Width="64" FontSize="13" FontWeight="SemiBold" Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
<TextBox x:Name="txtDeviceId" Text="1" Width="50" Style="{StaticResource ModernTextBox}" TextAlignment="Center" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
|
<Button Content="적용" Style="{StaticResource ModernButton}" Click="ApplyId_Click" Padding="12,5" Background="{StaticResource CardBgBrush}" Margin="0,0,18,0"/>
|
|
<Button Content="VSP 설정 ▸" Style="{StaticResource ModernButton}" Click="OpenVsp_Click" Padding="12,5" Background="{StaticResource CardBgBrush}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Row 2: ERV 응답 상태 -->
|
|
<Border Grid.Row="2" Background="{StaticResource SecondaryBgBrush}" CornerRadius="10" Padding="16" Margin="0,0,0,8">
|
|
<StackPanel>
|
|
<DockPanel Margin="0,0,0,10">
|
|
<TextBlock Text="ERV 응답 상태" FontSize="14" FontWeight="Bold" Foreground="{StaticResource TextPrimaryBrush}"/>
|
|
<TextBlock x:Name="txtRxCount" DockPanel.Dock="Right" Text="수신: 0" FontSize="12" Foreground="{StaticResource TextSecondaryBrush}" VerticalAlignment="Center"/>
|
|
</DockPanel>
|
|
<Border Background="{StaticResource CardBgBrush}" CornerRadius="6" Padding="12,8" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1">
|
|
<StackPanel>
|
|
<DockPanel Margin="0,0,0,3"><TextBlock Text="운전모드" FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"/><TextBlock x:Name="txtErvMode" DockPanel.Dock="Right" Text="-" FontSize="12" FontWeight="Bold" Foreground="{StaticResource AccentCyanBrush}"/></DockPanel>
|
|
<DockPanel Margin="0,0,0,3"><TextBlock Text="풍량" FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"/><TextBlock x:Name="txtErvFan" DockPanel.Dock="Right" Text="-" FontSize="12" FontWeight="Bold" Foreground="{StaticResource TextPrimaryBrush}"/></DockPanel>
|
|
<DockPanel Margin="0,0,0,3"><TextBlock Text="에러코드" FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"/><TextBlock x:Name="txtErvErr" DockPanel.Dock="Right" Text="-" FontSize="12" FontWeight="Bold" Foreground="{StaticResource TextPrimaryBrush}"/></DockPanel>
|
|
<DockPanel Margin="0,0,0,3"><TextBlock Text="실내온도" FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"/><TextBlock x:Name="txtErvIn" DockPanel.Dock="Right" Text="-" FontSize="12" FontWeight="Bold" Foreground="{StaticResource TextPrimaryBrush}"/></DockPanel>
|
|
<DockPanel><TextBlock Text="외기온도" FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"/><TextBlock x:Name="txtErvOut" DockPanel.Dock="Right" Text="-" FontSize="12" FontWeight="Bold" Foreground="{StaticResource TextPrimaryBrush}"/></DockPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- 알람 (필터 청소/교환) -->
|
|
<StackPanel Orientation="Horizontal" Margin="0,10,0,4">
|
|
<TextBlock Text="알람" Width="40" FontSize="12" FontWeight="SemiBold" Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
<Border CornerRadius="4" Padding="6,3" Margin="0,0,4,0" Background="{StaticResource CardBgBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1">
|
|
<StackPanel Orientation="Horizontal"><Ellipse x:Name="AlFClean" Width="9" Height="9" Fill="#3B3B55" VerticalAlignment="Center" Margin="0,0,4,0"/><TextBlock Text="필터청소" FontSize="11" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource TextPrimaryBrush}"/></StackPanel>
|
|
</Border>
|
|
<Border CornerRadius="4" Padding="6,3" Background="{StaticResource CardBgBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1">
|
|
<StackPanel Orientation="Horizontal"><Ellipse x:Name="AlFChange" Width="9" Height="9" Fill="#3B3B55" VerticalAlignment="Center" Margin="0,0,4,0"/><TextBlock Text="필터교환" FontSize="11" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource TextPrimaryBrush}"/></StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
|
|
<!-- 에러 (ERV ErrorCode) -->
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="에러" Width="40" FontSize="12" FontWeight="SemiBold" Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
<Border CornerRadius="4" Padding="6,3" Margin="0,0,4,0" Background="{StaticResource CardBgBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" ToolTip="온도센서">
|
|
<StackPanel Orientation="Horizontal"><Ellipse x:Name="ErE02" Width="9" Height="9" Fill="#3B3B55" VerticalAlignment="Center" Margin="0,0,4,0"/><TextBlock Text="E02" FontSize="11" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource TextPrimaryBrush}"/></StackPanel>
|
|
</Border>
|
|
<Border CornerRadius="4" Padding="6,3" Margin="0,0,4,0" Background="{StaticResource CardBgBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" ToolTip="급기(SA) 팬">
|
|
<StackPanel Orientation="Horizontal"><Ellipse x:Name="ErE09" Width="9" Height="9" Fill="#3B3B55" VerticalAlignment="Center" Margin="0,0,4,0"/><TextBlock Text="E09" FontSize="11" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource TextPrimaryBrush}"/></StackPanel>
|
|
</Border>
|
|
<Border CornerRadius="4" Padding="6,3" Margin="0,0,4,0" Background="{StaticResource CardBgBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" ToolTip="배기(EA) 팬">
|
|
<StackPanel Orientation="Horizontal"><Ellipse x:Name="ErE10" Width="9" Height="9" Fill="#3B3B55" VerticalAlignment="Center" Margin="0,0,4,0"/><TextBlock Text="E10" FontSize="11" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource TextPrimaryBrush}"/></StackPanel>
|
|
</Border>
|
|
<Border CornerRadius="4" Padding="6,3" Margin="0,0,4,0" Background="{StaticResource CardBgBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" ToolTip="장비보호모드">
|
|
<StackPanel Orientation="Horizontal"><Ellipse x:Name="ErCold" Width="9" Height="9" Fill="#3B3B55" VerticalAlignment="Center" Margin="0,0,4,0"/><TextBlock Text="COLD" FontSize="11" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource TextPrimaryBrush}"/></StackPanel>
|
|
</Border>
|
|
<Border CornerRadius="4" Padding="6,3" Background="{StaticResource CardBgBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" ToolTip="내부 통신">
|
|
<StackPanel Orientation="Horizontal"><Ellipse x:Name="ErE07" Width="9" Height="9" Fill="#3B3B55" VerticalAlignment="Center" Margin="0,0,4,0"/><TextBlock Text="E07" FontSize="11" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource TextPrimaryBrush}"/></StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Row 3: 통신 로그 -->
|
|
<Border Grid.Row="3" Background="{StaticResource SecondaryBgBrush}" CornerRadius="10" Padding="12">
|
|
<DockPanel>
|
|
<Grid DockPanel.Dock="Top" Margin="0,0,0,5">
|
|
<TextBlock Text="통신 로그" FontSize="12" FontWeight="Bold" Foreground="{StaticResource TextPrimaryBrush}"/>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button Content="저장" Style="{StaticResource ModernButton}" Background="{StaticResource AccentBlueBrush}" Padding="10,3" FontSize="11" Click="SaveLog_Click" Margin="0,0,6,0"/>
|
|
<Button Content="지우기" Style="{StaticResource ModernButton}" Background="{StaticResource CardBgBrush}" Padding="10,3" FontSize="11" Click="ClearLog_Click"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
<TextBox x:Name="txtLog" IsReadOnly="True" Background="{StaticResource CardBgBrush}"
|
|
Foreground="{StaticResource TextPrimaryBrush}" BorderBrush="{StaticResource BorderBrush}"
|
|
BorderThickness="1" FontFamily="Consolas" FontSize="10"
|
|
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
|
TextWrapping="NoWrap" Padding="6"/>
|
|
</DockPanel>
|
|
</Border>
|
|
</Grid>
|
|
</Window>
|