#0033 将图像移动到侧边工具栏

This commit is contained in:
zhengxuan.zhang
2026-03-16 17:38:13 +08:00
parent 56b28b9c9c
commit 593e770bf9
4 changed files with 60 additions and 26 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ namespace XplorePlane
protected override Window CreateShell()
{
return Container.Resolve<MainWindow>();
return Container.Resolve<MainWindowB>();
}
protected override void RegisterTypes(IContainerRegistry containerRegistry)
+23 -11
View File
@@ -1738,7 +1738,6 @@
<ColumnDefinition Width="180" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="300" />
<ColumnDefinition Width="300" />
</Grid.ColumnDefinitions>
<!-- 左侧: 计划导航 -->
@@ -1752,16 +1751,8 @@
<views:ViewportPanelView />
</Border>
<!-- 中间: 图像 -->
<Border
Grid.Column="2"
BorderBrush="#DDDDDD"
BorderThickness="0,0,1,0">
<views:ImagePanelView />
</Border>
<!-- 右侧: 属性面板 = 内容区 + 垂直图标Tab栏 -->
<Grid Grid.Column="3">
<Grid Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
@@ -1776,7 +1767,7 @@
</Grid.RowDefinitions>
<!-- 顶部: 射线源 -->
<views:RaySourcePanelView Grid.Row="0" />
<!-- 中间: 运动控制 / 探测器 通过Tab切换 -->
<!-- 中间: 运动控制 / 探测器 / 图像 通过Tab切换 -->
<views:MotionControlPanelView
x:Name="MotionPanel"
Grid.Row="1"
@@ -1785,6 +1776,10 @@
x:Name="DetectorPanel"
Grid.Row="1"
Visibility="Collapsed" />
<views:ImagePanelView
x:Name="ImagePanel"
Grid.Row="1"
Visibility="Collapsed" />
<!-- 底部: Overview -->
</Grid>
@@ -1878,6 +1873,23 @@
Foreground="#D4A017"
Text="✥" />
</ToggleButton>
<!-- 图像 -->
<ToggleButton
x:Name="BtnImage"
Width="36"
Height="36"
Background="Transparent"
BorderThickness="0"
Click="OnImageTabClick"
Cursor="Hand"
ToolTip="图像">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="White"
Text="🖼" />
</ToggleButton>
<!-- 其他工具 -->
<ToggleButton
Width="36"
+24 -13
View File
@@ -11,6 +11,8 @@ namespace XplorePlane.Views
/// </summary>
public partial class MainWindowB : RadRibbonWindow
{
private static readonly Brush ActiveBg = new SolidColorBrush(Color.FromRgb(0xF0, 0xA0, 0x30));
public MainWindowB(MainViewModel viewModel)
{
InitializeComponent();
@@ -19,24 +21,33 @@ namespace XplorePlane.Views
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;
ShowPanel(motion: true);
}
private void OnDetectorTabClick(object sender, RoutedEventArgs e)
{
MotionPanel.Visibility = Visibility.Collapsed;
DetectorPanel.Visibility = Visibility.Visible;
ShowPanel(detector: true);
}
BtnDetector.IsChecked = true;
BtnDetector.Background = new SolidColorBrush(Color.FromRgb(0xF0, 0xA0, 0x30));
BtnMotion.IsChecked = false;
BtnMotion.Background = Brushes.Transparent;
private void OnImageTabClick(object sender, RoutedEventArgs e)
{
ShowPanel(image: true);
}
private void ShowPanel(bool motion = false, bool detector = false, bool image = false)
{
MotionPanel.Visibility = motion ? Visibility.Visible : Visibility.Collapsed;
DetectorPanel.Visibility = detector ? Visibility.Visible : Visibility.Collapsed;
ImagePanel.Visibility = image ? Visibility.Visible : Visibility.Collapsed;
BtnMotion.IsChecked = motion;
BtnMotion.Background = motion ? ActiveBg : Brushes.Transparent;
BtnDetector.IsChecked = detector;
BtnDetector.Background = detector ? ActiveBg : Brushes.Transparent;
BtnImage.IsChecked = image;
BtnImage.Background = image ? ActiveBg : Brushes.Transparent;
}
}
}
+12 -1
View File
@@ -16,8 +16,19 @@
2、硬件层射线源的集成 √
3、图像层集成,包括复刻一个示例界面,优化界面布局及算子中文 √
4、浮动图像处理工具箱调研 √
5、修复图像工具箱拖拽事件,流水线列表没有生成对应的控件
5、修复图像工具箱拖拽事件,流水线列表没有生成对应的控件
2026.3.16
----------------------
1、优化图像处理窗体的页面布局,简洁清晰 √
2、新增打开图像工具箱(修复DataContext问题) √
3、对主界面B方案进行优化
TO-DO
----------------------
5、各窗体间数据流的传递,全局数据结构的设计