89 lines
4.9 KiB
Plaintext
89 lines
4.9 KiB
Plaintext
|
|
<Window x:Class="CloudPrint.Client.Views.MainWindow"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:views="clr-namespace:CloudPrint.Client.Views"
|
||
|
|
Title="云印享打印客户端"
|
||
|
|
Width="1200"
|
||
|
|
Height="760"
|
||
|
|
MinWidth="980"
|
||
|
|
MinHeight="620"
|
||
|
|
WindowStartupLocation="CenterScreen">
|
||
|
|
<Grid Margin="20">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<Border Grid.Row="0" Background="#2563EB" CornerRadius="18" Padding="24" Margin="0,0,0,16">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<StackPanel>
|
||
|
|
<TextBlock Text="云印享 Windows 打印客户端" FontSize="26" FontWeight="Bold" Foreground="White" />
|
||
|
|
<TextBlock Text="gRPC 订阅打印任务 · Windows 打印机管理 · 文件预处理(最小运行版)"
|
||
|
|
Margin="0,8,0,0" Foreground="#DBEAFE" FontSize="14" />
|
||
|
|
</StackPanel>
|
||
|
|
<Border Grid.Column="1" Background="#1D4ED8" CornerRadius="12" Padding="14,8" VerticalAlignment="Center">
|
||
|
|
<TextBlock Text="{Binding ConnectionStatus}" Foreground="White" FontWeight="SemiBold" />
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Border Grid.Row="1" Background="White" CornerRadius="14" Padding="18" Margin="0,0,0,16">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="1.15*" />
|
||
|
|
<ColumnDefinition Width="1.05*" />
|
||
|
|
<ColumnDefinition Width="1.05*" />
|
||
|
|
<ColumnDefinition Width="1.25*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<StackPanel Grid.Column="0" Margin="0,0,14,0">
|
||
|
|
<TextBlock Text="gRPC 服务器地址" Foreground="#475569" Margin="0,0,0,6" />
|
||
|
|
<TextBox Text="{Binding Settings.ServerAddress, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
|
</StackPanel>
|
||
|
|
<StackPanel Grid.Column="1" Margin="0,0,14,0">
|
||
|
|
<TextBlock Text="打印客户端 API Key" Foreground="#475569" Margin="0,0,0,6" />
|
||
|
|
<TextBox Text="{Binding Settings.ApiKey, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
|
</StackPanel>
|
||
|
|
<StackPanel Grid.Column="2" Margin="0,0,14,0">
|
||
|
|
<TextBlock Text="门店名称" Foreground="#475569" Margin="0,0,0,6" />
|
||
|
|
<TextBox Text="{Binding Settings.StoreName, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
|
</StackPanel>
|
||
|
|
<StackPanel Grid.Column="3" Margin="0,0,14,0">
|
||
|
|
<TextBlock Text="本机打印机" Foreground="#475569" Margin="0,0,0,6" />
|
||
|
|
<ComboBox ItemsSource="{Binding Printers}"
|
||
|
|
SelectedItem="{Binding SelectedPrinter}"
|
||
|
|
DisplayMemberPath="DisplayText"
|
||
|
|
MinHeight="32" />
|
||
|
|
</StackPanel>
|
||
|
|
<StackPanel Grid.Column="4" VerticalAlignment="Bottom" Orientation="Horizontal">
|
||
|
|
<Button Content="保存设置" Command="{Binding SaveSettingsCommand}" Style="{StaticResource SecondaryButtonStyle}" />
|
||
|
|
<Button Content="刷新打印机" Command="{Binding RefreshPrintersCommand}" Style="{StaticResource SecondaryButtonStyle}" />
|
||
|
|
<Button Content="连接/注册" Command="{Binding ConnectCommand}" />
|
||
|
|
<Button Content="订阅任务" Command="{Binding SubscribeCommand}" />
|
||
|
|
<Button Content="断开" Command="{Binding DisconnectCommand}" Style="{StaticResource SecondaryButtonStyle}" />
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<TabControl Grid.Row="2" Background="Transparent" BorderThickness="0">
|
||
|
|
<TabItem Header="打印队列">
|
||
|
|
<views:PrintQueueView DataContext="{Binding}" Margin="0,12,0,0" />
|
||
|
|
</TabItem>
|
||
|
|
<TabItem Header="文库管理">
|
||
|
|
<views:LibraryView DataContext="{Binding Library}" Margin="0,12,0,0" />
|
||
|
|
</TabItem>
|
||
|
|
<TabItem Header="系统设置">
|
||
|
|
<views:SettingsView DataContext="{Binding SettingsPanel}" Margin="0,12,0,0" />
|
||
|
|
</TabItem>
|
||
|
|
</TabControl>
|
||
|
|
|
||
|
|
<TextBlock Grid.Row="3" Text="当前仅修改 Client 目录;未触碰 adminpage/backend/frontend。"
|
||
|
|
Foreground="#64748B" Margin="0,12,0,0" HorizontalAlignment="Right" />
|
||
|
|
</Grid>
|
||
|
|
</Window>
|