소스(Core/Shell/Launcher)와 실행 PC가 받아갈 업데이트 파일(dist)을 함께 올린다. Launcher가 켤 때 이 저장소의 dist와 D:\UbisamPlatform\bin을 비교해 새 버전이면 받아간다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
173 lines
9.4 KiB
XML
173 lines
9.4 KiB
XML
<Window x:Class="UbisamBase.Core.Shell.ShellWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:messaging="clr-namespace:UbisamBase.Core.Messaging"
|
|
Title="{Binding Title}"
|
|
Height="760" Width="1200"
|
|
WindowStartupLocation="CenterScreen"
|
|
WindowState="Maximized"
|
|
Background="{DynamicResource Ubisam.Brush.ContentBackground}">
|
|
|
|
<Window.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/UbisamBase.Core;component/Themes/ShellStyles.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<DockPanel TextElement.Foreground="{DynamicResource Ubisam.Brush.ContentForeground}"
|
|
TextElement.FontFamily="{StaticResource Ubisam.Font.Body}">
|
|
|
|
<!-- 상단 브랜딩 바: 좌측 = 로고 + 회사명 + 장비명, 우측 = 날짜 + 시계, 그 뒤 유틸리티 버튼.
|
|
플랫폼 고정 요소 — 모듈이 건드리지 않는다. -->
|
|
<Border DockPanel.Dock="Top"
|
|
Background="{DynamicResource Ubisam.Brush.Sidebar.Background}"
|
|
BorderBrush="{DynamicResource Ubisam.Brush.SubTabBar.Border}"
|
|
BorderThickness="0,0,0,1"
|
|
Padding="26,14">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
|
|
<!-- 로고 자리: 이미지 파일이 준비되면 이 Border를 <Image Source="..."/>로 교체 -->
|
|
<Border Width="30" Height="30" Background="{DynamicResource Ubisam.Brush.Accent.Fill}">
|
|
<TextBlock Text="{Binding Brand, Converter={StaticResource FirstCharConverter}}"
|
|
Foreground="{DynamicResource Ubisam.Brush.Accent.OnFill}"
|
|
FontFamily="{StaticResource Ubisam.Font.Heading}"
|
|
FontWeight="SemiBold"
|
|
FontSize="17"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
|
|
<TextBlock Text="{Binding Brand}"
|
|
FontFamily="{StaticResource Ubisam.Font.Heading}"
|
|
FontWeight="SemiBold"
|
|
FontSize="17"
|
|
VerticalAlignment="Center"
|
|
Margin="14,0,0,0">
|
|
<TextBlock.LayoutTransform>
|
|
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
|
</TextBlock.LayoutTransform>
|
|
</TextBlock>
|
|
|
|
<Border Width="1" Height="20" Margin="14,0"
|
|
Background="{DynamicResource Ubisam.Brush.SubTabBar.Border}"/>
|
|
|
|
<!-- 장비명: IAppSetup.GetAppName()이 돌려주는 값 -->
|
|
<TextBlock Text="{Binding Title}"
|
|
FontSize="14.5"
|
|
Foreground="{DynamicResource Ubisam.Brush.Sidebar.Foreground}"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,20,0">
|
|
<TextBlock Text="{Binding CurrentDate}"
|
|
FontSize="11"
|
|
Foreground="{DynamicResource Ubisam.Brush.Muted}"
|
|
VerticalAlignment="Bottom"
|
|
Margin="0,0,12,2"/>
|
|
<TextBlock Text="{Binding CurrentTime}"
|
|
FontFamily="{StaticResource Ubisam.Font.Heading}"
|
|
FontWeight="SemiBold"
|
|
FontSize="25"
|
|
VerticalAlignment="Bottom"/>
|
|
</StackPanel>
|
|
|
|
<Button Grid.Column="2"
|
|
Content="{Binding Auth.UserDisplay}"
|
|
Style="{StaticResource Ubisam.Style.ChromeButton}"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,8,0"
|
|
Click="Account_Click"/>
|
|
|
|
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center">
|
|
<Button Content="바탕화면"
|
|
Style="{StaticResource Ubisam.Style.ChromeButton}"
|
|
Click="ShowDesktop_Click"/>
|
|
<Button Content="종료"
|
|
Style="{StaticResource Ubisam.Style.ChromeButton}"
|
|
Margin="8,0,0,0"
|
|
Click="Exit_Click"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- 네비게이션: 기본은 하단(NavPosition.Bottom). 좌/우 전환은 코드비하인드가 처리.
|
|
높이는 고정하지 않는다 — 아이콘 유무와 ChromeScale에 따라 내용 높이로 정해진다. -->
|
|
<ListBox x:Name="NavList"
|
|
DockPanel.Dock="Bottom"
|
|
Style="{StaticResource Ubisam.Style.SidebarBar.Horizontal}"
|
|
ItemsSource="{Binding MainTabs}"
|
|
SelectedItem="{Binding SelectedMainTab, Mode=TwoWay}">
|
|
<ListBox.LayoutTransform>
|
|
<ScaleTransform ScaleX="{Binding UiSettings.ChromeScale}" ScaleY="{Binding UiSettings.ChromeScale}"/>
|
|
</ListBox.LayoutTransform>
|
|
</ListBox>
|
|
|
|
<!-- 컨텐츠 + 하단 서브탭. 컨텐츠는 여백 없이 영역 전체를 쓴다 —
|
|
내부 여백은 각 모듈 View가 직접 정한다. -->
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 모듈이 없을 때만 사선 해치로 빈 슬롯을 표시하고, 모듈이 마운트되면 바탕색으로 돌아간다.
|
|
Padding은 모듈 컨텐츠만 안으로 밀어 넣는다 — 상단 헤더·하단 탭과 세로선을 맞춘 26px. -->
|
|
<Border Grid.Row="0" Padding="26,22">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="Background" Value="{DynamicResource Ubisam.Brush.ContentBackground}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding SelectedMainTab.CurrentContent}" Value="{x:Null}">
|
|
<Setter Property="Background" Value="{DynamicResource Ubisam.Brush.SlotHatch}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<ContentControl Content="{Binding SelectedMainTab.CurrentContent}"/>
|
|
</Border>
|
|
|
|
<ListBox Grid.Row="1"
|
|
Style="{StaticResource Ubisam.Style.SubTabBar}"
|
|
DisplayMemberPath="Title"
|
|
ItemsSource="{Binding SelectedMainTab.SubTabs}"
|
|
SelectedItem="{Binding SelectedMainTab.SelectedSubTab, Mode=TwoWay}"
|
|
Visibility="{Binding SelectedMainTab.HasSubTabs, Converter={StaticResource BoolToVis}}">
|
|
<ListBox.LayoutTransform>
|
|
<ScaleTransform ScaleX="{Binding UiSettings.ChromeScale}" ScaleY="{Binding UiSettings.ChromeScale}"/>
|
|
</ListBox.LayoutTransform>
|
|
</ListBox>
|
|
</Grid>
|
|
</DockPanel>
|
|
|
|
<!-- 토스트 오버레이 -->
|
|
<ItemsControl HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Margin="0,80,20,0"
|
|
IsHitTestVisible="False">
|
|
<ItemsControl.ItemsSource>
|
|
<Binding Path="Messages" Source="{x:Static messaging:ToastService.Current}"/>
|
|
</ItemsControl.ItemsSource>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Background="{Binding Type, Converter={StaticResource ToastTypeToBrush}}"
|
|
Padding="16,12"
|
|
Margin="0,0,0,8"
|
|
MaxWidth="360">
|
|
<TextBlock Text="{Binding Text}" Foreground="White" TextWrapping="Wrap" FontSize="13"/>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</Window>
|