138 lines
9.3 KiB
XML
138 lines
9.3 KiB
XML
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Margin="8">
|
|
|
|
<Grid.Resources>
|
|
<!-- 서비스 한 줄 -->
|
|
<DataTemplate x:Key="RowTemplate">
|
|
<Border BorderBrush="#ECEFF1" BorderThickness="0,0,0,1" Padding="8,4" Background="Transparent">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="32"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="110"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<CheckBox IsChecked="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center"/>
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" ToolTip="{Binding Tooltip}">
|
|
<Ellipse Width="10" Height="10" Fill="{Binding StatusBrush}" Margin="0,0,8,0" VerticalAlignment="Center"/>
|
|
<Border Visibility="{Binding HostPrefixVisibility}" Background="#EDE7F6" CornerRadius="3" Padding="5,1" Margin="0,0,6,0" VerticalAlignment="Center">
|
|
<TextBlock Text="{Binding HostPrefix}" Foreground="#5E35B1" FontSize="12"/>
|
|
</Border>
|
|
<TextBlock Text="{Binding DisplayName}" FontWeight="SemiBold" FontSize="14" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding ServiceNameText}" Foreground="#90A4AE" Margin="8,0,0,0" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
<TextBlock Grid.Column="2" Text="{Binding StatusText}" Foreground="{Binding StatusBrush}" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
|
<StackPanel Grid.Column="3" Orientation="Horizontal">
|
|
<Button Content="Start" Tag="start" Style="{DynamicResource RowButton}" IsEnabled="{Binding IsIdle}"/>
|
|
<Button Content="Stop" Tag="stop" Style="{DynamicResource RowButton}" IsEnabled="{Binding IsIdle}"/>
|
|
<Button Content="Status" Tag="status" Style="{DynamicResource RowButton}"/>
|
|
<Button Content="Log" Tag="log" Style="{DynamicResource RowButton}" ToolTip="{Binding LogTooltip}" FontWeight="{Binding LogFontWeight}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
|
|
<!-- PC 하나 (제목 줄 + 서비스 목록, 접기/펼치기) -->
|
|
<DataTemplate x:Key="GroupTemplate">
|
|
<Expander IsExpanded="{Binding IsExpanded, Mode=TwoWay}" Margin="0,0,0,2" BorderThickness="0">
|
|
<Expander.Header>
|
|
<Border Background="{Binding HeaderBrush}" CornerRadius="3" Padding="8,4">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="13.5" VerticalAlignment="Center"/>
|
|
<Ellipse Width="8" Height="8" Fill="{Binding StatusBrush}" Margin="12,0,5,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding StatusText}" Foreground="{Binding StatusBrush}" VerticalAlignment="Center"/>
|
|
<Button Content="원격관리" Tag="remoteDesktop" Visibility="{Binding RemoteButtonVisibility}"
|
|
Style="{DynamicResource RowButton}" Margin="14,0,0,0" MinHeight="22" Padding="8,0"
|
|
ToolTip="이 PC 화면 보기 / 키보드·마우스 제어 (대상 PC에서 허용해야 함)"/>
|
|
<Button Content="비밀번호" Tag="relayPassword" Visibility="{Binding PasswordButtonVisibility}"
|
|
Style="{DynamicResource RowButton}" Margin="6,0,0,0" MinHeight="22" Padding="8,0"
|
|
ToolTip="중계 서버로 연결하는 이 PC의 접속 비밀번호 입력 (대상 PC의 [원격 접속 허용] 비밀번호)"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Expander.Header>
|
|
<StackPanel>
|
|
<ItemsControl ItemsSource="{Binding Rows}" ItemTemplate="{StaticResource RowTemplate}"/>
|
|
<TextBlock Text="{Binding EmptyText}" Visibility="{Binding EmptyVisibility}"
|
|
Foreground="#90A4AE" Margin="40,8,8,10"/>
|
|
</StackPanel>
|
|
</Expander>
|
|
</DataTemplate>
|
|
</Grid.Resources>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*" MinHeight="140"/>
|
|
<RowDefinition Height="8"/>
|
|
<RowDefinition Height="*" MinHeight="140"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- ───────── 상단 버튼 ───────── -->
|
|
<Border Grid.Row="0" BorderBrush="#B0BEC5" BorderThickness="1" Background="White" Padding="4" Margin="0,0,0,6">
|
|
<DockPanel>
|
|
<Button x:Name="btnExit" DockPanel.Dock="Right" Content="종료" ToolTip="JJServiceManager를 완전히 종료합니다. (트레이에도 남지 않음, 서비스는 그대로 유지)"/>
|
|
<Button x:Name="btnSettings" DockPanel.Dock="Right" Content="설정"/>
|
|
<StackPanel x:Name="pnlShutdown" DockPanel.Dock="Right" Orientation="Horizontal" Margin="0,0,12,0">
|
|
<Button x:Name="btnShutdown" Content="Windows 강제종료" Style="{DynamicResource DangerButton}"/>
|
|
<Button x:Name="btnRestart" Content="Windows 재시작" Style="{DynamicResource DangerButton}"/>
|
|
</StackPanel>
|
|
<WrapPanel>
|
|
<Button x:Name="btnAdd" Content="추가" ToolTip="내 PC에서 관리할 Windows 서비스를 선택합니다."/>
|
|
<Button x:Name="btnDelete" Content="삭제" ToolTip="체크한 내 PC 서비스를 목록에서 뺍니다. (Windows 서비스는 그대로 유지)"/>
|
|
<Rectangle Width="1" Fill="#CFD8DC" Margin="8,4"/>
|
|
<Button x:Name="btnStartChecked" Content="Start" ToolTip="체크한 서비스(원격 포함)를 차례로 시작합니다."/>
|
|
<Button x:Name="btnStopChecked" Content="Stop" ToolTip="체크한 서비스(원격 포함)를 차례로 중지합니다."/>
|
|
</WrapPanel>
|
|
</DockPanel>
|
|
</Border>
|
|
|
|
<!-- ───────── 서비스 목록 (전체 탭 + PC별 탭) ───────── -->
|
|
<Border Grid.Row="1" BorderBrush="#B0BEC5" BorderThickness="1" Background="White">
|
|
<DockPanel>
|
|
<!-- 열 제목 + PC 탭 추가 -->
|
|
<Border DockPanel.Dock="Top" Background="#ECEFF1" BorderBrush="#CFD8DC" BorderThickness="0,0,0,1" Padding="8,5">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="32"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<CheckBox x:Name="chkAll" VerticalAlignment="Center" ToolTip="지금 보이는 탭의 서비스 전체 체크 / 해제"/>
|
|
<TextBlock Grid.Column="1" Text="서비스" FontWeight="Bold" VerticalAlignment="Center"/>
|
|
<TextBlock x:Name="txtCount" Grid.Column="2" Foreground="#607D8B" VerticalAlignment="Center" Margin="0,0,16,0"/>
|
|
<StackPanel Grid.Column="3" Orientation="Horizontal">
|
|
<TextBlock Text="PC 탭 추가" VerticalAlignment="Center" Margin="0,0,6,0" Foreground="#455A64"/>
|
|
<ComboBox x:Name="cmbAddTab" Width="230" Height="26" VerticalContentAlignment="Center"
|
|
DisplayMemberPath="Title"
|
|
ToolTip="고른 PC만 보여주는 탭을 옆에 추가합니다."/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<TabControl x:Name="tabHosts" BorderThickness="0" Padding="0">
|
|
<TabItem x:Name="tabAll" Header="전체">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<ItemsControl x:Name="icGroups" ItemTemplate="{StaticResource GroupTemplate}" Margin="4"/>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
</TabControl>
|
|
</DockPanel>
|
|
</Border>
|
|
|
|
<GridSplitter Grid.Row="2" Height="8" HorizontalAlignment="Stretch" VerticalAlignment="Center" Background="Transparent" ResizeDirection="Rows" ShowsPreview="False"/>
|
|
|
|
<!-- ───────── 작업 로그 ───────── -->
|
|
<Border Grid.Row="3" BorderBrush="#B0BEC5" BorderThickness="1" Background="White" Padding="4">
|
|
<DockPanel>
|
|
<TextBlock DockPanel.Dock="Top" Text="로그" Style="{DynamicResource SectionTitle}"/>
|
|
<Grid>
|
|
<ContentControl x:Name="ccLog"/>
|
|
<TextBlock x:Name="txtLogHidden" Visibility="Collapsed" Foreground="#90A4AE" FontSize="13"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
Text="작업 로그 표시가 꺼져 있습니다. (설정 → 서비스 시작 시 로그보기)"/>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Border>
|
|
</Grid>
|