You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
5.8 KiB
XML
76 lines
5.8 KiB
XML
<UserControl x:CompileBindings="False" xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="Sln.Wcs.UI.Views.SystemMonitorView">
|
|
<Grid RowDefinitions="Auto,Auto,Auto,*" Margin="20,14,20,14" VerticalAlignment="Stretch">
|
|
<!-- Hoist Engine -->
|
|
<Border Grid.Row="0" Background="{DynamicResource CardBgBrush}" Padding="10,8" CornerRadius="6"
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Margin="0,0,0,8">
|
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="8" VerticalAlignment="Center" Margin="0,0,12,0">
|
|
<Ellipse Width="10" Height="10" Fill="{Binding HoistStatusColor}" VerticalAlignment="Center" />
|
|
<TextBlock Text="提升机调度引擎" FontSize="13" FontWeight="SemiBold" Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
<Border Grid.Column="1" Background="{DynamicResource PrimaryBgBrush}" CornerRadius="3" Padding="6,3" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Text="{Binding HoistStatusText}" FontSize="11" Foreground="{DynamicResource AccentTextBrush}" />
|
|
</Border>
|
|
<Button Grid.Column="2" Content="▶ 启动" Command="{Binding StartHoistCommand}"
|
|
Background="#1B5E20" Foreground="White" FontSize="11" Padding="12,5" Margin="0,0,6,0" />
|
|
<Button Grid.Column="3" Content="■ 停止" Command="{Binding StopHoistCommand}"
|
|
Background="#B71C1C" Foreground="White" FontSize="11" Padding="12,5" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- AGV Engine -->
|
|
<Border Grid.Row="1" Background="{DynamicResource CardBgBrush}" Padding="10,8" CornerRadius="6"
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Margin="0,0,0,10">
|
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="8" VerticalAlignment="Center" Margin="0,0,12,0">
|
|
<Ellipse Width="10" Height="10" Fill="{Binding AgvStatusColor}" VerticalAlignment="Center" />
|
|
<TextBlock Text="AGV 调度引擎" FontSize="13" FontWeight="SemiBold" Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
<Border Grid.Column="1" Background="{DynamicResource PrimaryBgBrush}" CornerRadius="3" Padding="6,3" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Text="{Binding AgvStatusText}" FontSize="11" Foreground="{DynamicResource AccentTextBrush}" />
|
|
</Border>
|
|
<Button Grid.Column="2" Content="▶ 启动" Command="{Binding StartAgvCommand}"
|
|
Background="#1B5E20" Foreground="White" FontSize="11" Padding="12,5" Margin="0,0,6,0" />
|
|
<Button Grid.Column="3" Content="■ 停止" Command="{Binding StopAgvCommand}"
|
|
Background="#B71C1C" Foreground="White" FontSize="11" Padding="12,5" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Toolbar -->
|
|
<Grid Grid.Row="2" ColumnDefinitions="Auto,*,Auto,Auto,Auto" Margin="0,0,0,8">
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="6">
|
|
<Ellipse Width="8" Height="8" Fill="#00E676" VerticalAlignment="Center" />
|
|
<TextBlock Text="控制台日志" FontSize="15" FontWeight="SemiBold" Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="6" Margin="0,0,10,0">
|
|
<TextBlock Text="{Binding LogCount, StringFormat='共 {0} 条'}" FontSize="12" Foreground="{DynamicResource MutedTextBrush}" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
<Button Grid.Column="3" Content="清空" Command="{Binding ClearCommand}"
|
|
Background="{DynamicResource PrimaryBgBrush}" Foreground="{DynamicResource SecondaryTextBrush}" Padding="12,5" FontSize="12" Margin="0,0,6,0" />
|
|
<Button Grid.Column="4" Content="{Binding AutoScroll, StringFormat={}{0} auto?}" Command="{Binding ToggleAutoScrollCommand}"
|
|
Background="{DynamicResource PrimaryBgBrush}" Foreground="{DynamicResource SecondaryTextBrush}" Padding="12,5" FontSize="12" />
|
|
</Grid>
|
|
|
|
<!-- Log List -->
|
|
<Border Grid.Row="3" Background="{DynamicResource CardBgBrush}" CornerRadius="6" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
|
<ListBox ItemsSource="{Binding Logs}" Background="Transparent" Foreground="#BCC8D6" BorderThickness="0">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Padding="10,3" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<TextBlock Text="{Binding TimeText}" FontSize="11" Foreground="#4B5E7A"
|
|
FontFamily="Menlo,Consolas,monospace" VerticalAlignment="Center" Width="100" />
|
|
<TextBlock Text="{Binding Message}" FontSize="11"
|
|
Foreground="{DynamicResource SecondaryTextBrush}" FontFamily="Menlo,Consolas,monospace"
|
|
TextWrapping="Wrap" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Border>
|
|
</Grid>
|
|
</UserControl>
|