|
@@ -413,11 +413,13 @@ namespace MV485.uc
|
|
|
{
|
|
|
grdIndCount.Visibility = Visibility.Visible;
|
|
|
grdNumCount.Visibility = Visibility.Visible;
|
|
|
+ grdRedInd.Visibility = Visibility.Visible;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
grdIndCount.Visibility = Visibility.Collapsed;
|
|
|
grdNumCount.Visibility = Visibility.Visible;
|
|
|
+ grdRedInd.Visibility = Visibility.Collapsed;
|
|
|
}
|
|
|
}
|
|
|
else if (meterType == Constant.METER_TYPE_IND)
|
|
@@ -957,14 +959,17 @@ namespace MV485.uc
|
|
|
runConfig.LastUnitLevelWRFlag = true;
|
|
|
runConfig.LastUnitLevel = (byte)cmbLastUnit.SelectedValue;
|
|
|
|
|
|
- if(cmbUploadRedind.SelectedItem == null)
|
|
|
+ if (runConfig.MeterType == 1 || runConfig.MeterType == 3)
|
|
|
{
|
|
|
- MessageBox.Show(Application.Current.MainWindow, "请选择是否上传红色指针的读数", "提示",
|
|
|
- MessageBoxButton.OK, MessageBoxImage.Warning);
|
|
|
- return;
|
|
|
+ if (cmbUploadRedind.SelectedItem == null)
|
|
|
+ {
|
|
|
+ MessageBox.Show(Application.Current.MainWindow, "请选择是否上传红色指针的读数", "提示",
|
|
|
+ MessageBoxButton.OK, MessageBoxImage.Warning);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ runConfig.UploadRedindWRFlag = true;
|
|
|
+ runConfig.UploadRedind = (byte)cmbUploadRedind.SelectedValue;
|
|
|
}
|
|
|
- runConfig.UploadRedindWRFlag = true;
|
|
|
- runConfig.UploadRedind = (byte)cmbUploadRedind.SelectedValue;
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(txtLastValue.Text) ||
|
|
|
!ulong.TryParse(txtLastValue.Text,out ulong latestValue))
|
|
@@ -987,34 +992,43 @@ namespace MV485.uc
|
|
|
runConfig.LatestTimeWRFlag = true;
|
|
|
runConfig.LatestTime = dtpLastValueTime.Value.GetValueOrDefault();
|
|
|
|
|
|
- if (string.IsNullOrWhiteSpace(txtMeterRegion.Text))
|
|
|
- {
|
|
|
- MessageBox.Show(Application.Current.MainWindow, "请输入表盘范围坐标", "提示",
|
|
|
- MessageBoxButton.OK, MessageBoxImage.Warning);
|
|
|
- return;
|
|
|
- }
|
|
|
- runConfig.MeterRegionWRFlag = true;
|
|
|
- runConfig.MeterRegion = txtMeterRegion.Text;
|
|
|
|
|
|
- string featureTitle = (runConfig.MeterType == Constant.METER_TYPE_IND) ?
|
|
|
- "首尾指针同刻度坐标" : "数字区域范围坐标";
|
|
|
- if (string.IsNullOrEmpty(txtFeatureRegion.Text))
|
|
|
- {
|
|
|
- MessageBox.Show(Application.Current.MainWindow, $"请输入{featureTitle}", "提示",
|
|
|
- MessageBoxButton.OK, MessageBoxImage.Warning);
|
|
|
- return;
|
|
|
- }
|
|
|
- if(runConfig.MeterType == Constant.METER_TYPE_IND)
|
|
|
+ if (chkMeterRegion.IsChecked == true)
|
|
|
{
|
|
|
- runConfig.FTIndRegionWRFlag = true;
|
|
|
- runConfig.FTIndRegion = txtFeatureRegion.Text.Trim();
|
|
|
+ if (string.IsNullOrWhiteSpace(txtMeterRegion.Text))
|
|
|
+ {
|
|
|
+ MessageBox.Show(Application.Current.MainWindow, "请输入表盘范围坐标", "提示",
|
|
|
+ MessageBoxButton.OK, MessageBoxImage.Warning);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ runConfig.MeterRegionWRFlag = true;
|
|
|
+ runConfig.MeterRegion = txtMeterRegion.Text;
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (chkFeatureRegion.IsChecked == true)
|
|
|
{
|
|
|
- runConfig.DigitRegionWRFlag = true;
|
|
|
- runConfig.DigitRegion = txtFeatureRegion.Text.Trim();
|
|
|
+ string featureTitle = (runConfig.MeterType == Constant.METER_TYPE_IND) ?
|
|
|
+ "首尾指针同刻度坐标" : "数字区域范围坐标";
|
|
|
+ if (string.IsNullOrEmpty(txtFeatureRegion.Text))
|
|
|
+ {
|
|
|
+ MessageBox.Show(Application.Current.MainWindow, $"请输入{featureTitle}", "提示",
|
|
|
+ MessageBoxButton.OK, MessageBoxImage.Warning);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (runConfig.MeterType == Constant.METER_TYPE_IND)
|
|
|
+ {
|
|
|
+ runConfig.FTIndRegionWRFlag = true;
|
|
|
+ runConfig.FTIndRegion = txtFeatureRegion.Text.Trim();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ runConfig.DigitRegionWRFlag = true;
|
|
|
+ runConfig.DigitRegion = txtFeatureRegion.Text.Trim();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
if (chkSampleInterval.IsChecked == true)
|
|
|
{
|
|
|
//if(string.IsNullOrWhiteSpace(cmbSampleInterval.Text) ||
|