规范类名及命名空间名称
This commit is contained in:
+11
-11
@@ -8,7 +8,7 @@
|
||||
<add key="Serilog:RollingInterval" value="Day" />
|
||||
<add key="Serilog:FileSizeLimitMB" value="100" />
|
||||
<add key="Serilog:RetainedFileCountLimit" value="30" />
|
||||
|
||||
|
||||
<!-- 射线源配置(key 格式: RaySource:xxx,与 ConfigLoader 一致) -->
|
||||
<add key="RaySource:PlcIpAddress" value="192.168.1.100" />
|
||||
<add key="RaySource:PlcPort" value="11160" />
|
||||
@@ -23,22 +23,22 @@
|
||||
<add key="RaySource:StartUpTimeout" value="180000" />
|
||||
<add key="RaySource:StatusPollingInterval" value="500" />
|
||||
<add key="RaySource:EnableAutoStatusMonitoring" value="true" />
|
||||
|
||||
|
||||
<!-- SQLite 数据库配置 -->
|
||||
<add key="Sqlite:DbFilePath" value="Data\XP.db" />
|
||||
<add key="Sqlite:ConnectionTimeout" value="30" />
|
||||
<add key="Sqlite:CreateIfNotExists" value="true" />
|
||||
<add key="Sqlite:EnableWalMode" value="true" />
|
||||
<add key="Sqlite:EnableSqlLogging" value="false" />
|
||||
|
||||
|
||||
<!-- 探测器配置 -->
|
||||
<add key="Detector.Type" value="Varex4343"/>
|
||||
<add key="Detector.IPAddress" value="192.168.1.101"/>
|
||||
<add key="Detector.Port" value="8080"/>
|
||||
|
||||
<add key="Detector.Type" value="Varex4343" />
|
||||
<add key="Detector.IPAddress" value="192.168.1.101" />
|
||||
<add key="Detector.Port" value="8080" />
|
||||
|
||||
<!-- PLC 配置 -->
|
||||
<add key="PLC.Type" value="B&R"/>
|
||||
<add key="PLC.StationName" value="PLC_STATION"/>
|
||||
<add key="PLC.ConnectionTimeout" value="5000"/>
|
||||
<add key="PLC.Type" value="B&R" />
|
||||
<add key="PLC.StationName" value="PLC_STATION" />
|
||||
<add key="PLC.ConnectionTimeout" value="5000" />
|
||||
</appSettings>
|
||||
</configuration>
|
||||
</configuration>
|
||||
@@ -1,7 +1,6 @@
|
||||
<Application x:Class="XplorePlane.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:XplorePlane">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
||||
+24
-29
@@ -1,40 +1,35 @@
|
||||
using System;
|
||||
using Prism.DryIoc;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using Telerik.Windows.Controls;
|
||||
using XplorePlane.Views;
|
||||
using XplorePlane.ViewModels;
|
||||
using XP.Camera;
|
||||
using XP.Common.Database.Implementations;
|
||||
using XP.Common.Database.Interfaces;
|
||||
using XP.Common.Dump.Configs;
|
||||
using XP.Common.Dump.Implementations;
|
||||
using XP.Common.Dump.Interfaces;
|
||||
using XP.Common.Localization.Configs;
|
||||
using XP.Common.Localization.Extensions;
|
||||
using XP.Common.Localization.Implementations;
|
||||
using XP.Common.Localization.Interfaces;
|
||||
using XP.Hardware.RaySource.Services;
|
||||
using XplorePlane.Services;
|
||||
using XplorePlane.Services.AppState;
|
||||
using XplorePlane.Services.Camera;
|
||||
using XplorePlane.Services.Cnc;
|
||||
using XplorePlane.Services.Matrix;
|
||||
using XplorePlane.Services.Measurement;
|
||||
using XplorePlane.Services.Recipe;
|
||||
using XplorePlane.Services.Camera;
|
||||
using XplorePlane.ViewModels;
|
||||
using XplorePlane.ViewModels.Cnc;
|
||||
using XplorePlane.Views;
|
||||
using XplorePlane.Views.Cnc;
|
||||
using XP.Camera;
|
||||
using Prism.Ioc;
|
||||
using Prism.DryIoc;
|
||||
using Prism.Modularity;
|
||||
using Serilog;
|
||||
using XP.Common.Module;
|
||||
using XP.Common.Configs;
|
||||
using XP.Common.Database.Interfaces;
|
||||
using XP.Common.Database.Implementations;
|
||||
using XP.Common.Localization.Configs;
|
||||
using XP.Common.Localization.Implementations;
|
||||
using XP.Common.Localization.Interfaces;
|
||||
using XP.Common.Localization.Extensions;
|
||||
using XP.Common.Dump.Configs;
|
||||
using XP.Common.Dump.Implementations;
|
||||
using XP.Common.Dump.Interfaces;
|
||||
using XP.Hardware.RaySource.Module;
|
||||
using XP.Hardware.RaySource.Services;
|
||||
using XP.Hardware.RaySource.Abstractions;
|
||||
using XP.Hardware.RaySource.Factories;
|
||||
|
||||
namespace XplorePlane
|
||||
{
|
||||
@@ -53,9 +48,9 @@ namespace XplorePlane
|
||||
|
||||
// 强制使用中文 UI,确保 ImageProcessing 库显示中文
|
||||
var zhCN = new CultureInfo("zh-CN");
|
||||
Thread.CurrentThread.CurrentCulture = zhCN;
|
||||
Thread.CurrentThread.CurrentCulture = zhCN;
|
||||
Thread.CurrentThread.CurrentUICulture = zhCN;
|
||||
CultureInfo.DefaultThreadCurrentCulture = zhCN;
|
||||
CultureInfo.DefaultThreadCurrentCulture = zhCN;
|
||||
CultureInfo.DefaultThreadCurrentUICulture = zhCN;
|
||||
|
||||
// 配置 Serilog 日志系统
|
||||
@@ -100,11 +95,11 @@ namespace XplorePlane
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.MinimumLevel.Debug()
|
||||
.WriteTo.Console()
|
||||
.WriteTo.File("logs/xploreplane-.log",
|
||||
.WriteTo.File("logs/xploreplane-.log",
|
||||
rollingInterval: RollingInterval.Day,
|
||||
retainedFileCountLimit: 30)
|
||||
.CreateLogger();
|
||||
|
||||
|
||||
Log.Information("========================================");
|
||||
Log.Information("XplorePlane 应用程序启动");
|
||||
Log.Information("========================================");
|
||||
@@ -323,4 +318,4 @@ namespace XplorePlane
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,4 +12,4 @@ namespace XplorePlane.Events
|
||||
|
||||
/// <summary>CNC 程序变更载荷 | CNC program changed payload</summary>
|
||||
public record CncProgramChangedPayload(string ProgramName, bool IsModified);
|
||||
}
|
||||
}
|
||||
@@ -19,4 +19,4 @@ namespace XplorePlane.Events
|
||||
int CompletedCells,
|
||||
MatrixCellStatus Status
|
||||
);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"Language": "zh-CN",
|
||||
"LogLevel": "Debug"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,106 +0,0 @@
|
||||
"\n"
|
||||
"General configuration for OpenCV 4.9.0 =====================================\n"
|
||||
" Version control: 4.9.0-265-g79534d600a\n"
|
||||
"\n"
|
||||
" Extra modules:\n"
|
||||
" Location (extra): G:/bb/cv_x64/build/build_x86_64/../opencv_contrib/modules\n"
|
||||
" Version control (extra): 4.9.0-66-g61e23082\n"
|
||||
"\n"
|
||||
" Platform:\n"
|
||||
" Timestamp: 2024-04-27T12:51:52Z\n"
|
||||
" Host: Windows 10.0.22000 AMD64\n"
|
||||
" CMake: 3.23.0\n"
|
||||
" CMake generator: Visual Studio 17 2022\n"
|
||||
" CMake build tool: C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe\n"
|
||||
" MSVC: 1939\n"
|
||||
" Configuration: Debug Release MinSizeRel RelWithDebInfo\n"
|
||||
"\n"
|
||||
" CPU/HW features:\n"
|
||||
" Baseline: SSE SSE2 SSE3\n"
|
||||
" requested: SSE3\n"
|
||||
"\n"
|
||||
" C/C++:\n"
|
||||
" Built as dynamic libs?: NO\n"
|
||||
" C++ standard: 11\n"
|
||||
" C++ Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe (ver 19.39.33523.0)\n"
|
||||
" C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /MD /O2 /Ob2 /DNDEBUG \n"
|
||||
" C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /MDd /Zi /Ob0 /Od /RTC1 \n"
|
||||
" C Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe\n"
|
||||
" C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /MP /MD /O2 /Ob2 /DNDEBUG \n"
|
||||
" C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /MP /MDd /Zi /Ob0 /Od /RTC1 \n"
|
||||
" Linker flags (Release): /machine:x64 /INCREMENTAL:NO \n"
|
||||
" Linker flags (Debug): /machine:x64 /debug /INCREMENTAL \n"
|
||||
" ccache: NO\n"
|
||||
" Precompiled headers: YES\n"
|
||||
" Extra dependencies: wsock32 comctl32 gdi32 ole32 setupapi ws2_32 G:/bb/cv_x64/build/build_x86_64/install/lib/freetype.lib G:/bb/cv_x64/build/build_x86_64/install/lib/harfbuzz.lib G:/bb/cv_x64/build/build_x86_64/install/lib/libhdf5.lib\n"
|
||||
" 3rdparty dependencies: libprotobuf ade ittnotify libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf zlib\n"
|
||||
"\n"
|
||||
" OpenCV modules:\n"
|
||||
" To be built: alphamat aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto\n"
|
||||
" Disabled: java python_bindings_generator python_tests world\n"
|
||||
" Disabled by dependency: -\n"
|
||||
" Unavailable: cannops cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv julia matlab ovis python2 python3 sfm viz\n"
|
||||
" Applications: perf_tests\n"
|
||||
" Documentation: NO\n"
|
||||
" Non-free algorithms: NO\n"
|
||||
"\n"
|
||||
" Windows RT support: NO\n"
|
||||
"\n"
|
||||
" GUI: WIN32UI\n"
|
||||
" Win32 UI: YES\n"
|
||||
" VTK support: NO\n"
|
||||
"\n"
|
||||
" Media I/O: \n"
|
||||
" ZLib: build (ver 1.3)\n"
|
||||
" JPEG: build-libjpeg-turbo (ver 2.1.3-62)\n"
|
||||
" SIMD Support Request: YES\n"
|
||||
" SIMD Support: NO\n"
|
||||
" WEBP: build (ver encoder: 0x020f)\n"
|
||||
" PNG: build (ver 1.6.37)\n"
|
||||
" TIFF: build (ver 42 - 4.2.0)\n"
|
||||
" JPEG 2000: build (ver 2.5.0)\n"
|
||||
" OpenEXR: build (ver 2.3.0)\n"
|
||||
" HDR: YES\n"
|
||||
" SUNRASTER: YES\n"
|
||||
" PXM: YES\n"
|
||||
" PFM: YES\n"
|
||||
"\n"
|
||||
" Video I/O:\n"
|
||||
" DC1394: NO\n"
|
||||
" FFMPEG: YES (prebuilt binaries)\n"
|
||||
" avcodec: YES (58.134.100)\n"
|
||||
" avformat: YES (58.76.100)\n"
|
||||
" avutil: YES (56.70.100)\n"
|
||||
" swscale: YES (5.9.100)\n"
|
||||
" avresample: YES (4.0.0)\n"
|
||||
" GStreamer: NO\n"
|
||||
" DirectShow: YES\n"
|
||||
" Media Foundation: YES\n"
|
||||
" DXVA: YES\n"
|
||||
"\n"
|
||||
" Parallel framework: Concurrency\n"
|
||||
"\n"
|
||||
" Trace: YES (with Intel ITT)\n"
|
||||
"\n"
|
||||
" Other third-party libraries:\n"
|
||||
" Eigen: YES (ver 3.4.0)\n"
|
||||
" Custom HAL: NO\n"
|
||||
" Protobuf: build (3.19.1)\n"
|
||||
" Flatbuffers: builtin/3rdparty (23.5.9)\n"
|
||||
"\n"
|
||||
" OpenCL: YES (NVD3D11)\n"
|
||||
" Include path: G:/bb/cv_x64/build/opencv/3rdparty/include/opencl/1.2\n"
|
||||
" Link libraries: Dynamic load\n"
|
||||
"\n"
|
||||
" Python (for build): C:/python-virt/python37/python.exe\n"
|
||||
"\n"
|
||||
" Java: \n"
|
||||
" ant: NO\n"
|
||||
" Java: YES (ver 1.8.0.202)\n"
|
||||
" JNI: C:/Program Files/Microsoft/jdk-11.0.16.101-hotspot/include C:/Program Files/Microsoft/jdk-11.0.16.101-hotspot/include/win32 C:/Program Files/Microsoft/jdk-11.0.16.101-hotspot/include\n"
|
||||
" Java wrappers: NO\n"
|
||||
" Java tests: NO\n"
|
||||
"\n"
|
||||
" Install to: G:/bb/cv_x64/build/build_x86_64/install\n"
|
||||
"-----------------------------------------------------------------\n"
|
||||
"\n"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -113,4 +113,4 @@ namespace XplorePlane.Models
|
||||
DateTime UpdatedAt,
|
||||
IReadOnlyList<CncNode> Nodes
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -42,4 +42,4 @@ namespace XplorePlane.Models
|
||||
string CncProgramPath,
|
||||
IReadOnlyList<MatrixCell> Cells
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -22,4 +22,4 @@ namespace XplorePlane.Models
|
||||
int FailCount,
|
||||
double PassRate
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ namespace XplorePlane.Models
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private string _name;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
@@ -19,6 +20,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private ObservableCollection<object> _children;
|
||||
|
||||
public ObservableCollection<object> Children
|
||||
{
|
||||
get => _children;
|
||||
@@ -40,6 +42,7 @@ namespace XplorePlane.Models
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private string _name;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
@@ -47,6 +50,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private string _iconColor;
|
||||
|
||||
public string IconColor
|
||||
{
|
||||
get => _iconColor;
|
||||
@@ -54,6 +58,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private bool _isSelected;
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get => _isSelected;
|
||||
@@ -77,6 +82,7 @@ namespace XplorePlane.Models
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private string _featureName;
|
||||
|
||||
public string FeatureName
|
||||
{
|
||||
get => _featureName;
|
||||
@@ -84,6 +90,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _x;
|
||||
|
||||
public double X
|
||||
{
|
||||
get => _x;
|
||||
@@ -91,6 +98,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _y;
|
||||
|
||||
public double Y
|
||||
{
|
||||
get => _y;
|
||||
@@ -98,6 +106,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private ObservableCollection<CalloutRowVM> _rows;
|
||||
|
||||
public ObservableCollection<CalloutRowVM> Rows
|
||||
{
|
||||
get => _rows;
|
||||
@@ -121,6 +130,7 @@ namespace XplorePlane.Models
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private string _label;
|
||||
|
||||
public string Label
|
||||
{
|
||||
get => _label;
|
||||
@@ -128,6 +138,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private string _nominal;
|
||||
|
||||
public string Nominal
|
||||
{
|
||||
get => _nominal;
|
||||
@@ -135,6 +146,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private string _measured;
|
||||
|
||||
public string Measured
|
||||
{
|
||||
get => _measured;
|
||||
@@ -142,6 +154,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private string _tolerance;
|
||||
|
||||
public string Tolerance
|
||||
{
|
||||
get => _tolerance;
|
||||
@@ -149,6 +162,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private string _deviation;
|
||||
|
||||
public string Deviation
|
||||
{
|
||||
get => _deviation;
|
||||
@@ -156,6 +170,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private bool _isPass;
|
||||
|
||||
public bool IsPass
|
||||
{
|
||||
get => _isPass;
|
||||
@@ -182,6 +197,7 @@ namespace XplorePlane.Models
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private string _name;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
@@ -189,6 +205,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private string _datumLabel;
|
||||
|
||||
public string DatumLabel
|
||||
{
|
||||
get => _datumLabel;
|
||||
@@ -196,6 +213,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _x;
|
||||
|
||||
public double X
|
||||
{
|
||||
get => _x;
|
||||
@@ -203,6 +221,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _y;
|
||||
|
||||
public double Y
|
||||
{
|
||||
get => _y;
|
||||
@@ -210,6 +229,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _z;
|
||||
|
||||
public double Z
|
||||
{
|
||||
get => _z;
|
||||
@@ -217,6 +237,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _nrX;
|
||||
|
||||
public double NrX
|
||||
{
|
||||
get => _nrX;
|
||||
@@ -224,6 +245,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _nrY;
|
||||
|
||||
public double NrY
|
||||
{
|
||||
get => _nrY;
|
||||
@@ -231,6 +253,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _nrZ;
|
||||
|
||||
public double NrZ
|
||||
{
|
||||
get => _nrZ;
|
||||
@@ -238,6 +261,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _height;
|
||||
|
||||
public double Height
|
||||
{
|
||||
get => _height;
|
||||
@@ -245,6 +269,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _radius;
|
||||
|
||||
public double Radius
|
||||
{
|
||||
get => _radius;
|
||||
@@ -252,6 +277,7 @@ namespace XplorePlane.Models
|
||||
}
|
||||
|
||||
private double _diameter;
|
||||
|
||||
public double Diameter
|
||||
{
|
||||
get => _diameter;
|
||||
@@ -284,4 +310,4 @@ namespace XplorePlane.Models
|
||||
|
||||
public void Execute(object parameter) => _execute(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,4 +27,4 @@ namespace XplorePlane.Models
|
||||
public int OldIndex { get; set; }
|
||||
public int NewIndex { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,4 +41,4 @@ namespace XplorePlane.Models
|
||||
{
|
||||
public static readonly RecipeExecutionState Default = new(0, 0, RecipeExecutionStatus.Idle, string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,4 +117,4 @@ namespace XplorePlane.Models
|
||||
{
|
||||
public static readonly LinkedViewState Default = new(new PhysicalPosition(0, 0, 0), false, DateTime.MinValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using Prism.Mvvm;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XP.Hardware.RaySource.Services;
|
||||
using XplorePlane.Models;
|
||||
@@ -23,6 +23,7 @@ namespace XplorePlane.Services.AppState
|
||||
|
||||
// ── 状态字段(通过 Interlocked.Exchange 原子替换)──
|
||||
private MotionState _motionState = MotionState.Default;
|
||||
|
||||
private RaySourceState _raySourceState = RaySourceState.Default;
|
||||
private DetectorState _detectorState = DetectorState.Default;
|
||||
private SystemState _systemState = SystemState.Default;
|
||||
@@ -33,16 +34,24 @@ namespace XplorePlane.Services.AppState
|
||||
|
||||
// ── 类型化状态变更事件 ──
|
||||
public event EventHandler<StateChangedEventArgs<MotionState>> MotionStateChanged;
|
||||
|
||||
public event EventHandler<StateChangedEventArgs<RaySourceState>> RaySourceStateChanged;
|
||||
|
||||
public event EventHandler<StateChangedEventArgs<DetectorState>> DetectorStateChanged;
|
||||
|
||||
public event EventHandler<StateChangedEventArgs<SystemState>> SystemStateChanged;
|
||||
|
||||
public event EventHandler<StateChangedEventArgs<CameraState>> CameraStateChanged;
|
||||
|
||||
public event EventHandler<StateChangedEventArgs<LinkedViewState>> LinkedViewStateChanged;
|
||||
|
||||
public event EventHandler<StateChangedEventArgs<RecipeExecutionState>> RecipeExecutionStateChanged;
|
||||
|
||||
public event EventHandler<LinkedViewRequestEventArgs> LinkedViewRequested;
|
||||
|
||||
// ── 状态属性(只读)──
|
||||
public MotionState MotionState => _motionState;
|
||||
|
||||
public RaySourceState RaySourceState => _raySourceState;
|
||||
public DetectorState DetectorState => _detectorState;
|
||||
public SystemState SystemState => _systemState;
|
||||
@@ -226,4 +235,4 @@ namespace XplorePlane.Services.AppState
|
||||
_logger.Info("AppStateService 已释放");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,12 +24,19 @@ namespace XplorePlane.Services.AppState
|
||||
// ── 状态更新方法(线程安全,可从任意线程调用)──
|
||||
|
||||
void UpdateMotionState(MotionState newState);
|
||||
|
||||
void UpdateRaySourceState(RaySourceState newState);
|
||||
|
||||
void UpdateDetectorState(DetectorState newState);
|
||||
|
||||
void UpdateSystemState(SystemState newState);
|
||||
|
||||
void UpdateCameraState(CameraState newState);
|
||||
|
||||
void UpdateCalibrationMatrix(CalibrationMatrix newMatrix);
|
||||
|
||||
void UpdateLinkedViewState(LinkedViewState newState);
|
||||
|
||||
void UpdateRecipeExecutionState(RecipeExecutionState newState);
|
||||
|
||||
// ── 画面联动 ──
|
||||
@@ -40,15 +47,21 @@ namespace XplorePlane.Services.AppState
|
||||
// ── 类型化状态变更事件 ──
|
||||
|
||||
event EventHandler<StateChangedEventArgs<MotionState>> MotionStateChanged;
|
||||
|
||||
event EventHandler<StateChangedEventArgs<RaySourceState>> RaySourceStateChanged;
|
||||
|
||||
event EventHandler<StateChangedEventArgs<DetectorState>> DetectorStateChanged;
|
||||
|
||||
event EventHandler<StateChangedEventArgs<SystemState>> SystemStateChanged;
|
||||
|
||||
event EventHandler<StateChangedEventArgs<CameraState>> CameraStateChanged;
|
||||
|
||||
event EventHandler<StateChangedEventArgs<LinkedViewState>> LinkedViewStateChanged;
|
||||
|
||||
event EventHandler<StateChangedEventArgs<RecipeExecutionState>> RecipeExecutionStateChanged;
|
||||
|
||||
// ── 画面联动请求事件 ──
|
||||
|
||||
event EventHandler<LinkedViewRequestEventArgs> LinkedViewRequested;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,4 +29,4 @@ namespace XplorePlane.Services.AppState
|
||||
TargetZ = targetZ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ namespace XplorePlane.Services.Camera
|
||||
public bool IsLiveView => _liveViewRunning;
|
||||
|
||||
public event EventHandler<BitmapSource> FrameArrived;
|
||||
|
||||
public event EventHandler ConnectionLost;
|
||||
|
||||
public CameraService(
|
||||
@@ -109,14 +110,23 @@ namespace XplorePlane.Services.Camera
|
||||
// ── 参数读写(直接委托给 controller)──
|
||||
|
||||
public double GetExposureTime() => _controller.GetExposureTime();
|
||||
|
||||
public void SetExposureTime(double microseconds) => _controller.SetExposureTime(microseconds);
|
||||
|
||||
public double GetGain() => _controller.GetGain();
|
||||
|
||||
public void SetGain(double value) => _controller.SetGain(value);
|
||||
|
||||
public int GetWidth() => _controller.GetWidth();
|
||||
|
||||
public void SetWidth(int value) => _controller.SetWidth(value);
|
||||
|
||||
public int GetHeight() => _controller.GetHeight();
|
||||
|
||||
public void SetHeight(int value) => _controller.SetHeight(value);
|
||||
|
||||
public string GetPixelFormat() => _controller.GetPixelFormat();
|
||||
|
||||
public void SetPixelFormat(string format) => _controller.SetPixelFormat(format);
|
||||
|
||||
// ── 事件处理 ──
|
||||
@@ -191,4 +201,4 @@ namespace XplorePlane.Services.Camera
|
||||
_logger.Info("CameraService 已释放");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,14 +36,23 @@ namespace XplorePlane.Services.Camera
|
||||
|
||||
// ── 参数读写 ──
|
||||
double GetExposureTime();
|
||||
|
||||
void SetExposureTime(double microseconds);
|
||||
|
||||
double GetGain();
|
||||
|
||||
void SetGain(double value);
|
||||
|
||||
int GetWidth();
|
||||
|
||||
void SetWidth(int value);
|
||||
|
||||
int GetHeight();
|
||||
|
||||
void SetHeight(int value);
|
||||
|
||||
string GetPixelFormat();
|
||||
|
||||
void SetPixelFormat(string format);
|
||||
|
||||
/// <summary>最新一帧图像(已 Freeze,可跨线程)。</summary>
|
||||
@@ -52,4 +61,4 @@ namespace XplorePlane.Services.Camera
|
||||
/// <summary>相机连接断开事件。</summary>
|
||||
event EventHandler ConnectionLost;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -383,4 +383,4 @@ namespace XplorePlane.Services.Cnc
|
||||
MotionState: _appStateService.MotionState);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,4 +36,4 @@ namespace XplorePlane.Services.Cnc
|
||||
/// <summary>从 JSON 字符串反序列化 CNC 程序 | Deserialize CNC program from JSON string</summary>
|
||||
CncProgram Deserialize(string json);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,16 +3,20 @@ using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
using ImageProcessing.Core;
|
||||
using XP.ImageProcessing.Core;
|
||||
|
||||
namespace XplorePlane.Services
|
||||
{
|
||||
public interface IImageProcessingService : IDisposable
|
||||
{
|
||||
IReadOnlyList<string> GetAvailableProcessors();
|
||||
|
||||
IReadOnlyList<ProcessorParameter> GetProcessorParameters(string processorName);
|
||||
|
||||
ImageProcessorBase GetProcessor(string processorName);
|
||||
|
||||
string GetProcessorDisplayName(string processorName);
|
||||
|
||||
void RegisterProcessor(string name, ImageProcessorBase processor);
|
||||
|
||||
Task<BitmapSource> ProcessImageAsync(
|
||||
@@ -21,6 +25,5 @@ namespace XplorePlane.Services
|
||||
IDictionary<string, object> parameters,
|
||||
IProgress<double> progress = null,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Emgu.CV;
|
||||
using Emgu.CV.Structure;
|
||||
using System;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace XplorePlane.Services
|
||||
{
|
||||
@@ -57,6 +55,5 @@ namespace XplorePlane.Services
|
||||
|
||||
return BitmapSource.Create(width, height, 96, 96, PixelFormats.Gray8, null, pixels, stride);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,12 @@ namespace XplorePlane.Services
|
||||
{
|
||||
public class ImageProcessingException : Exception
|
||||
{
|
||||
public ImageProcessingException(string message) : base(message) { }
|
||||
public ImageProcessingException(string message, Exception innerException) : base(message, innerException) { }
|
||||
public ImageProcessingException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public ImageProcessingException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,9 @@ using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Emgu.CV;
|
||||
using Emgu.CV.Structure;
|
||||
using ImageProcessing.Core;
|
||||
using ImageProcessing.Processors;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XP.ImageProcessing.Core;
|
||||
using XP.ImageProcessing.Processors;
|
||||
|
||||
namespace XplorePlane.Services
|
||||
{
|
||||
@@ -134,7 +132,6 @@ namespace XplorePlane.Services
|
||||
disposable.Dispose();
|
||||
}
|
||||
_processorRegistry.Clear();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using Serilog;
|
||||
using System;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
|
||||
namespace XplorePlane.Services
|
||||
@@ -136,4 +136,4 @@ namespace XplorePlane.Services
|
||||
GetLogger().Fatal(exception, messageTemplate, propertyValues);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,4 +36,4 @@ namespace XplorePlane.Services.Matrix
|
||||
/// <summary>从 JSON 字符串反序列化矩阵布局 | Deserialize matrix layout from JSON string</summary>
|
||||
MatrixLayout Deserialize(string json);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,4 +277,4 @@ namespace XplorePlane.Services.Matrix
|
||||
$"列索引超出范围 | Column index out of range: {column}, Columns={layout.Columns}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,4 +23,4 @@ namespace XplorePlane.Services.Measurement
|
||||
/// <summary>按配方名称和时间范围获取统计数据 | Get statistics by recipe name and time range</summary>
|
||||
Task<MeasurementStatistics> GetStatisticsAsync(string recipeName, DateTime? from, DateTime? to);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,11 +74,11 @@ VALUES (@recipe_name, @step_index, @timestamp, @result_value, @is_pass)";
|
||||
|
||||
var parameters = new Dictionary<string, object>
|
||||
{
|
||||
["@recipe_name"] = record.RecipeName,
|
||||
["@step_index"] = record.StepIndex,
|
||||
["@timestamp"] = record.Timestamp.ToString("o"), // ISO 8601 往返格式 | ISO 8601 round-trip format
|
||||
["@recipe_name"] = record.RecipeName,
|
||||
["@step_index"] = record.StepIndex,
|
||||
["@timestamp"] = record.Timestamp.ToString("o"), // ISO 8601 往返格式 | ISO 8601 round-trip format
|
||||
["@result_value"] = record.ResultValue,
|
||||
["@is_pass"] = record.IsPass ? 1 : 0
|
||||
["@is_pass"] = record.IsPass ? 1 : 0
|
||||
};
|
||||
|
||||
var result = await _db.ExecuteNonQueryAsync(InsertSql, parameters).ConfigureAwait(false);
|
||||
@@ -147,8 +147,8 @@ VALUES (@recipe_name, @step_index, @timestamp, @result_value, @is_pass)";
|
||||
|
||||
var row = data[0];
|
||||
int total = row.total_count;
|
||||
int pass = row.pass_count;
|
||||
int fail = total - pass;
|
||||
int pass = row.pass_count;
|
||||
int fail = total - pass;
|
||||
double passRate = total > 0 ? (double)pass / total : 0.0;
|
||||
|
||||
_logger.Debug("统计结果 | Statistics: Total={Total}, Pass={Pass}, Fail={Fail}, PassRate={PassRate:P2}",
|
||||
@@ -220,12 +220,12 @@ VALUES (@recipe_name, @step_index, @timestamp, @result_value, @is_pass)";
|
||||
{
|
||||
return new MeasurementRecord
|
||||
{
|
||||
Id = row.id,
|
||||
RecipeName = row.recipe_name,
|
||||
StepIndex = row.step_index,
|
||||
Timestamp = DateTime.Parse(row.timestamp, null, System.Globalization.DateTimeStyles.RoundtripKind),
|
||||
Id = row.id,
|
||||
RecipeName = row.recipe_name,
|
||||
StepIndex = row.step_index,
|
||||
Timestamp = DateTime.Parse(row.timestamp, null, System.Globalization.DateTimeStyles.RoundtripKind),
|
||||
ResultValue = row.result_value,
|
||||
IsPass = row.is_pass != 0
|
||||
IsPass = row.is_pass != 0
|
||||
};
|
||||
}
|
||||
|
||||
@@ -249,4 +249,4 @@ VALUES (@recipe_name, @step_index, @timestamp, @result_value, @is_pass)";
|
||||
public int pass_count { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,4 +17,4 @@ namespace XplorePlane.Services
|
||||
IProgress<PipelineProgress> progress = null,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,9 @@ namespace XplorePlane.Services
|
||||
public interface IPipelinePersistenceService
|
||||
{
|
||||
Task SaveAsync(PipelineModel pipeline, string filePath);
|
||||
|
||||
Task<PipelineModel> LoadAsync(string filePath);
|
||||
|
||||
Task<IReadOnlyList<PipelineModel>> LoadAllAsync(string directory);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,4 +21,4 @@ namespace XplorePlane.Services
|
||||
FailedOperatorKey = failedOperatorKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,4 +98,4 @@ namespace XplorePlane.Services
|
||||
return scaled;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,4 +108,4 @@ namespace XplorePlane.Services
|
||||
throw new UnauthorizedAccessException($"不允许路径遍历:{directory}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,4 +28,4 @@ namespace XplorePlane.Services.Recipe
|
||||
/// <summary>恢复已暂停的配方执行</summary>
|
||||
void Resume();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,4 +277,4 @@ namespace XplorePlane.Services.Recipe
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
using Microsoft.Win32;
|
||||
using Prism.Commands;
|
||||
using Prism.Events;
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
@@ -5,10 +9,6 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Win32;
|
||||
using Prism.Commands;
|
||||
using Prism.Events;
|
||||
using Prism.Mvvm;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XplorePlane.Events;
|
||||
using XplorePlane.Models;
|
||||
@@ -466,4 +466,4 @@ namespace XplorePlane.ViewModels.Cnc
|
||||
.Publish(new CncProgramChangedPayload(ProgramName ?? string.Empty, IsModified));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,17 +73,17 @@ namespace XplorePlane.ViewModels.Cnc
|
||||
{
|
||||
return nodeType switch
|
||||
{
|
||||
CncNodeType.ReferencePoint => "/Resources/Icons/cnc_reference_point.png",
|
||||
CncNodeType.ReferencePoint => "/Resources/Icons/cnc_reference_point.png",
|
||||
CncNodeType.SaveNodeWithImage => "/Resources/Icons/cnc_save_with_image.png",
|
||||
CncNodeType.SaveNode => "/Resources/Icons/cnc_save_node.png",
|
||||
CncNodeType.SavePosition => "/Resources/Icons/cnc_save_position.png",
|
||||
CncNodeType.InspectionModule => "/Resources/Icons/cnc_inspection_module.png",
|
||||
CncNodeType.InspectionMarker => "/Resources/Icons/cnc_inspection_marker.png",
|
||||
CncNodeType.PauseDialog => "/Resources/Icons/cnc_pause_dialog.png",
|
||||
CncNodeType.WaitDelay => "/Resources/Icons/cnc_wait_delay.png",
|
||||
CncNodeType.CompleteProgram => "/Resources/Icons/cnc_complete_program.png",
|
||||
_ => "/Resources/Icons/cnc_default.png",
|
||||
CncNodeType.SaveNode => "/Resources/Icons/cnc_save_node.png",
|
||||
CncNodeType.SavePosition => "/Resources/Icons/cnc_save_position.png",
|
||||
CncNodeType.InspectionModule => "/Resources/Icons/cnc_inspection_module.png",
|
||||
CncNodeType.InspectionMarker => "/Resources/Icons/cnc_inspection_marker.png",
|
||||
CncNodeType.PauseDialog => "/Resources/Icons/cnc_pause_dialog.png",
|
||||
CncNodeType.WaitDelay => "/Resources/Icons/cnc_wait_delay.png",
|
||||
CncNodeType.CompleteProgram => "/Resources/Icons/cnc_complete_program.png",
|
||||
_ => "/Resources/Icons/cnc_default.png",
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,4 +93,4 @@ namespace XplorePlane.ViewModels.Cnc
|
||||
set => SetProperty(ref _isSelected, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using Prism.Commands;
|
||||
using Prism.Events;
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Prism.Commands;
|
||||
using Prism.Events;
|
||||
using Prism.Mvvm;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XplorePlane.Models;
|
||||
using XplorePlane.Services.Cnc;
|
||||
@@ -305,4 +305,4 @@ namespace XplorePlane.ViewModels.Cnc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Prism.Commands;
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XplorePlane.Services.Measurement;
|
||||
|
||||
@@ -18,12 +18,14 @@ namespace XplorePlane.ViewModels.Cnc
|
||||
|
||||
// ── 统计属性字段 | Statistics property fields ──
|
||||
private int _totalCount;
|
||||
|
||||
private int _passCount;
|
||||
private int _failCount;
|
||||
private double _passRate;
|
||||
|
||||
// ── 筛选属性字段 | Filter property fields ──
|
||||
private string _recipeName;
|
||||
|
||||
private DateTime? _fromDate;
|
||||
private DateTime? _toDate;
|
||||
|
||||
@@ -127,4 +129,4 @@ namespace XplorePlane.ViewModels.Cnc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
using Microsoft.Win32;
|
||||
using Prism.Commands;
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Microsoft.Win32;
|
||||
using Prism.Commands;
|
||||
using Prism.Mvvm;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XplorePlane.Services;
|
||||
|
||||
@@ -16,9 +16,13 @@ namespace XplorePlane.ViewModels
|
||||
{
|
||||
public string Key { get; }
|
||||
public string DisplayName { get; }
|
||||
public ProcessorItem(string key, string displayName) { Key = key; DisplayName = displayName; }
|
||||
|
||||
public ProcessorItem(string key, string displayName)
|
||||
{ Key = key; DisplayName = displayName; }
|
||||
|
||||
public override string ToString() => DisplayName;
|
||||
}
|
||||
|
||||
public class ImageProcessingViewModel : BindableBase
|
||||
{
|
||||
private readonly IImageProcessingService _imageProcessingService;
|
||||
@@ -122,6 +126,7 @@ namespace XplorePlane.ViewModels
|
||||
_logger.Warn("Failed to load parameters for processor: {ProcessorName}", processorName);
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnApplyProcessing()
|
||||
{
|
||||
if (CurrentImage == null || string.IsNullOrEmpty(SelectedProcessor)) return;
|
||||
@@ -170,6 +175,7 @@ namespace XplorePlane.ViewModels
|
||||
IsProcessing = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnResetImage()
|
||||
{
|
||||
CurrentImage = OriginalImage;
|
||||
@@ -239,4 +245,4 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Prism.Mvvm;
|
||||
using XplorePlane.Services;
|
||||
|
||||
namespace XplorePlane.ViewModels
|
||||
@@ -40,17 +40,17 @@ namespace XplorePlane.ViewModels
|
||||
// 算子 Key -> (分类名, 分类图标, 算子图标) 映射
|
||||
private static readonly Dictionary<string, (string Category, string CatIcon, string OpIcon)> CategoryMap = new()
|
||||
{
|
||||
["GaussianBlur"] = ("滤波与平滑", "🔵", "🌀"),
|
||||
["GaussianBlur16"] = ("滤波与平滑", "🔵", "🌀"),
|
||||
["BandPassFilter"] = ("滤波与平滑", "🔵", "📶"),
|
||||
["ShockFilter"] = ("滤波与平滑", "🔵", "⚡"),
|
||||
["Contrast"] = ("增强与校正", "🟡", "🔆"),
|
||||
["Gamma"] = ("增强与校正", "🟡", "🌗"),
|
||||
["GaussianBlur"] = ("滤波与平滑", "🔵", "🌀"),
|
||||
["GaussianBlur16"] = ("滤波与平滑", "🔵", "🌀"),
|
||||
["BandPassFilter"] = ("滤波与平滑", "🔵", "📶"),
|
||||
["ShockFilter"] = ("滤波与平滑", "🔵", "⚡"),
|
||||
["Contrast"] = ("增强与校正", "🟡", "🔆"),
|
||||
["Gamma"] = ("增强与校正", "🟡", "🌗"),
|
||||
["FlatFieldCorrection16"] = ("增强与校正", "🟡", "📐"),
|
||||
["Threshold"] = ("分割与阈值", "🟢", "📊"),
|
||||
["Division"] = ("分割与阈值", "🟢", "➗"),
|
||||
["Morphology"] = ("形态学与轮廓", "🔴", "🔲"),
|
||||
["Contour"] = ("形态学与轮廓", "🔴", "✏️"),
|
||||
["Threshold"] = ("分割与阈值", "🟢", "📊"),
|
||||
["Division"] = ("分割与阈值", "🟢", "➗"),
|
||||
["Morphology"] = ("形态学与轮廓", "🔴", "🔲"),
|
||||
["Contour"] = ("形态学与轮廓", "🔴", "✏️"),
|
||||
};
|
||||
|
||||
public OperatorToolboxViewModel(IImageProcessingService imageProcessingService)
|
||||
@@ -128,4 +128,4 @@ namespace XplorePlane.ViewModels
|
||||
_ => 99
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
using Microsoft.Win32;
|
||||
using Prism.Commands;
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
@@ -5,9 +8,6 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Microsoft.Win32;
|
||||
using Prism.Commands;
|
||||
using Prism.Mvvm;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XplorePlane.Models;
|
||||
using XplorePlane.Services;
|
||||
@@ -65,8 +65,6 @@ namespace XplorePlane.ViewModels
|
||||
MoveNodeDownCommand = new DelegateCommand<PipelineNodeViewModel>(MoveNodeDown);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ── State Properties ──────────────────────────────────────────
|
||||
|
||||
public ObservableCollection<PipelineNodeViewModel> PipelineNodes { get; }
|
||||
@@ -490,7 +488,6 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private PipelineModel BuildPipelineModel()
|
||||
{
|
||||
return new PipelineModel
|
||||
@@ -518,4 +515,4 @@ namespace XplorePlane.ViewModels
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using Prism.Mvvm;
|
||||
|
||||
namespace XplorePlane.ViewModels
|
||||
{
|
||||
@@ -56,4 +56,4 @@ namespace XplorePlane.ViewModels
|
||||
|
||||
public ObservableCollection<ProcessorParameterVM> Parameters { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using ImageProcessing.Core;
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using XP.ImageProcessing.Core;
|
||||
|
||||
namespace XplorePlane.ViewModels
|
||||
{
|
||||
@@ -64,8 +64,8 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
catch
|
||||
{
|
||||
IsValueValid = true; // 非数值类型不做范围校验
|
||||
IsValueValid = true; // é�žæ•°å€¼ç±»åž‹ä¸�å�šèŒƒå›´æ ¡éª?
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ namespace XplorePlane.ViewModels
|
||||
_logger = logger?.ForModule<MainViewModel>() ?? throw new System.ArgumentNullException(nameof(logger));
|
||||
|
||||
NavigationTree = new ObservableCollection<object>();
|
||||
|
||||
|
||||
NavigateHomeCommand = new DelegateCommand(OnNavigateHome);
|
||||
NavigateInspectCommand = new DelegateCommand(OnNavigateInspect);
|
||||
OpenFileCommand = new DelegateCommand(OnOpenFile);
|
||||
@@ -108,4 +108,4 @@ namespace XplorePlane.ViewModels
|
||||
LicenseInfo = "编辑属性";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
using Prism.Commands;
|
||||
using Prism.Mvvm;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
using XP.Camera;
|
||||
using Serilog;
|
||||
|
||||
namespace XplorePlane.ViewModels
|
||||
{
|
||||
@@ -22,6 +22,7 @@ namespace XplorePlane.ViewModels
|
||||
#region Properties
|
||||
|
||||
private BitmapSource? _cameraImageSource;
|
||||
|
||||
public BitmapSource? CameraImageSource
|
||||
{
|
||||
get => _cameraImageSource;
|
||||
@@ -29,6 +30,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private bool _isCameraConnected;
|
||||
|
||||
public bool IsCameraConnected
|
||||
{
|
||||
get => _isCameraConnected;
|
||||
@@ -52,6 +54,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private bool _isCameraGrabbing;
|
||||
|
||||
public bool IsCameraGrabbing
|
||||
{
|
||||
get => _isCameraGrabbing;
|
||||
@@ -66,6 +69,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private string _cameraStatusText = "未连接";
|
||||
|
||||
public string CameraStatusText
|
||||
{
|
||||
get => _cameraStatusText;
|
||||
@@ -73,6 +77,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private bool _isLiveViewEnabled;
|
||||
|
||||
public bool IsLiveViewEnabled
|
||||
{
|
||||
get => _isLiveViewEnabled;
|
||||
@@ -89,6 +94,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private string _cameraPixelCoord = "";
|
||||
|
||||
public string CameraPixelCoord
|
||||
{
|
||||
get => _cameraPixelCoord;
|
||||
@@ -96,6 +102,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private double _exposureTime;
|
||||
|
||||
public double ExposureTime
|
||||
{
|
||||
get => _exposureTime;
|
||||
@@ -103,6 +110,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private double _gainValue;
|
||||
|
||||
public double GainValue
|
||||
{
|
||||
get => _gainValue;
|
||||
@@ -110,6 +118,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private int _imageWidth;
|
||||
|
||||
public int ImageWidth
|
||||
{
|
||||
get => _imageWidth;
|
||||
@@ -117,6 +126,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private int _imageHeight;
|
||||
|
||||
public int ImageHeight
|
||||
{
|
||||
get => _imageHeight;
|
||||
@@ -124,6 +134,7 @@ namespace XplorePlane.ViewModels
|
||||
}
|
||||
|
||||
private string _selectedPixelFormat = "Mono8";
|
||||
|
||||
public string SelectedPixelFormat
|
||||
{
|
||||
get => _selectedPixelFormat;
|
||||
@@ -132,7 +143,7 @@ namespace XplorePlane.ViewModels
|
||||
|
||||
public ObservableCollection<string> PixelFormatOptions { get; } = new() { "Mono8", "BGR8", "BGRA8" };
|
||||
|
||||
#endregion
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
|
||||
@@ -148,7 +159,7 @@ namespace XplorePlane.ViewModels
|
||||
public DelegateCommand RefreshCameraParamsCommand { get; }
|
||||
public DelegateCommand OpenCameraSettingsCommand { get; }
|
||||
|
||||
#endregion
|
||||
#endregion Commands
|
||||
|
||||
public NavigationPropertyPanelViewModel(ICameraController camera)
|
||||
{
|
||||
@@ -309,7 +320,7 @@ namespace XplorePlane.ViewModels
|
||||
window.Show();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Camera Methods
|
||||
|
||||
#region Camera Event Handlers
|
||||
|
||||
@@ -364,7 +375,7 @@ namespace XplorePlane.ViewModels
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Camera Event Handlers
|
||||
|
||||
#region IDisposable
|
||||
|
||||
@@ -379,6 +390,6 @@ namespace XplorePlane.ViewModels
|
||||
_disposed = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion IDisposable
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,4 +54,4 @@
|
||||
<Button Content="读取当前参数" Height="30" FontSize="12"
|
||||
Command="{Binding RefreshCameraParamsCommand}" />
|
||||
</StackPanel>
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -10,4 +10,4 @@ namespace XplorePlane.Views
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,4 +9,4 @@
|
||||
ShowInTaskbar="False"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
<cnc:CncPageView />
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
|
||||
namespace XplorePlane.Views.Cnc
|
||||
{
|
||||
@@ -18,4 +16,4 @@ namespace XplorePlane.Views.Cnc
|
||||
WindowIconHelper.RemoveIcon(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -294,4 +294,4 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -13,4 +13,4 @@ namespace XplorePlane.Views.Cnc
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,4 +11,4 @@
|
||||
ShowInTaskbar="False"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
<cnc:MatrixPageView />
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
|
||||
namespace XplorePlane.Views.Cnc
|
||||
{
|
||||
@@ -18,4 +16,4 @@ namespace XplorePlane.Views.Cnc
|
||||
WindowIconHelper.RemoveIcon(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,4 +290,4 @@
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -13,4 +13,4 @@ namespace XplorePlane.Views.Cnc
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,4 +186,4 @@
|
||||
ToolTip="刷新统计数据 | Refresh statistics" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -13,4 +13,4 @@ namespace XplorePlane.Views.Cnc
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,4 +48,4 @@ namespace XplorePlane.Views.Cnc
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,6 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 标题 -->
|
||||
@@ -298,7 +297,6 @@
|
||||
FontSize="22"
|
||||
Foreground="#888888"
|
||||
ToolTip="下移" />
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -339,4 +337,4 @@
|
||||
ToolTip="打开" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -9,4 +9,4 @@ namespace XplorePlane.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,4 +29,4 @@
|
||||
<StackPanel Margin="8" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -9,4 +9,4 @@ namespace XplorePlane.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -228,5 +228,4 @@
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -9,4 +9,4 @@ namespace XplorePlane.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 顶部: 标签页 + 状态指示 -->
|
||||
@@ -31,9 +30,6 @@
|
||||
FontWeight="SemiBold"
|
||||
Foreground="#333333"
|
||||
Text="射线源" />
|
||||
|
||||
|
||||
|
||||
</StackPanel>
|
||||
<!-- X-Ray ON 状态 -->
|
||||
<Border
|
||||
@@ -147,7 +143,5 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -9,4 +9,4 @@ namespace XplorePlane.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
<UserControl
|
||||
<UserControl
|
||||
x:Class="XplorePlane.Views.ImageProcessingPanelView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:ImageProcessing.Controls;assembly=ImageProcessing.Controls"
|
||||
xmlns:controls="clr-namespace:XP.ImageProcessing.CfgControl;assembly=XP.ImageProcessing.CfgControl"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:roi="clr-namespace:ImageROIControl.Controls;assembly=ImageROIControl"
|
||||
xmlns:roi="clr-namespace:XP.ImageProcessing.RoiControl.Controls;assembly=XP.ImageProcessing.RoiControl"
|
||||
d:DesignHeight="700"
|
||||
d:DesignWidth="1000"
|
||||
mc:Ignorable="d">
|
||||
@@ -65,7 +65,6 @@
|
||||
<Setter Property="BorderBrush" Value="#cdcbcb" />
|
||||
<Setter Property="Padding" Value="4,6,4,4" />
|
||||
</Style>
|
||||
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
@@ -74,7 +73,7 @@
|
||||
<RowDefinition Height="36" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 主内容区:左侧操作栏 | 中间图像 | 右侧参数配置 -->
|
||||
<!-- 主内容区:左侧操作区 -->
|
||||
<Grid Grid.Row="0" Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition
|
||||
@@ -90,7 +89,7 @@
|
||||
MaxWidth="420" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 左侧操作栏 -->
|
||||
<!-- 左侧操作区 -->
|
||||
<Border Grid.Column="0" Style="{StaticResource PanelBorderStyle}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel>
|
||||
@@ -121,7 +120,7 @@
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
<!-- 中间:原始图像 + 处理结果 -->
|
||||
<!-- 中间:原始图�?+ 处理结果 -->
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="8*" />
|
||||
@@ -167,7 +166,6 @@
|
||||
MinHeight="200"
|
||||
ParameterChanged="OnParameterChanged" />
|
||||
</GroupBox>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
@@ -205,6 +203,5 @@
|
||||
Value="{Binding ProcessingProgress}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -1,9 +1,10 @@
|
||||
using Prism.Ioc;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Prism.Ioc;
|
||||
using XplorePlane.Services;
|
||||
using XplorePlane.ViewModels;
|
||||
|
||||
namespace XplorePlane.Views
|
||||
{
|
||||
public partial class ImageProcessingPanelView : UserControl
|
||||
@@ -51,4 +52,4 @@ namespace XplorePlane.Views
|
||||
// Nothing extra needed here — ApplyProcessingCommand will pick them up via the service.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,4 +11,4 @@
|
||||
ShowInTaskbar="False"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
<views:ImageProcessingPanelView />
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -9,4 +9,4 @@ namespace XplorePlane.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,10 @@
|
||||
d:DesignHeight="600" d:DesignWidth="280">
|
||||
|
||||
<UserControl.Resources>
|
||||
<SolidColorBrush x:Key="PanelBg" Color="White"/>
|
||||
<SolidColorBrush x:Key="PanelBorder" Color="#cdcbcb"/>
|
||||
<SolidColorBrush x:Key="CategoryBg" Color="#F5F7FA"/>
|
||||
<SolidColorBrush x:Key="HoverBg" Color="#E8F0FE"/>
|
||||
<SolidColorBrush x:Key="PanelBg" Color="White" />
|
||||
<SolidColorBrush x:Key="PanelBorder" Color="#cdcbcb" />
|
||||
<SolidColorBrush x:Key="CategoryBg" Color="#F5F7FA" />
|
||||
<SolidColorBrush x:Key="HoverBg" Color="#E8F0FE" />
|
||||
<FontFamily x:Key="CsdFont">Microsoft YaHei UI</FontFamily>
|
||||
</UserControl.Resources>
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
BorderThickness="1" CornerRadius="4">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 标题(支持无边框窗口拖拽) -->
|
||||
@@ -32,27 +32,27 @@
|
||||
<Grid>
|
||||
<TextBlock Text="🧰 算子工具箱" FontFamily="{StaticResource CsdFont}"
|
||||
FontWeight="Bold" FontSize="13" Foreground="White"
|
||||
VerticalAlignment="Center"/>
|
||||
VerticalAlignment="Center" />
|
||||
<Button x:Name="CloseBtn" HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Content="✕" FontSize="12" Foreground="White" Cursor="Hand"
|
||||
Visibility="Collapsed"
|
||||
ToolTip="关闭">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="6,2"/>
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="6,2" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="3" Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#E04040"/>
|
||||
<Setter Property="Background" Value="#E04040" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -81,7 +81,7 @@
|
||||
<VisualBrush.Visual>
|
||||
<TextBlock Text="🔍 搜索算子..." Foreground="#aaa"
|
||||
FontFamily="Microsoft YaHei UI" FontSize="11"
|
||||
Margin="4,0,0,0"/>
|
||||
Margin="4,0,0,0" />
|
||||
</VisualBrush.Visual>
|
||||
</VisualBrush>
|
||||
</Setter.Value>
|
||||
@@ -106,11 +106,11 @@
|
||||
Padding="10,6">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding CategoryIcon}" FontSize="13"
|
||||
VerticalAlignment="Center" Margin="0,0,6,0"/>
|
||||
VerticalAlignment="Center" Margin="0,0,6,0" />
|
||||
<TextBlock Text="{Binding CategoryName}"
|
||||
FontFamily="Microsoft YaHei UI"
|
||||
FontWeight="SemiBold" FontSize="12"
|
||||
Foreground="#333" VerticalAlignment="Center"/>
|
||||
Foreground="#333" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<!-- 分类下的算子 -->
|
||||
@@ -125,7 +125,7 @@
|
||||
<Style TargetType="Border">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#E8F0FE"/>
|
||||
<Setter Property="Background" Value="#E8F0FE" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
@@ -137,17 +137,17 @@
|
||||
<TextBlock Text="{Binding IconPath}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"/>
|
||||
FontSize="14" />
|
||||
</Border>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding DisplayName}"
|
||||
FontFamily="Microsoft YaHei UI"
|
||||
FontSize="11.5"
|
||||
Foreground="#1c1c1b"/>
|
||||
Foreground="#1c1c1b" />
|
||||
<TextBlock Text="{Binding Key}"
|
||||
FontFamily="Consolas"
|
||||
FontSize="9.5"
|
||||
Foreground="#999"/>
|
||||
Foreground="#999" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
@@ -161,4 +161,4 @@
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -1,7 +1,7 @@
|
||||
using Prism.Ioc;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using Prism.Ioc;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XplorePlane.ViewModels;
|
||||
|
||||
@@ -95,4 +95,4 @@ namespace XplorePlane.Views
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,8 @@
|
||||
ResizeMode="CanResizeWithGrip">
|
||||
<Border Background="White" BorderBrush="#cdcbcb" BorderThickness="1" CornerRadius="6">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="12" ShadowDepth="2" Opacity="0.3" Color="#333"/>
|
||||
<DropShadowEffect BlurRadius="12" ShadowDepth="2" Opacity="0.3" Color="#333" />
|
||||
</Border.Effect>
|
||||
<views:OperatorToolboxView />
|
||||
</Border>
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -27,4 +27,4 @@ namespace XplorePlane.Views
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using Prism.Ioc;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Prism.Ioc;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XplorePlane.ViewModels;
|
||||
|
||||
@@ -69,4 +69,4 @@ namespace XplorePlane.Views
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,12 +8,12 @@
|
||||
ShowInTaskbar="False">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<views:OperatorToolboxView Grid.Column="0"/>
|
||||
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" Background="#E0E0E0"/>
|
||||
<views:PipelineEditorView Grid.Column="2"/>
|
||||
<views:OperatorToolboxView Grid.Column="0" />
|
||||
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" Background="#E0E0E0" />
|
||||
<views:PipelineEditorView Grid.Column="2" />
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user