gongqiuhong 1 year ago
parent
commit
04199c6136
2 changed files with 20 additions and 2 deletions
  1. 18 1
      XdCxRhDW.App/Localizer/ChsLocalizer.cs
  2. 2 1
      XdCxRhDW.App/UserControl/CtrlHome.cs

+ 18 - 1
XdCxRhDW.App/Localizer/ChsLocalizer.cs

@@ -1,4 +1,5 @@
-using DevExpress.XtraBars.Docking2010;
+using DevExpress.Data.Localization;
+using DevExpress.XtraBars.Docking2010;
 using DevExpress.XtraBars.Localization;
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
@@ -31,6 +32,8 @@ namespace XdCxRhDW
             //LayoutControl
             LayoutLocalizer.Active = new ChsLayoutLocalizer();
 
+            //CommonLocalizer.Active = new ChsComBoxLocalizer();
+
             //Control
             Localizer.Active = new ChsControlLocalizer();
         }
@@ -70,6 +73,10 @@ namespace XdCxRhDW
                     return "输入搜索文本...";
                 case StringId.TabHeaderButtonClose:
                     return "关闭选项卡";
+                case StringId.OK:
+                    return "确定";
+                case StringId.Cancel:
+                    return "取消";
             }
             var res = base.GetLocalizedString(id);
             return res;
@@ -332,5 +339,15 @@ namespace XdCxRhDW
             return res;
         }
     }
+    class ChsComBoxLocalizer : EditResLocalizer
+    {
+        //public override string GetLocalizedString(stringid id)
+        //{
+        //    switch (id)
+        //    {
+        //        case ImageEditorLocalizerStringId.all
+        //    }
+        //}
+    }
 
 }

+ 2 - 1
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -867,7 +867,7 @@ namespace XdCxRhDW.App.UserControl
                         dto.TaskName = tsk.TaskName;
                         dto.PosType = (EnumPosTypeDto)(int)tsk.PosType;
                         dto.SigType = (EnumSigTypeDto)(int)tsk.SigType;
-                        dto.TaskCheckType = (EnumTaskCheckTypeDto)(int)tsk.DetectionWay.Value;
+                        dto.TaskCheckType = tsk.DetectionWay.HasValue?(EnumTaskCheckTypeDto)(int)tsk.DetectionWay.Value: EnumTaskCheckTypeDto.DAMA;
                         dto.CapDir = tsk.CapDir;
                         dto.DateDirFormat = tsk.CapDirFormat;
                         var strs = tsk.HistoryFrequpMHz.Split(',');
@@ -877,6 +877,7 @@ namespace XdCxRhDW.App.UserControl
                         if (res.code != 200)
                         {
                             DxHelper.MsgBoxHelper.ShowWarning($"下发启动历史任务的服务失败{res.msg}");
+                            return;
                         }
                     }
                     using (RHDWContext db = new RHDWContext())