diff --git a/DeviceCommand/Devices/N36600.cs b/DeviceCommand/Devices/N36600.cs
index a5a430f..18dea0c 100644
--- a/DeviceCommand/Devices/N36600.cs
+++ b/DeviceCommand/Devices/N36600.cs
@@ -229,26 +229,9 @@ namespace DeviceCommand.Device
return await WriteReadAsync($"MEAS:VAP?{SCPIDelimiter}", SCPIDelimiter, ct);
}
+
///
- /// 3.5.5 查询通道输出端子上测得的电池容量
- ///
- public virtual async Task 查询测得电池容量(CancellationToken ct = default)
- {
- // 修正:去除前缀冒号
- return await WriteReadAsync($"MEAS:CAP?{SCPIDelimiter}", SCPIDelimiter, ct);
- }
-
- ///
- /// 3.5.6 查询通道输出端子上测得的恒流输出时间长度 (单位: ms)
- ///
- public virtual async Task 查询恒流输出时间长度(CancellationToken ct = default)
- {
- // 修正:去除前缀冒号
- return await WriteReadAsync($"MEAS:TIM:CC?{SCPIDelimiter}", SCPIDelimiter, ct);
- }
-
- ///
- /// 3.5.7 查询通道输出端子上测得的输出时间长度
+ /// 3.5.5 查询通道输出端子上测得的输出时间长度
///
public virtual async Task 查询总输出时间长度(CancellationToken ct = default)
{
@@ -286,7 +269,7 @@ namespace DeviceCommand.Device
{
// 修正:去除前缀冒号
string 状态 = 开启 ? "ON" : "OFF";
- await SendAsync($"OUTP:TIM {状态}{SCPIDelimiter}", ct);
+ await SendAsync($"OUTP:TIME {状态}{SCPIDelimiter}", ct);
}
///
@@ -295,7 +278,7 @@ namespace DeviceCommand.Device
public virtual async Task 设置定时器时间(double 秒数, CancellationToken ct = default)
{
// 修正:去除前缀冒号
- string cmd = string.Format(CultureInfo.InvariantCulture, "OUTP:TIM:DATA {0:F1}{1}", 秒数, SCPIDelimiter);
+ string cmd = string.Format(CultureInfo.InvariantCulture, "OUTP:TIME:DATA {0:F1}{1}", 秒数, SCPIDelimiter);
await SendAsync(cmd, ct);
}
@@ -400,7 +383,14 @@ namespace DeviceCommand.Device
string cmd = string.Format(CultureInfo.InvariantCulture, "VOLT:LIM {0:F3}{1}", 电压, SCPIDelimiter);
await SendAsync(cmd, ct);
}
-
+ ///
+ /// 3.7.2.9 清除电压上限限制(恢复为设备物理允许的最大电压值)
+ ///
+ public virtual async Task 清除电压上限限制(CancellationToken ct = default)
+ {
+ // 发送 MAXimum 设为最大值以达到“清除限制”的效果
+ await SendAsync($"VOLT:LIMIT MAX{SCPIDelimiter}", ct); // 对应手册 3.7.2.8
+ }
///
/// 3.7.3.1 设置输出功率值 (W)
///
diff --git a/DeviceEditModule/DeviceEditModule.cs b/DeviceEditModule/DeviceEditModule.cs
index bb7a9dd..eead725 100644
--- a/DeviceEditModule/DeviceEditModule.cs
+++ b/DeviceEditModule/DeviceEditModule.cs
@@ -21,6 +21,12 @@ namespace DeviceEditModule
containerRegistry.RegisterForNavigation("N69200View");
containerRegistry.RegisterForNavigation("SDS2000X_HDView");
containerRegistry.RegisterForNavigation("SPAW7000View");
+ containerRegistry.Register();
+ containerRegistry.Register();
+ containerRegistry.Register();
+ containerRegistry.Register();
+ containerRegistry.Register();
+ containerRegistry.Register();
}
}
}
diff --git a/DeviceEditModule/Views/DialogMangerView.xaml b/DeviceEditModule/Views/DialogMangerView.xaml
index 82a7beb..034c770 100644
--- a/DeviceEditModule/Views/DialogMangerView.xaml
+++ b/DeviceEditModule/Views/DialogMangerView.xaml
@@ -9,7 +9,7 @@
xmlns:converters="clr-namespace:UIShare.Converters;assembly=UIShare"
mc:Ignorable="d"
prism:ViewModelLocator.AutoWireViewModel="True"
- Height="850" Width="900">
+ Height="900" Width="900">
@@ -124,7 +124,7 @@
-
+
diff --git a/DeviceEditModule/Views/N36600View.xaml b/DeviceEditModule/Views/N36600View.xaml
index 573607b..39720eb 100644
--- a/DeviceEditModule/Views/N36600View.xaml
+++ b/DeviceEditModule/Views/N36600View.xaml
@@ -7,7 +7,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:converters="clr-namespace:UIShare.Converters;assembly=UIShare"
mc:Ignorable="d"
- prism:ViewModelLocator.AutoWireViewModel="True"
+ prism:ViewModelLocator.AutoWireViewModel="False"
d:DesignHeight="760" d:DesignWidth="860">
diff --git a/TestingModule/ViewModels/ParametersManagerViewModel.cs b/TestingModule/ViewModels/ParametersManagerViewModel.cs
index 486105a..167af42 100644
--- a/TestingModule/ViewModels/ParametersManagerViewModel.cs
+++ b/TestingModule/ViewModels/ParametersManagerViewModel.cs
@@ -127,26 +127,37 @@ namespace TestingModule.ViewModels
if (SelectedDevice == null) return;
var type = SelectedDevice.DeviceType.Split('.').Last();
var viewName = type + "View";
+ var vmName = type + "ViewModel"; // 按照命名规范拼接出对应的 VM 类型名
try
{
- // 1. 先确保弹窗管理器窗口已打开(首次 Show,后续只追加 Tab)
+ // 1. 先确保弹窗管理器窗口已打开
if (_dialogWindow == null || !_dialogWindow.IsVisible)
{
_dialogService.Show("DialogMangerView");
-
- // 找到刚刚被 DialogService 打开的窗口(按 DataContext 类型名匹配)
_dialogWindow = System.Windows.Application.Current.Windows
.OfType()
.FirstOrDefault(w => w.DataContext?.GetType().Name == "DialogMangerViewModel");
}
- // 2. 从容器按注册名解析设备编辑 View
+ // 2. 从当前专属容器解析设备编辑 View 实例
var view = _containerProvider.Resolve