#0047 美观界面

This commit is contained in:
zhengxuan.zhang
2026-03-26 15:24:48 +08:00
parent e67e7ec67b
commit 69af65644a
5 changed files with 48 additions and 39 deletions
+4 -1
View File
@@ -26,8 +26,11 @@ namespace XplorePlane
{
protected override void OnStartup(StartupEventArgs e)
{
// 设置 Telerik Fluent 主题
// 设置 Telerik Windows11 主题,缩小 Ribbon 整体尺寸
StyleManager.ApplicationTheme = new Windows11Theme();
//Windows11Palette.Palette.FontSize = 11;
//Windows11Palette.Palette.FontSizeS = 10;
//Windows11Palette.Palette.FontSizeL = 13;
// 强制使用中文 UI,确保 ImageProcessing 库显示中文
var zhCN = new CultureInfo("zh-CN");
@@ -6,9 +6,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
prism:ViewModelLocator.AutoWireViewModel="True"
d:DesignHeight="700"
d:DesignWidth="350"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d">
<UserControl.Resources>
@@ -106,13 +106,6 @@
Style="{StaticResource ToolbarBtn}"
ToolTip="工具箱" />
</StackPanel>
<Button
Width="50"
HorizontalAlignment="Right"
Command="{Binding OpenToolboxCommand}"
Content="工具箱"
Style="{StaticResource ToolbarBtn}"
ToolTip="打开算子工具箱" />
</Grid>
</Border>
+25 -27
View File
@@ -1,4 +1,4 @@
<telerik:RadRibbonWindow
<Window
x:Class="XplorePlane.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -44,13 +44,14 @@
Grid.ColumnSpan="3"
VerticalAlignment="Center"
ApplicationButtonVisibility="Collapsed"
ApplicationName="XplorePlane"
ApplicationName=""
BackstageClippingElement="{Binding ElementName=LayoutRoot}"
FontFamily="Microsoft YaHei"
FontSize="10"
FontFamily="Microsoft YaHei UI"
FontSize="11"
HeaderBackground="LightGray"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="ClearType">
TextOptions.TextRenderingMode="ClearType"
TitleBarVisibility="Collapsed">
<telerik:RadRibbonView.Resources>
<spreadsheet:FunctionsProvider x:Key="FunctionsProvider" />
@@ -93,13 +94,13 @@
<telerik:RadRibbonButton
telerik:ScreenTip.Title="加载CNC"
Command="{Binding OpenFileCommand}"
Size="Medium"
Size="Large"
SmallImage="/Assets/Icons/open.png"
Text="加载CNC" />
</StackPanel>
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Width="160" Header="程序">
<telerik:RadRibbonGroup Header="程序">
<!-- 安全门控 & 系统 -->
@@ -141,7 +142,7 @@
telerik:ScreenTip.Title="中心十字线"
Size="Medium"
SmallImage="/Assets/Icons/crosshair.png"
Text="十字线" />
Text="辅助线" />
<telerik:RadRibbonButton
telerik:ScreenTip.Title="白背景检测黑区域"
Size="Medium"
@@ -254,16 +255,13 @@
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup telerik:ScreenTip.Title="图像算子" Header="图像算子">
<telerik:RadRibbonDropDownButton
<telerik:RadRibbonButton
telerik:ScreenTip.Description="打开算子工具箱,拖拽算子到流水线中"
telerik:ScreenTip.Title="算子工具箱"
LargeImage="/Assets/Icons/dynamic-range.png"
Click="OpenToolboxButton_Click"
Size="Large"
Text="算子工具箱">
<telerik:RadRibbonDropDownButton.DropDownContent>
<views:OperatorToolboxView Width="280" Height="480" />
</telerik:RadRibbonDropDownButton.DropDownContent>
</telerik:RadRibbonDropDownButton>
SmallImage="/Assets/Icons/dynamic-range.png"
Text="算子工具箱" />
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Header="CNC">
@@ -341,16 +339,16 @@
Command="{Binding Path=ShowHyperlinkDialog.Command}"
Content="BGA检测"
IsEnabled="{Binding Path=ShowHyperlinkDialog.IsEnabled}"
LargeImage="/Assets/Icons/bga.png"
Size="Large" />
Size="Large"
SmallImage="/Assets/Icons/bga.png" />
<telerik:RadRibbonButton
telerik:ScreenTip.Description="Create a link in your document for quick access to webpages and files.&#13;&#13;Hyperlinks can also take you to places in your document."
telerik:ScreenTip.Title="Add a Hyperlink"
Command="{Binding Path=ShowHyperlinkDialog.Command}"
Content="孔隙检测"
IsEnabled="{Binding Path=ShowHyperlinkDialog.IsEnabled}"
LargeImage="/Assets/Icons/Pores.png"
Size="Large" />
Size="Large"
SmallImage="/Assets/Icons/Pores.png" />
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Header="扫描模式" IsEnabled="{Binding Path=LinksGroup.IsEnabled}">
@@ -363,16 +361,16 @@
Command="{Binding Path=ShowHyperlinkDialog.Command}"
Content="快速扫描"
IsEnabled="{Binding Path=ShowHyperlinkDialog.IsEnabled}"
LargeImage="/Assets/Icons/quick-scan.png"
Size="Large" />
Size="Large"
SmallImage="/Assets/Icons/quick-scan.png" />
<telerik:RadRibbonButton
telerik:ScreenTip.Description="Create a link in your document for quick access to webpages and files.&#13;&#13;Hyperlinks can also take you to places in your document."
telerik:ScreenTip.Title="Add a Hyperlink"
Command="{Binding Path=ShowHyperlinkDialog.Command}"
Content="螺旋扫描"
IsEnabled="{Binding Path=ShowHyperlinkDialog.IsEnabled}"
LargeImage="/Assets/Icons/spiral.png"
Size="Large" />
Size="Large"
SmallImage="/Assets/Icons/spiral.png" />
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Header="图像处理">
@@ -381,8 +379,8 @@
</telerik:RadRibbonGroup.Variants>
<telerik:RadRibbonButton
Command="{Binding OpenPipelineEditorCommand}"
LargeImage="/Assets/Icons/workflow.png"
Size="Large"
SmallImage="/Assets/Icons/workflow.png"
Text="流水线编辑器" />
</telerik:RadRibbonGroup>
</telerik:RadRibbonTab>
@@ -392,8 +390,8 @@
<telerik:GroupVariant Priority="0" Variant="Large" />
</telerik:RadRibbonGroup.Variants>
<telerik:RadRibbonButton
LargeImage="/Assets/Icons/tools.png"
Size="Large"
SmallImage="/Assets/Icons/tools.png"
Text="关于 XplorePlane" />
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Header="帮助">
@@ -401,8 +399,8 @@
<telerik:GroupVariant Priority="0" Variant="Large" />
</telerik:RadRibbonGroup.Variants>
<telerik:RadRibbonButton
LargeImage="/Assets/Icons/message.png"
Size="Large"
SmallImage="/Assets/Icons/message.png"
Text="帮助文档" />
</telerik:RadRibbonGroup>
</telerik:RadRibbonTab>
@@ -505,4 +503,4 @@
</Grid>
</Border>
</Grid>
</telerik:RadRibbonWindow>
</Window>
+16 -1
View File
@@ -7,7 +7,7 @@ namespace XplorePlane.Views
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : RadRibbonWindow
public partial class MainWindow : Window
{
public MainWindow(MainViewModel viewModel)
{
@@ -21,5 +21,20 @@ namespace XplorePlane.Views
NavigationPanel.Visibility = show ? Visibility.Visible : Visibility.Collapsed;
NavColumn.Width = show ? new GridLength(180) : new GridLength(0);
}
private OperatorToolboxWindow _toolboxWindow;
private void OpenToolboxButton_Click(object sender, RoutedEventArgs e)
{
if (_toolboxWindow == null || !_toolboxWindow.IsLoaded)
{
_toolboxWindow = new OperatorToolboxWindow { Owner = this };
_toolboxWindow.Show();
}
else
{
_toolboxWindow.Activate();
}
}
}
}
+2 -2
View File
@@ -44,8 +44,8 @@
2026.3.26
----------------------
1、各窗体间数据流的传递,全局数据结构的设计(包括一个基本的说明文档)√
2、集成
2、将telerik 升级到 2024.1.408.310;调整界面和主题;引入 硬件层依赖 √
3、图像算子流程文件,保存文件后缀 .imw, image process workflow 缩写