Browse Source

Merge branch 'master' of http://139.155.15.221:3000/zoulei/XdCxRhDW

wyq 1 year ago
parent
commit
9a6ffdc833

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

@@ -1,4 +1,6 @@
-using DevExpress.XtraBars.Docking2010;
+using DevExpress.Data.Localization;
+using DevExpress.Utils.Localization;
+using DevExpress.XtraBars.Docking2010;
 using DevExpress.XtraBars.Localization;
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
@@ -33,8 +35,20 @@ namespace XdCxRhDW
 
             //Control
             Localizer.Active = new ChsControlLocalizer();
+
+            XtraLocalizer.QueryLocalizedString += XtraLocalizer_QueryLocalizedString;
         }
 
+        private static void XtraLocalizer_QueryLocalizedString(object sender, XtraLocalizer.QueryLocalizedStringEventArgs e)
+        {
+            if (e.StringIDType == typeof(StringId))
+            {
+                if ((StringId)e.StringID == StringId.FilterShowAll)
+                {
+                    e.Value = "(全选)";
+                }
+            }
+        }
     }
     class ChsControlLocalizer : Localizer
     {
@@ -70,6 +84,10 @@ namespace XdCxRhDW
                     return "输入搜索文本...";
                 case StringId.TabHeaderButtonClose:
                     return "关闭选项卡";
+                case StringId.OK:
+                    return "确定";
+                case StringId.Cancel:
+                    return "取消";
             }
             var res = base.GetLocalizedString(id);
             return res;

+ 1 - 1
XdCxRhDW.App/Program.cs

@@ -115,7 +115,7 @@ namespace XdCxRhDW
             if (Debugger.IsAttached)
             {
                 //DevExpress23.2以上版本查看未本地化的资源
-                //DevExpress.Utils.Localization.XtraLocalizer.EnableTraceSource();
+                DevExpress.Utils.Localization.XtraLocalizer.EnableTraceSource();
             }
             if (IsRunningAsAdmin())
             {

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

@@ -868,7 +868,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(',');
@@ -878,6 +878,7 @@ namespace XdCxRhDW.App.UserControl
                         if (res.code != 200)
                         {
                             DxHelper.MsgBoxHelper.ShowWarning($"下发启动历史任务的服务失败{res.msg}");
+                            return;
                         }
                     }
                     using (RHDWContext db = new RHDWContext())