#0027 新增主页面B设计
This commit is contained in:
@@ -154,7 +154,7 @@ namespace XplorePlane
|
||||
|
||||
protected override Window CreateShell()
|
||||
{
|
||||
return Container.Resolve<MainWindow>();
|
||||
return Container.Resolve<MainWindowB>();
|
||||
}
|
||||
|
||||
protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
@@ -167,6 +167,7 @@ namespace XplorePlane
|
||||
|
||||
// 注册视图和视图模型
|
||||
containerRegistry.RegisterForNavigation<MainWindow>();
|
||||
containerRegistry.RegisterForNavigation<MainWindowB>();
|
||||
containerRegistry.Register<MainViewModel>();
|
||||
|
||||
// 注册图像处理服务与视图
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="200"
|
||||
d:DesignWidth="200"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="300"
|
||||
mc:Ignorable="d">
|
||||
<Grid Background="#FFFFFF">
|
||||
<Grid Background="#F5F5F5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
@@ -17,7 +17,9 @@
|
||||
FontWeight="SemiBold" Foreground="#333333" Text="探测器" />
|
||||
</Border>
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="4" />
|
||||
<StackPanel Margin="8">
|
||||
<TextBlock Text="探测器控件(待集成)" Foreground="#999999" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -4,20 +4,229 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="200"
|
||||
d:DesignWidth="200"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="300"
|
||||
mc:Ignorable="d">
|
||||
<Grid Background="#FFFFFF">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" Background="#F0F0F0" BorderBrush="#DDDDDD" BorderThickness="0,0,0,1">
|
||||
<TextBlock Margin="8,4" HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
FontWeight="SemiBold" Foreground="#333333" Text="运动控制" />
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Background="#F0F0F0"
|
||||
BorderBrush="#DDDDDD"
|
||||
BorderThickness="0,0,0,1">
|
||||
<TextBlock
|
||||
Margin="8,4"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="#333333"
|
||||
Text="探测器" />
|
||||
</Border>
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="4" />
|
||||
<ScrollViewer
|
||||
Grid.Row="1"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<Grid Margin="6,4,6,4">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="42" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- XM -->
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,4,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#333333"
|
||||
Text="XM" />
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,4,3"
|
||||
Padding="3,2"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="226555"
|
||||
TextAlignment="Right" />
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Margin="0,0,8,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#555555"
|
||||
Text="μm" />
|
||||
<!-- XM 右侧额外控件: 速度 -->
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
Grid.Column="3"
|
||||
Width="44"
|
||||
Margin="4,0,4,3"
|
||||
Padding="2"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="0.0"
|
||||
TextAlignment="Right" />
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="4"
|
||||
Margin="0,0,0,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#555555"
|
||||
Text="mm" />
|
||||
|
||||
<!-- YM -->
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,4,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#333333"
|
||||
Text="YM" />
|
||||
<TextBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,4,3"
|
||||
Padding="3,2"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="214312"
|
||||
TextAlignment="Right" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Margin="0,0,8,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#555555"
|
||||
Text="μm" />
|
||||
<TextBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="3"
|
||||
Width="44"
|
||||
Margin="4,0,4,3"
|
||||
Padding="2"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="2.5"
|
||||
TextAlignment="Right" />
|
||||
|
||||
<!-- ZT -->
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,4,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#333333"
|
||||
Text="ZT" />
|
||||
<TextBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,4,3"
|
||||
Padding="3,2"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="-200000"
|
||||
TextAlignment="Right" />
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Margin="0,0,8,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#555555"
|
||||
Text="μm" />
|
||||
|
||||
<!-- ZD -->
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,4,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#333333"
|
||||
Text="ZD" />
|
||||
<TextBox
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,4,3"
|
||||
Padding="3,2"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="300000"
|
||||
TextAlignment="Right" />
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="2"
|
||||
Margin="0,0,8,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#555555"
|
||||
Text="μm" />
|
||||
|
||||
<!-- TiltD -->
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,4,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#333333"
|
||||
Text="TiltD" />
|
||||
<TextBox
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,4,3"
|
||||
Padding="3,2"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="0"
|
||||
TextAlignment="Right" />
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="2"
|
||||
Margin="0,0,8,3"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#555555"
|
||||
Text="m°" />
|
||||
|
||||
<!-- Dist -->
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,4,0"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#333333"
|
||||
Text="Dist" />
|
||||
<TextBox
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,4,0"
|
||||
Padding="3,2"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="311860.2"
|
||||
TextAlignment="Right" />
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
Grid.Column="2"
|
||||
Margin="0,0,8,0"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#555555"
|
||||
Text="μm" />
|
||||
<TextBox
|
||||
Grid.Row="5"
|
||||
Grid.Column="3"
|
||||
Width="44"
|
||||
Margin="4,0,4,0"
|
||||
Padding="2"
|
||||
VerticalContentAlignment="Center"
|
||||
Background="#FFFFEE"
|
||||
Text="0"
|
||||
TextAlignment="Right" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -5,22 +5,98 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:rayViews="clr-namespace:XP.Hardware.RaySource.Views;assembly=XP.Hardware.RaySource"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="200"
|
||||
d:DesignHeight="140"
|
||||
d:DesignWidth="300"
|
||||
mc:Ignorable="d">
|
||||
<Grid Background="#FFFFFF">
|
||||
<Grid Background="#F5F5F5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" Background="#F0F0F0" BorderBrush="#DDDDDD" BorderThickness="0,0,0,1">
|
||||
<TextBlock Margin="8,4" HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
FontWeight="SemiBold" Foreground="#333333" Text="射线源" />
|
||||
|
||||
<!-- 顶部: 标签页 + 状态指示 -->
|
||||
<Grid Grid.Row="0" Background="#E0E0E0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- 标签页 -->
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||
<RadioButton Content="X-Ray" GroupName="RaySourceTab" IsChecked="True"
|
||||
Margin="2,2,0,0" Padding="6,3" Background="White"
|
||||
BorderBrush="#AAAAAA" BorderThickness="1,1,1,0" />
|
||||
<RadioButton Content="Microfocus" GroupName="RaySourceTab"
|
||||
Margin="2,2,0,0" Padding="6,3" Background="#E8E8E8"
|
||||
BorderBrush="#AAAAAA" BorderThickness="1,1,1,0" />
|
||||
<TextBlock Text="▪" Margin="4,4,2,0" VerticalAlignment="Center" />
|
||||
<RadioButton Content="TXI" GroupName="RaySourceTab"
|
||||
Margin="0,2,0,0" Padding="6,3" Background="#E8E8E8"
|
||||
BorderBrush="#AAAAAA" BorderThickness="1,1,1,0" />
|
||||
</StackPanel>
|
||||
<!-- X-Ray ON 状态 -->
|
||||
<Border Grid.Column="1" Background="#4CAF50" CornerRadius="2"
|
||||
Margin="8,3,8,3" Padding="8,2" HorizontalAlignment="Center">
|
||||
<TextBlock Text="X-Ray ON" Foreground="White" FontWeight="SemiBold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- 中间: Voltage / Power + ON/OFF -->
|
||||
<Border Grid.Row="1" Background="#F0F0F0" BorderBrush="#CCCCCC" BorderThickness="0,1,0,1"
|
||||
Padding="8,6">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Voltage / Power 参数 -->
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="60" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Voltage" VerticalAlignment="Center"
|
||||
Margin="0,0,6,2" FontStyle="Italic" Foreground="#555555" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="100" TextAlignment="Right"
|
||||
Margin="0,0,4,2" Padding="2" VerticalContentAlignment="Center" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="kV" VerticalAlignment="Center"
|
||||
Margin="0,0,0,2" Foreground="#555555" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Power" VerticalAlignment="Center"
|
||||
Margin="0,0,6,0" FontStyle="Italic" Foreground="#555555" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="1.30" TextAlignment="Right"
|
||||
Margin="0,0,4,0" Padding="2" VerticalContentAlignment="Center" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="W" VerticalAlignment="Center"
|
||||
Foreground="#555555" />
|
||||
</Grid>
|
||||
|
||||
<!-- ON / OFF 按钮 -->
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center"
|
||||
Margin="10,0,0,0">
|
||||
<Button Content="ON" Width="50" Height="30" Margin="0,0,4,0"
|
||||
FontWeight="Bold" FontSize="13" />
|
||||
<Button Content="OFF" Width="50" Height="30"
|
||||
FontWeight="Bold" FontSize="13" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- 底部: Manipulation 标题栏 -->
|
||||
<Border Grid.Row="2" Background="#C0C0C0" BorderBrush="#AAAAAA" BorderThickness="0,0,0,1">
|
||||
<StackPanel Orientation="Horizontal" Margin="6,3">
|
||||
<TextBlock Text="Manipulation" FontWeight="SemiBold" Foreground="#333333"
|
||||
VerticalAlignment="Center" />
|
||||
<TextBlock Text="⚙" Margin="6,0,0,0" VerticalAlignment="Center"
|
||||
Foreground="#666666" FontSize="12" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<!-- TODO: 暂时屏蔽,待 DI 容器解析问题修复后恢复 -->
|
||||
<!-- <rayViews:RaySourceOperateView /> -->
|
||||
<TextBlock Text="射线源控件(待集成)" Margin="8" Foreground="#999999" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,42 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Media;
|
||||
using Telerik.Windows.Controls;
|
||||
using XplorePlane.ViewModels;
|
||||
|
||||
namespace XplorePlane.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// MainWindowB.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MainWindowB : RadRibbonWindow
|
||||
{
|
||||
public MainWindowB(MainViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
}
|
||||
|
||||
private void OnMotionTabClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MotionPanel.Visibility = Visibility.Visible;
|
||||
DetectorPanel.Visibility = Visibility.Collapsed;
|
||||
|
||||
BtnMotion.IsChecked = true;
|
||||
BtnMotion.Background = new SolidColorBrush(Color.FromRgb(0xF0, 0xA0, 0x30));
|
||||
BtnDetector.IsChecked = false;
|
||||
BtnDetector.Background = Brushes.Transparent;
|
||||
}
|
||||
|
||||
private void OnDetectorTabClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MotionPanel.Visibility = Visibility.Collapsed;
|
||||
DetectorPanel.Visibility = Visibility.Visible;
|
||||
|
||||
BtnDetector.IsChecked = true;
|
||||
BtnDetector.Background = new SolidColorBrush(Color.FromRgb(0xF0, 0xA0, 0x30));
|
||||
BtnMotion.IsChecked = false;
|
||||
BtnMotion.Background = Brushes.Transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user