#0051 调整CNC界面,增加集成硬件DLL的说明文档
This commit is contained in:
@@ -4,10 +4,8 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:cnc="clr-namespace:XplorePlane.Views.Cnc"
|
||||
Title="CNC 编辑器"
|
||||
Width="1200"
|
||||
Width="350"
|
||||
Height="750"
|
||||
MinWidth="900"
|
||||
MinHeight="550"
|
||||
ShowInTaskbar="False"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
<cnc:CncPageView />
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
|
||||
namespace XplorePlane.Views.Cnc
|
||||
{
|
||||
@@ -7,6 +10,12 @@ namespace XplorePlane.Views.Cnc
|
||||
public CncEditorWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
SourceInitialized += OnSourceInitialized;
|
||||
}
|
||||
|
||||
private void OnSourceInitialized(object sender, EventArgs e)
|
||||
{
|
||||
WindowIconHelper.RemoveIcon(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- CNC 编辑器主页面视图 | CNC editor main page view -->
|
||||
<!-- CNC 编辑器主页面视图 | CNC editor main page view -->
|
||||
<UserControl
|
||||
x:Class="XplorePlane.Views.Cnc.CncPageView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
@@ -7,26 +7,26 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
d:DesignHeight="700"
|
||||
d:DesignWidth="900"
|
||||
d:DesignWidth="350"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<UserControl.Resources>
|
||||
<!-- 面板背景和边框颜色 | Panel background and border colors -->
|
||||
<!-- 面板背景和边框颜色 | Panel background and border colors -->
|
||||
<SolidColorBrush x:Key="PanelBg" Color="White" />
|
||||
<SolidColorBrush x:Key="PanelBorder" Color="#cdcbcb" />
|
||||
<SolidColorBrush x:Key="SeparatorBrush" Color="#E0E0E0" />
|
||||
<SolidColorBrush x:Key="AccentBlue" Color="#E3F0FF" />
|
||||
<FontFamily x:Key="CsdFont">Microsoft YaHei UI</FontFamily>
|
||||
|
||||
<!-- 节点列表项样式 | Node list item style -->
|
||||
<!-- 节点列表项样式 | Node list item style -->
|
||||
<Style x:Key="CncNodeItemStyle" TargetType="ListBoxItem">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
|
||||
<!-- 工具栏按钮样式 | Toolbar button style -->
|
||||
<!-- 工具栏按钮样式 | Toolbar button style -->
|
||||
<Style x:Key="ToolbarBtn" TargetType="Button">
|
||||
<Setter Property="Height" Value="28" />
|
||||
<Setter Property="Margin" Value="2,0" />
|
||||
@@ -47,13 +47,13 @@
|
||||
CornerRadius="4">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<!-- Row 0: 工具栏 | Toolbar -->
|
||||
<!-- Row 0: 工具栏 | Toolbar -->
|
||||
<RowDefinition Height="Auto" />
|
||||
<!-- Row 1: 主内容区(左侧节点列表 + 右侧参数面板)| Main content (left: node list, right: parameter panel) -->
|
||||
<!-- Row 1: 主内容区(左侧节点列表 + 右侧参数面板)| Main content (left: node list, right: parameter panel) -->
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- ═══ 工具栏:节点插入命令 + 文件操作命令 | Toolbar: node insert commands + file operation commands ═══ -->
|
||||
<!-- ═══ 工具栏:节点插入命令 + 文件操作命令 | Toolbar: node insert commands + file operation commands ═══ -->
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Padding="6,4"
|
||||
@@ -61,7 +61,7 @@
|
||||
BorderBrush="{StaticResource PanelBorder}"
|
||||
BorderThickness="0,0,0,1">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<!-- 文件操作按钮 | File operation buttons -->
|
||||
<!-- 文件操作按钮 | File operation buttons -->
|
||||
<Button
|
||||
Command="{Binding NewProgramCommand}"
|
||||
Content="新建"
|
||||
@@ -83,14 +83,14 @@
|
||||
Style="{StaticResource ToolbarBtn}"
|
||||
ToolTip="导出 CSV | Export CSV" />
|
||||
|
||||
<!-- 分隔线 | Separator -->
|
||||
<!-- 分隔线 | Separator -->
|
||||
<Rectangle
|
||||
Width="1"
|
||||
Height="20"
|
||||
Margin="4,0"
|
||||
Fill="{StaticResource SeparatorBrush}" />
|
||||
|
||||
<!-- 节点插入按钮(9 种节点类型)| Node insert buttons (9 node types) -->
|
||||
<!-- 节点插入按钮(9 种节点类型)| Node insert buttons (9 node types) -->
|
||||
<Button
|
||||
Command="{Binding InsertReferencePointCommand}"
|
||||
Content="参考点"
|
||||
@@ -139,18 +139,18 @@
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
|
||||
<!-- ═══ 主内容区:左侧节点列表 + 右侧参数面板 | Main content: left node list + right parameter panel ═══ -->
|
||||
<!-- ═══ 主内容区:左侧节点列表 + 右侧参数面板 | Main content: left node list + right parameter panel ═══ -->
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- 左侧:节点列表 | Left: node list -->
|
||||
<ColumnDefinition Width="3*" MinWidth="200" />
|
||||
<!-- 分隔线 | Splitter -->
|
||||
<!-- 左侧:节点列表 | Left: node list -->
|
||||
<ColumnDefinition Width="3*" MinWidth="150" />
|
||||
<!-- 分隔线 | Splitter -->
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<!-- 右侧:参数面板 | Right: parameter panel -->
|
||||
<ColumnDefinition Width="2*" MinWidth="200" />
|
||||
<!-- 右侧:参数面板 | Right: parameter panel -->
|
||||
<ColumnDefinition Width="2*" MinWidth="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- ── 左侧:CNC 节点列表 | Left: CNC node list ── -->
|
||||
<!-- ── 左侧:CNC 节点列表 | Left: CNC node list ── -->
|
||||
<ListBox
|
||||
x:Name="CncNodeListBox"
|
||||
Grid.Column="0"
|
||||
@@ -164,15 +164,15 @@
|
||||
<DataTemplate>
|
||||
<Grid x:Name="NodeRoot" MinHeight="40">
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- 图标列 | Icon column -->
|
||||
<!-- 图标列 | Icon column -->
|
||||
<ColumnDefinition Width="40" />
|
||||
<!-- 名称列 | Name column -->
|
||||
<!-- 名称列 | Name column -->
|
||||
<ColumnDefinition Width="*" />
|
||||
<!-- 操作按钮列 | Action buttons column -->
|
||||
<!-- 操作按钮列 | Action buttons column -->
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 节点图标 | Node icon -->
|
||||
<!-- 节点图标 | Node icon -->
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
Width="28"
|
||||
@@ -190,7 +190,7 @@
|
||||
Stretch="Uniform" />
|
||||
</Border>
|
||||
|
||||
<!-- 节点序号和名称 | Node index and name -->
|
||||
<!-- 节点序号和名称 | Node index and name -->
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="6,0,0,0"
|
||||
@@ -209,7 +209,7 @@
|
||||
Text="{Binding Name}" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- 悬停操作按钮:上移 / 下移 / 删除 | Hover actions: MoveUp / MoveDown / Delete -->
|
||||
<!-- 悬停操作按钮:上移 / 下移 / 删除 | Hover actions: MoveUp / MoveDown / Delete -->
|
||||
<StackPanel
|
||||
x:Name="NodeActions"
|
||||
Grid.Column="2"
|
||||
@@ -258,7 +258,7 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<!-- 鼠标悬停时显示操作按钮 | Show action buttons on mouse hover -->
|
||||
<!-- 鼠标悬停时显示操作按钮 | Show action buttons on mouse hover -->
|
||||
<Trigger SourceName="NodeRoot" Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="NodeActions" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
@@ -267,13 +267,13 @@
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<!-- 垂直分隔线 | Vertical separator -->
|
||||
<!-- 垂直分隔线 | Vertical separator -->
|
||||
<Rectangle
|
||||
Grid.Column="1"
|
||||
Width="1"
|
||||
Fill="{StaticResource SeparatorBrush}" />
|
||||
|
||||
<!-- ── 右侧:参数面板(根据节点类型动态渲染)| Right: parameter panel (dynamic rendering by node type) ── -->
|
||||
<!-- ── 右侧:参数面板(根据节点类型动态渲染)| Right: parameter panel (dynamic rendering by node type) ── -->
|
||||
<ScrollViewer
|
||||
Grid.Column="2"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
@@ -285,9 +285,9 @@
|
||||
FontSize="11"
|
||||
FontWeight="Bold"
|
||||
Foreground="#555"
|
||||
Text="参数配置 | Parameters" />
|
||||
Text="参数配置" />
|
||||
|
||||
<!-- 动态参数内容区域(占位:根据 SelectedNode 类型渲染)| Dynamic parameter content area (placeholder for node-type-based rendering) -->
|
||||
<!-- 动态参数内容区域(占位:根据 SelectedNode 类型渲染)| Dynamic parameter content area (placeholder for node-type-based rendering) -->
|
||||
<ContentControl Content="{Binding SelectedNode}" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
|
||||
namespace XplorePlane.Views.Cnc
|
||||
{
|
||||
@@ -7,6 +10,12 @@ namespace XplorePlane.Views.Cnc
|
||||
public MatrixEditorWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
SourceInitialized += OnSourceInitialized;
|
||||
}
|
||||
|
||||
private void OnSourceInitialized(object sender, EventArgs e)
|
||||
{
|
||||
WindowIconHelper.RemoveIcon(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user