Explorar o código

winfrom提交

duyong %!s(int64=3) %!d(string=hai) anos
pai
achega
b18cf3c93f
Modificáronse 2 ficheiros con 7 adicións e 2 borrados
  1. 6 1
      CarMeterSystem/frmMain.cs
  2. 1 1
      Common/cacheCls/PbCache.cs

+ 6 - 1
CarMeterSystem/frmMain.cs

@@ -469,7 +469,10 @@ namespace CarMeterSystem
             //这里每隔0.5秒执行一次
             //这里每隔0.5秒执行一次
             try
             try
             {
             {
-                PbCache.carNoSource = 1;
+                if (PbCache.carNoSource == 0)
+                {
+                    PbCache.carNoSource = 1;
+                }
                 if (e.carno == "nown")
                 if (e.carno == "nown")
                 {
                 {
                     e.carno = "";
                     e.carno = "";
@@ -980,6 +983,7 @@ namespace CarMeterSystem
                         meterWorkScheduledHelp1.warmTypeName = "车号来源记录";
                         meterWorkScheduledHelp1.warmTypeName = "车号来源记录";
                         meterWorkScheduledHelpService.add(meterWorkScheduledHelp1);
                         meterWorkScheduledHelpService.add(meterWorkScheduledHelp1);
                         isCarSource = false;
                         isCarSource = false;
+                        PbCache.carNoSource = 0;
                     }
                     }
 
 
                     PbCache.isOvertimeAlarm = false; //是否超时报警
                     PbCache.isOvertimeAlarm = false; //是否超时报警
@@ -1327,6 +1331,7 @@ namespace CarMeterSystem
         {
         {
             try
             try
             {
             {
+                //进行扫码,判断
                 if (PbCache.carNoSource == 1 || PbCache.carNoSource == 2)
                 if (PbCache.carNoSource == 1 || PbCache.carNoSource == 2)
                 {
                 {
                     PbCache.carNoSource = 3;
                     PbCache.carNoSource = 3;

+ 1 - 1
Common/cacheCls/PbCache.cs

@@ -60,7 +60,7 @@ namespace Common
         /// <summary>
         /// <summary>
         /// 车号数据来源(1-正常,2-rfid,3-扫码,4-车号重置)
         /// 车号数据来源(1-正常,2-rfid,3-扫码,4-车号重置)
         /// </summary>
         /// </summary>
-        public static int carNoSource { get; set; }
+        public static int carNoSource = 0;
 
 
         /// <summary>
         /// <summary>
         /// 是否打开手动选择毛皮
         /// 是否打开手动选择毛皮