diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAt4AAAKCCAYAAADm2N7TAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAABk5SURBVHhe7d1bk1vVAYRRkpAQ + CIRLAblXkv//Ix213NulERp7HOiXYa2q5sElH+nxq1374E/evHljZmZmZmbjPfxDMzMzMzP7ZffwD83M + zMzM7Jfd2//8Mn5jZmZmZvYK97O9NLwfffmj/dbMzMzM7BXuUfs+2rM+FN73D7r/Ab8zMzMzM/sV7r6L + 77v5J54L7/u/eB54vujTm/3ezMzMzOxXtNsWvg/x+45+50Ph/Si482V/6D672x/NzMzMzF7h7rv39PAJ + 8ecC/J1H4f0oum+D+zawP7/si5v9yczMzMzsFe62edPAt0F+H+AP4/tD4X0f3bexnR/w5WVfdX82MzMz + M3vFO92bBj4xfiL8UXy/N7yfi+7rKfflcwAAwJ20cpv52fi+fuztZ6/uw/v2pPuL61MBAIAn0spt5nPy + /aLwvj3tfhfdl311fSoAAPBEWrnNfOL7/tT7veF9rpjk3krusXx9fSoAAPBEWrnNnHY+V05eFN4/Oe2+ + 7NvrUwEAgCfSym3m+1PvjwrvvLGZgv/u+lQAAOCJtHKbOe384vA+97tvr5l8c9n316cCAABPpJXbzLfX + TdLUaev3hve53/3umsllP1yfCgAAPJFWbjOf6ya397w/Orx/vD4VAAB4Iq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y8AQBgJa3cZhbe + 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8a+7Hw5ahzz+P+9i9Hz0bj4RVl/Rxw49J6NX/xqWP7sfuf + 3RyHY/+K8nL7VOCmpfVqvl9ZRsOxf9p4GI11r7ZPBW5aWq/mezyOTx0fHY5+Rck7T96BXm+fCty0tF7N + 9/cdx6eOi8Pxl6eNdW+2TwVuWlqv5o9PHU8ajnzbmgV6u30qcNPSejWf9sfD0d9v7F9T8n/hvNs+Fbhp + ab2a37+uZBOyDR8djv5+4+E1Zd377VOBm5bWq/l+Xdl/z/Hk4fiwfSpw09J6Nf9Jw5F/XZZ3HsMBn4G0 + Xs2n/UeHI/9Dvvzo4egvRns4ftg+Fbhpab2aT/v9BWkPx/YF6fZj9z9rOADDAfwf0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/uzkbjlfr3qwzHPAZSOvVfNr/5OF4v30qcNPSejX/ + 5OH4cl1++Jt13677bt277VOBm5bWq/m0nw3IFmQTPjoc+fIjP/TVuv6C9PW6t9unAjctrVfz/cVotiCb + sH0xum40HA+vK9unAjctrVfzaf9Jw7H/nqNfV7anjnV5//lx3c/rfl3327rf1/1R96dz7mqvO02zaTcN + p+U0nbb7aWP/mtLfb4yG4+ypo8cj70D55jW/7Kd1+cW/rMsf4Zy77kuraTbtpuG0nKZ7NM6eNh4djuNT + x9l45FGmByQrlV+cyz8ccc5d93WvabcHI02fjcbxaWM0HFmafmXp8cgjTA9IvnnNL+whcc49j+tu03AP + Rtru0ehXlOPTxulwxKXx6CePvPfkw/ONa49ILv/KzDn3PK67TcNpOU2n7f2TxuloxGPDcTYe/fSxH5G+ + /AHOueu+fbM9Frm0fTYao+GIs/E4DkiPyP76D3DOXe8du+2e94NxcTTiseHoOxuQvvwy59zzvH3Llwaj + 78Gl4WjH/7A/sK9/kXPu+d6x62P3f/HYcLTjB1264x/gnLu+O2v37C66u7t78T/lcmBy0+g2HwAAAABJ + RU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAABbCAYAAACChWtVAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAW2SURBVHhe7ZrdThxXEAadxLFj + YoLBgP9l+/0fknQduldHkwF6AxfjoUr6bqzV7N5U6ZwxL25ubl4kv8V+j/0R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Acyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0H + MJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nD + Acyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9Wre + cAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2a + NxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv + 5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPW + q3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5kfDERmPHo5v1j1d18PxZvtU4NTSejWf9rMB2YIe + jmzE7Wbc/uzmaDierXuxznDAI5DWq/m0/8nD8Xr7VODU0no1f+/h+HJdfvi7dT+s+2ndq+1TgVNL69V8 + 2s8GZAuyCR8cjnz5kR/6el1/Qfp83cvtU4FTS+vVfH8xmi3IJmxfjK4bDcfd68r2qcCppfVqPu3fazj2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Wo+7Y+Ho7/f2L6mvF7u3fqpwKml9Wp++7qS + Tcg23Dkc/f3GzWvKcu/XTwVOLa1X8/26sv2e48HD8WH9VODU0no1/0nDkX9llncewwFfgbRezaf9e4cj + f5AvP3o4+ovRHo5f1k8FTi2tV/Npv78g7eFYvyBdf+z6Zw0HYDiA/yGtV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAt4AAAKCCAYAAADm2N7TAAA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FhJK7eZhTcAAKykldvMwhsA + AFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mF + NwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZu + MwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAl + rdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMA + wEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPw + BgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0spt + ZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKyk + ldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAA + WEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbe + AACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnN + LLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0 + cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAA + K2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIb + AABW0sptZuENAAAraeU2s/AGAICVt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ABYSSu3 + mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCS + Vm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEA + YCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4 + AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2 + s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbS + ym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAA + rKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtv + AABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxm + Ft4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpa + uc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCA + lbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuEN + AAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvM + whsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkr + t5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACw + klZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwB + AGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZ + eAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nl + NrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW + 0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcA + AKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjML + bwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3c + ZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBK + WrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYA + gJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbh + DQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXb + zMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJ + K7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAA + sJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8 + AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKb + WXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp + 5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAA + VtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3 + AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4z + C28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt + 3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDA + Slq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AG + AICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m + 4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV + 28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABY + SSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4A + ALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYA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Px/YF6fZj9z9rOADDAfwf0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/uzkbjlfr3qwzHPAZSOvVfNr/5OF4v30qcNPSejX/ + 5OH4cl1++Jt13677bt277VOBm5bWq/m0nw3IFmQTPjoc+fIjP/TVuv6C9PW6t9unAj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QXoWuxhPFZFdg+vpfL0YpQU0YbwYjbXCcbiujKeKyK7B9XQe948K + x/yeo64r49QR4/7zMfY59jX2LfY99iP30zm32ZWnOIu7OIzLOI3bddqYryn1fqMVjrVTR8WDOxBvXvmy + TzG++EuMH+Gc2/ZwFWdxF4dxGacrGmunjQfDsTx1rMWDo0wFhErxxYw/HHHObXvlK+5WMHB6LRrL00Yr + HJSmriwVD44wFRDevPKFFZL3zrnNr0LBcLiCgdsVjbqiLE8bq+GAtXhQnnrfwYN521oB4a/LWIXEObft + 4Wp5W8HAadyu9xprV5QRDeiGY76yVDzm00etfoxzbrubna1TRkVjvqIcFQ7ggxUOxkOWVxZWJ4/a/IOc + c9vc7GydNNh8RWHlf/XggOFw7vltdvbJwuFVxbl9b3YWh8vnR11V1sLBgyhRRaNOGnMsfDnq3K+xJ3g5 + evPiX3UuEEliaqavAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAACqCAYAAABcS6HpAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAfqSURBVHhe7drbbhxlEIXRcIZA + CAlJOIvk/R/S/LtdZbWGTlImvhjaa0l1g6yxb76t7iFPbm5unpTP1n2+7ot1X637Zt13635Y93zdy3Wv + 1/267vd1f677a93f697WvXPOXe11p2k27abhtJym03YaT+tpPu1nA7IF2YRsQzbidjPeMxxfrvt63bfr + nq57tq7H49W6N+vyy35bl1/8x7r8Ec656760mmbTbhpOy2m6RyOtp/m0nw3IFnx0OC6fOo7G48W6HpCs + VH5x7hfn3NVf95p2ezDS9NFoXD5tjIYjS9OvLD0eeYTpAflpXX5hD8nPzrmrvx6KXBruwUjbPRr9inL5 + tHE4HHE0Hlme/r4jH/z9uh6QH+t6SJxz131ptbvtwUjTabu/1zh6RdlGI6bDsX9l6fHYP3309R/jnLve + 2zfbTxk9GvtXlHsNR+QHezhy+ZDLV5ZcP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84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAt4AAAKCCAYAAADm2N7TAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAABk5SURBVHhe7d1bk1vVAYRRkpAQ + CIRLAblXkv//Ix213NulERp7HOiXYa2q5sElH+nxq1374E/evHljZmZmZmbjPfxDMzMzMzP7ZffwD83M + zMzM7Jfd2//8Mn5jZmZmZvYK97O9NLwfffmj/dbMzMzM7BXuUfs+2rM+FN73D7r/Ab8zMzMzM/sV7r6L + 77v5J54L7/u/eB54vujTm/3ezMzMzOxXtNsWvg/x+45+50Ph/Si482V/6D672x/NzMzMzF7h7rv39PAJ + 8ecC/J1H4f0oum+D+zawP7/si5v9yczMzMzsFe62edPAt0F+H+AP4/tD4X0f3bexnR/w5WVfdX82MzMz + M3vFO92bBj4xfiL8UXy/N7yfi+7rKfflcwAAwJ20cpv52fi+fuztZ6/uw/v2pPuL61MBAIAn0spt5nPy + /aLwvj3tfhfdl311fSoAAPBEWrnNfOL7/tT7veF9rpjk3krusXx9fSoAAPBEWrnNnHY+V05eFN4/Oe2+ + 7NvrUwEAgCfSym3m+1PvjwrvvLGZgv/u+lQAAOCJtHKbOe384vA+97tvr5l8c9n316cCAABPpJXbzLfX + TdLUaev3hve53/3umsllP1yfCgAAPJFWbjOf6ya397w/Orx/vD4VAAB4Iq3cZv5Z4Z1/pSd3VoQ3AAA8 + kFZuM6edPxje+YNc/j7hfV6sPOH9l+tTAQCAJ9LKbea083nB8oT39QXL68feflZ4AwDA/yOt3GYW3gAA + sJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8 + AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAArae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 +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377VOBm5bWq/l+Xdl/z/Hk4fiwfSpw09J6Nf9Jw5F/XZZ3HsMBn4G0 + Xs2n/UeHI/9Dvvzo4egvRns4ftg+Fbhpab2aT/v9BWkPx/YF6fZj9z9rOADDAfwf0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/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 03ncpwG0oMJBI26bcfvZwVo4TmPnMcMh8gzA9XQe9x8djqvxVBHZNbiezh8djpcxPvwm9jb2LnY5nioi + uwbX03ncpwG0gCbcGw5efvChV7F6QXoWuxhPFZFdg+vpfL0YpQU0YbwYjbXCcbiujKeKyK7B9XQe948K + x/yeo64r49QR4/7zMfY59jX2LfY99iP30zm32ZWnOIu7OIzLOI3bddqYryn1fqMVjrVTR8WDOxBvXvmy + TzG++EuMH+Gc2/ZwFWdxF4dxGacrGmunjQfDsTx1rMWDo0wFhErxxYw/HHHObXvlK+5WMHB6LRrL00Yr + HJSmriwVD44wFRDevPKFFZL3zrnNr0LBcLiCgdsVjbqiLE8bq+GAtXhQnnrfwYN521oB4a/LWIXEObft + 4Wp5W8HAadyu9xprV5QRDeiGY76yVDzm00etfoxzbrubna1TRkVjvqIcFQ7ggxUOxkOWVxZWJ4/a/IOc + c9vc7GydNNh8RWHlf/XggOFw7vltdvbJwuFVxbl9b3YWh8vnR11V1sLBgyhRRaNOGnMsfDnq3K+xJ3g5 + evPiX3UuEEliaqavAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAACqCAYAAABcS6HpAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAfqSURBVHhe7drbbhxlEIXRcIZA + CAlJOIvk/R/S/LtdZbWGTlImvhjaa0l1g6yxb76t7iFPbm5unpTP1n2+7ot1X637Zt13635Y93zdy3Wv + 1/267vd1f677a93f697WvXPOXe11p2k27abhtJym03YaT+tpPu1nA7IF2YRsQzbidjPeMxxfrvt63bfr + nq57tq7H49W6N+vyy35bl1/8x7r8Ec656760mmbTbhpOy2m6RyOtp/m0nw3IFnx0OC6fOo7G48W6HpCs + VH5x7hfn3NVf95p2ezDS9NFoXD5tjIYjS9OvLD0eeYTpAflpXX5hD8nPzrmrvx6KXBruwUjbPRr9inL5 + tHE4HHE0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Acyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nD + Acyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9Wre + cAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2a + NxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv + 5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPW + q3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5kfDERmPHo5v1j1d18PxZvtU4NTSejWf9rMB2YIe + jmzE7Wbc/uzmaDierXuxznDAI5DWq/m0/8nD8Xr7VODU0no1f+/h+HJdfvi7dT+s+2ndq+1TgVNL69V8 + 2s8GZAuyCR8cjnz5kR/6el1/Qfp83cvtU4FTS+vVfH8xmi3IJmxfjK4bDcfd68r2qcCppfVqPu3fazj2 + 33P068r21LEu7z+/rvt93Z/r/lr397q3de+cc1d73WmaTbtpOC2n6bTdTxv715T+fmM0HEdPHT0eeQfK + N6/5Zb+tyy/+Y13+COfcdV9aTbNpNw2n5TTdo3H0tPHR4bh86jgajzzK9IBkpfKLc/mHI865677uNe32 + YKTpo9G4fNoYDUeWpl9ZejzyCNMDkm9e8wt7SH52zl399VDk0nAPRtru0ehXlMunjcPhiKPxyPL09x35 + 4Hzb2gOSf12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5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index d86b8b9..179389d 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -238,5 +239,7 @@ } } + + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 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 + AFhJK7eZhTcAAKykldvMwhsAAFbS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Alrdxm + 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XJ9ZNH3/4Pcs5d5+2b7SeN3P4VJdf99x48MBzOfX63b/Zv + Gw6vKs7d9u2bTcPd8ye9qpwNRz4oS9Sj0U8a+7Hw5ahzz+P+9i9Hz0bj4RVl/Rxw49J6NX/xqWP7sfuf + 3RyHY/+K8nL7VOCmpfVqvl9ZRsOxf9p4GI11r7ZPBW5aWq/mezyOTx0fHY5+Rck7T96BXm+fCty0tF7N + 9/cdx6eOi8Pxl6eNdW+2TwVuWlqv5o9PHU8ajnzbmgV6u30qcNPSejWf9sfD0d9v7F9T8n/hvNs+Fbhp + ab2a37+uZBOyDR8djv5+4+E1Zd377VOBm5bWq/l+Xdl/z/Hk4fiwfSpw09J6Nf9Jw5F/XZZ3HsMBn4G0 + Xs2n/UeHI/9Dvvzo4egvRns4ftg+Fbhpab2aT/v9BWkPx/YF6fZj9z9rOADDAfwf0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/uzkbjlfr3qwzHPAZSOvVfNr/5OF4v30qcNPSejX/ + 5OH4cl1++Jt13677bt277VOBm5bWq/m0nw3IFmQTPjoc+fIjP/TVuv6C9PW6t9unAjctrVfz/cVotiCb + sH0xum40HA+vK9unAjctrVfzaf9Jw7H/nqNfV7anjnV5//lx3c/rfl3327rf1/1R96dz7mqvO02zaTcN + p+U0nbb7aWP/mtLfb4yG4+ypo8cj70D55jW/7Kd1+cW/rMsf4Zy77kuraTbtpuG0nKZ7NM6eNh4djuNT + x9l45FGmByQrlV+cyz8ccc5d93WvabcHI02fjcbxaWM0HFmafmXp8cgjTA9IvnnNL+whcc49j+tu03AP + Rtru0ehXlOPTxulwxKXx6CePvPfkw/ONa49ILv/KzDn3PK67TcNpOU2n7f2TxuloxGPDcTYe/fSxH5G+ + /AHOueu+fbM9Frm0fTYao+GIs/E4DkiPyP76D3DOXe8du+2e94NxcTTiseHoOxuQvvwy59zzvH3Llwaj + 78Gl4WjH/7A/sK9/kXPu+d6x62P3f/HYcLTjB1264x/gnLu+O2v37C66u7t78T/lcmBy0+g2HwAAAABJ + RU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAABbCAYAAACChWtVAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgA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ATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0H + MJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nD + Acyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9Wre + cAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2a + NxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv + 5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPW + q3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5kfDERmPHo5v1j1d18PxZvtU4NTSejWf9rMB2YIe + jmzE7Wbc/uzmaDierXuxznDAI5DWq/m0/8nD8Xr7VODU0no1f+/h+HJdfvi7dT+s+2ndq+1TgV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v1U4NTSejXf47F/6rhzOPoVJe89eQ96tX4qcGppvZpP+/3K + MhqOj542lnuzfipwamm9mt8/dTxoOPKNaxbo7fqpwKml9Wo+7Y+Ho7/f2L6mvF7u3fqpwKml9Wp++7qS + Tcg23Dkc/f3GzWvKcu/XTwVOLa1X8/26sv2e48HD8WH9VODU0no1/0nDkX9llncewwFfgbRezaf9e4cj + f5AvP3o4+ovRHo5f1k8FTi2tV/Npv78g7eFYvyBdf+z6Zw0HYDiA/yGtV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index d86b8b9..179389d 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -238,5 +239,7 @@ } } + + } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index dff1a64..a151c85 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -291,6 +291,7 @@ this.btnExport.TabIndex = 14; this.btnExport.Text = "导出"; this.btnExport.UseVisualStyleBackColor = true; + this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // btnDetail // diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAt4AAAKCCAYAAADm2N7TAAAAIGNIUk0AAHolAACAgwAA+f8AA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 + mYU3AACspJXbzMIbAAB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QBgJa3cZhbeAACw + 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 + vAEAY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ziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/uzkbjlfr3qwzHPAZSOvVfNr/5OF4v30qcNPSejX/ + 5OH4cl1++Jt13677bt277VOBm5bWq/m0nw3IFmQTPjoc+fIjP/TVuv6C9PW6t9unAjctrVfz/cVotiCb + sH0xum40HA+vK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YbwYjbXCcbiujKeKyK7B9XQe948K + x/yeo64r49QR4/7zMfY59jX2LfY99iP30zm32ZWnOIu7OIzLOI3bddqYryn1fqMVjrVTR8WDOxBvXvmy + TzG++EuMH+Gc2/ZwFWdxF4dxGacrGmunjQfDsTx1rMWDo0wFhErxxYw/HHHObXvlK+5WMHB6LRrL00Yr + HJSmriwVD44wFRDevPKFFZL3zrnNr0LBcLiCgdsVjbqiLE8bq+GAtXhQnnrfwYN521oB4a/LWIXEObft + 4Wp5W8HAadyu9xprV5QRDeiGY76yVDzm00etfoxzbrubna1TRkVjvqIcFQ7ggxUOxkOWVxZWJ4/a/IOc + c9vc7GydNNh8RWHlf/XggOFw7vltdvbJwuFVxbl9b3YWh8vnR11V1sLBgyhRRaNOGnMsfDnq3K+xJ3g5 + evPiX3UuEEliaqavAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAACqCAYAAABcS6HpAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAfqSURBVHhe7drbbhxlEIXRcIZA + CAlJOIvk/R/S/LtdZbWGTlImvhjaa0l1g6yxb76t7iFPbm5unpTP1n2+7ot1X637Zt13635Y93zdy3Wv + 1/267vd1f677a93f697WvXPOXe11p2k27abhtJym03YaT+tpPu1nA7IF2YRsQzbidjPeMxxfrvt63bfr + nq57tq7H49W6N+vyy35bl1/8x7r8Ec656760mmbTbhpOy2m6RyOtp/m0nw3IFnx0OC6fOo7G48W6HpCs + VH5x7hfn3NVf95p2ezDS9NFoXD5tjIYjS9OvLD0eeYTpAflpXX5hD8nPzrmrvx6KXBruwUjbPRr9inL5 + tHE4HHE0Hlme/r4jH/z9uh6QH+t6SJxz131ptbvtwUjTabu/1zh6RdlGI6bDsX9l6fHYP3309R/jnLve + 2zfbTxk9GvtXlHsNR+QHezhy+ZDLV5ZcP3n07f8g59x13r7ZftLI7V9Rct1/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HB4VXHu3LdvNg13z5/0 + qnI0HPmgLFGPRj9p7MfCl6PO/T/uAb4cvXnyD/PqkmjKmqRWAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAACGCAYAAAAsJWSkAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAZCSURBVHhe7dpbb9UGEIVR2lIo + FMqlQO9q+/9/ZOrtzESWcZJJ4eFg1pKmDyg94eXbso94dHV15ZxzD7rDP3TOubvu8A+dc+6uu/7P5/GN + c+7i75NNh+Polx/dt865i7+jdo/uVvcNx/6D9n+B75xzX/ztu953/5HbhmP/P/YH9i96vLnvnXNf7G1b + 3g/Jfgdu3DccR4ORX/ak7unufnDOXfztu+2ee0huG5AbR8NxNBrbwdgOxLPlnm/uR+fcxd+22TS8HZT9 + gByOx33DsR+N7VjkL/BiuZd1PznnvpjrbtNwj0mPyNF43Dkct43G+pSx/Bxwcmm9mr91PNYfu/7Z1X44 + tk8az9dPBU4trVfz/eQxGo7t08bNaCz3cv1U4NTSejXf47F/6rhzOPoVJe89eQ96tX4qcGppvZpP+/3K + MhqOj542lnuzfipwamm9mt8/dTxoOPKNaxbo7fqpwKml9Wo+7Y+Ho7/f2L6mvF7u3fqpwKml9Wp++7qS + Tcg23Dkc/f3GzWvKcu/XTwVOLa1X8/26sv2e48HD8WH9VODU0no1/0nDkX9llncewwFfgbRezaf9e4cj + f5AvP3o4+ovRHo5f1k8FTi2tV/Npv78g7eFYvyBdf+z6Zw0HYDiA/yGtV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index d86b8b9..179389d 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -238,5 +239,7 @@ } } + + } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index dff1a64..a151c85 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -291,6 +291,7 @@ this.btnExport.TabIndex = 14; this.btnExport.Text = "导出"; this.btnExport.UseVisualStyleBackColor = true; + this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // btnDetail // diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 61d2987..cbf80fa 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -2,6 +2,7 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using DevComponents.Editors.DateTimeAdv; @@ -10,6 +11,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Windows.Forms; namespace Casic.Birmm.RbFreqStandMeasure.info @@ -22,6 +24,8 @@ private int currentPage = 1; // 当前页码 private int pageCount = 0; // 总页数 private readonly int limitCount = 10; // 每页数据条数,当前页面的表格固定为10条 + DetectionService detectionService = new DetectionServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); JObject condition = new JObject(); // 查询条件 @@ -528,10 +532,105 @@ if (MessageBox.Show("确认删除选中仪器?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + deviceService.delete(Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); MessageBox.Show("删除成功", "提示"); LoadDevList(condition); } } + + private void btnExport_Click(object sender, EventArgs e) + { + string strFilePath = ConfigHelper.GetAppConfig("exportPath") + DateTime.Now.ToString("yyyyMMddHHmmss.csv"); + + long deviceId = Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value); + string deviceName = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[2].Value.ToString(); + string deviceCode = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[4].Value.ToString(); + + List queryList = detectionItemService.search(deviceId, false); + if (null != queryList && queryList.Count > 0) + { + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(deviceName + "(" + deviceCode + ")" + "测试数据及结果"); + strmWriterObj.WriteLine("序号,时间,相对频率偏差"); + + foreach (DetectionItem detectionItem in queryList) + { + string startTime = detectionItem.StartTime.ToString("yyyy-MM-dd HH:mm:ss"); + string endTime = detectionItem.EndTime.ToString("yyyy-MM-dd HH:mm:ss"); + + strmWriterObj.WriteLine("测试起止时间:"+ startTime + "," + endTime); + + for (int type = 1; type < 5; type++) //1-STABILITY,2-ACCURACY,3-BOOT_FEATURE,4-AGE_RATE + { + // 获取数据 + List List = detectionService.search(deviceId, type + "", startTime, endTime); + if (null != List && List.Count > 0) + { + string detecItemName = ""; + + switch (type) + { + case 1: detecItemName = "频率稳定度"; break; + case 2: detecItemName = "频率准确度"; break; + case 3: detecItemName = "开机特性"; break; + case 4: detecItemName = "日老化率"; break; + default: break; + } + strmWriterObj.WriteLine(detecItemName); + int index = 1; + foreach (DetectionDto detection in List) + { + string strBufferLine = index + "," + detection.LogTime + "," + detection.Frequency; + strmWriterObj.WriteLine(strBufferLine); + + index++; + } + } + } + } + strmWriterObj.Close(); + MessageBox.Show("导出成功,存放位置:"+ strFilePath); + } + else + { + MessageBox.Show("所选仪器无测试数据可导出!"); + } + + } + /// +         /// 导出报表为Csv +         /// +         /// DataTable +         /// 物理路径 +         /// 表头 +         /// 字段标题,逗号分隔 + public bool dt2csv(DataTable dt, string strFilePath, string tableheader, string columname) + { + try + { + string strBufferLine = ""; + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(tableheader); + strmWriterObj.WriteLine(columname); + for (int i = 0; i < dt.Rows.Count; i++) + { + strBufferLine = ""; + for (int j = 0; j < dt.Columns.Count; j++) + { + if (j > 0) + strBufferLine += ","; + strBufferLine += dt.Rows[i][j].ToString(); + } + strmWriterObj.WriteLine(strBufferLine); + } + strmWriterObj.Close(); + return true; + } + catch + { + return false; + } + } + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAt4AAAKCCAYAAADm2N7TAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAABk5SURBVHhe7d1bk1vVAYRRkpAQ + CIRLAblXkv//Ix213NulERp7HOiXYa2q5sElH+nxq1374E/evHljZmZmZmbjPfxDMzMzMzP7ZffwD83M + zMzM7Jfd2//8Mn5jZmZmZvYK97O9NLwfffmj/dbMzMzM7BXuUfs+2rM+FN73D7r/Ab8zMzMzM/sV7r6L + 77v5J54L7/u/eB54vujTm/3ezMzMzOxXtNsWvg/x+45+50Ph/Si482V/6D672x/NzMzMzF7h7rv39PAJ + 8ecC/J1H4f0oum+D+zawP7/si5v9yczM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l4AwDA + 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 + 8AYAgJW0cpt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eZhTcAAKykldvMwhsAAFbS + ym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAA + rKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtv + AABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxm + Ft4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpa + uc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCA + lbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuEN + AAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvM + whsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkr + t5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACw + klZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwB + AGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZ + eAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nl + NrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW + 0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcA + AKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjML + bwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3c + ZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBK + WrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYA + gJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbh + DQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXb + zMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJ + K7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAA + sJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8 + AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKb + WXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp + 5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAA + VtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3 + AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4z + C28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt + 3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDA + Slq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AG + AICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m + 4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV + 28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABY + SSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4A + ALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0s + vAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRy + m1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAr + aeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsA + AFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mF + NwAArKSV28zCGwAAVtLKbeYXhXckvk94f3bZF5ed8P7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hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/uzkbjlfr3qwzHPAZSOvVfNr/5OF4v30qcNPSejX/ + 5OH4cl1++Jt13677bt277VOBm5bWq/m0nw3IFmQTPjoc+fIjP/TVuv6C9PW6t9unAjctrVfz/cVotiCb + sH0xum40HA+vK9unAjctrVfzaf9Jw7H/nqNfV7anjnV5//lx3c/rfl3327rf1/1R96dz7mqvO02zaTcN + p+U0nbb7aWP/mtLfb4yG4+ypo8cj70D55jW/7Kd1+cW/rMsf4Zy77kuraTbtpuG0nKZ7NM6eNh4djuNT + x9l45FGmByQrlV+cyz8ccc5d93WvabcHI02fjcbxaWM0HFmafmXp8cgjTA9IvnnNL+whcc49j+tu03AP + Rtru0ehXlOPTxulwxKXx6CePvPfkw/ONa49ILv/KzDn3PK67TcNpOU2n7f2TxuloxGPDcTYe/fSxH5G+ + /AHOueu+fbM9Frm0fTYao+GIs/E4DkiPyP76D3DOXe8du+2e94NxcT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XHz0c/cVoD8cv26cCp5bWq/m031+Q9nBsX5BuP3b7s4YDMBzAf5DWq3nDAcyk9WrecAAzab2a + NxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv + 5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPW + q3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0H + MJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nD + Acyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9Wre + cAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2a + NxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv + 5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPW + q3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0H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7+jdo/uVvcNx/6D9n+B75xzX/ztu953/5HbhmP/P/YH9i96vLnvnXNf7G1b + 3g/Jfgdu3DccR4ORX/ak7unufnDOXfztu+2ee0huG5AbR8NxNBrbwdgOxLPlnm/uR+fcxd+22TS8HZT9 + gByOx33DsR+N7VjkL/BiuZd1PznnvpjrbtNwj0mPyNF43Dkct43G+pSx/Bxwcmm9mr91PNYfu/7Z1X44 + tk8az9dPBU4trVfz/eQxGo7t08bNaCz3cv1U4NTSejXf47F/6rhzOPoVJe89eQ96tX4qcGppvZpP+/3K + MhqOj542lnuzfipwamm9mt8/dTxoOPKNaxbo7fqpwKml9Wo+7Y+Ho7/f2L6mvF7u3fqpwKml9Wp++7qS + Tcg23Dkc/f3GzWvKcu/XTwVOLa1X8/26sv2e48HD8WH9VODU0no1/0nDkX9llncewwFfgbRezaf9e4cj + f5AvP3o4+ovRHo5f1k8FTi2tV/Npv78g7eFYvyBdf+z6Zw0HYDiA/yGtV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index d86b8b9..179389d 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -238,5 +239,7 @@ } } + + } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index dff1a64..a151c85 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -291,6 +291,7 @@ this.btnExport.TabIndex = 14; this.btnExport.Text = "导出"; this.btnExport.UseVisualStyleBackColor = true; + this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // btnDetail // diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 61d2987..cbf80fa 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -2,6 +2,7 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using DevComponents.Editors.DateTimeAdv; @@ -10,6 +11,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Windows.Forms; namespace Casic.Birmm.RbFreqStandMeasure.info @@ -22,6 +24,8 @@ private int currentPage = 1; // 当前页码 private int pageCount = 0; // 总页数 private readonly int limitCount = 10; // 每页数据条数,当前页面的表格固定为10条 + DetectionService detectionService = new DetectionServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); JObject condition = new JObject(); // 查询条件 @@ -528,10 +532,105 @@ if (MessageBox.Show("确认删除选中仪器?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + deviceService.delete(Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); MessageBox.Show("删除成功", "提示"); LoadDevList(condition); } } + + private void btnExport_Click(object sender, EventArgs e) + { + string strFilePath = ConfigHelper.GetAppConfig("exportPath") + DateTime.Now.ToString("yyyyMMddHHmmss.csv"); + + long deviceId = Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value); + string deviceName = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[2].Value.ToString(); + string deviceCode = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[4].Value.ToString(); + + List queryList = detectionItemService.search(deviceId, false); + if (null != queryList && queryList.Count > 0) + { + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(deviceName + "(" + deviceCode + ")" + "测试数据及结果"); + strmWriterObj.WriteLine("序号,时间,相对频率偏差"); + + foreach (DetectionItem detectionItem in queryList) + { + string startTime = detectionItem.StartTime.ToString("yyyy-MM-dd HH:mm:ss"); + string endTime = detectionItem.EndTime.ToString("yyyy-MM-dd HH:mm:ss"); + + strmWriterObj.WriteLine("测试起止时间:"+ startTime + "," + endTime); + + for (int type = 1; type < 5; type++) //1-STABILITY,2-ACCURACY,3-BOOT_FEATURE,4-AGE_RATE + { + // 获取数据 + List List = detectionService.search(deviceId, type + "", startTime, endTime); + if (null != List && List.Count > 0) + { + string detecItemName = ""; + + switch (type) + { + case 1: detecItemName = "频率稳定度"; break; + case 2: detecItemName = "频率准确度"; break; + case 3: detecItemName = "开机特性"; break; + case 4: detecItemName = "日老化率"; break; + default: break; + } + strmWriterObj.WriteLine(detecItemName); + int index = 1; + foreach (DetectionDto detection in List) + { + string strBufferLine = index + "," + detection.LogTime + "," + detection.Frequency; + strmWriterObj.WriteLine(strBufferLine); + + index++; + } + } + } + } + strmWriterObj.Close(); + MessageBox.Show("导出成功,存放位置:"+ strFilePath); + } + else + { + MessageBox.Show("所选仪器无测试数据可导出!"); + } + + } + /// +         /// 导出报表为Csv +         /// +         /// DataTable +         /// 物理路径 +         /// 表头 +         /// 字段标题,逗号分隔 + public bool dt2csv(DataTable dt, string strFilePath, string tableheader, string columname) + { + try + { + string strBufferLine = ""; + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(tableheader); + strmWriterObj.WriteLine(columname); + for (int i = 0; i < dt.Rows.Count; i++) + { + strBufferLine = ""; + for (int j = 0; j < dt.Columns.Count; j++) + { + if (j > 0) + strBufferLine += ","; + strBufferLine += dt.Rows[i][j].ToString(); + } + strmWriterObj.WriteLine(strBufferLine); + } + strmWriterObj.Close(); + return true; + } + catch + { + return false; + } + } + } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7f9c9c9..f60767b 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -44,7 +44,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 100; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -69,7 +68,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(83, 27); this.label_devModel.TabIndex = 98; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label9 diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAt4AAAKCCAYAAADm2N7TAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAABk5SURBVHhe7d1bk1vVAYRRkpAQ + CIRLAblXkv//Ix213NulERp7HOiXYa2q5sElH+nxq1374E/evHljZmZmZmbjPfxDMzMzMzP7ZffwD83M + zMzM7Jfd2//8Mn5jZmZmZvYK97O9NLwfffmj/dbMzMzM7BXuUfs+2rM+FN73D7r/Ab8zMzMzM/sV7r6L + 77v5J54L7/u/eB54vujTm/3ezMzMzOxXtNsWvg/x+45+50Ph/Si482V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 + s/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wtvAABYSSu3mYU3AACspJXbzMIbAABW + 0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcA + AKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjML + bwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3c + ZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBK + WrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYA + gJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbh + DQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXb + zMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJ + K7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAA + sJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8 + AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKb + WXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp + 5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAA + VtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3 + AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4z + C28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt + 3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDA + Slq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AG + AICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m + 4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV + 28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABY + SSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4A + ALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0s + vAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRy + m1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAr + aeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsA + AFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mF + NwAArKSV28zCGwAAVtLKbeYXhXckvk94f3bZF5ed8P7x+lQAAOCJtHKbOe2chk5Ln/BOY79t7refvXoU + 3l9d9u1lwhsAAB5IK7eZ084/O7x/uD4VAAB4Iq3cZv7o8P70snz488u+vOyby76/PhUAAHgirdxmTjun + odPSaer3hncuf+dDf7jsvGD59WXfXZ8KAAA8kVZuM58XK9PSaerri5WXvSi83103uT4VAAB4Iq3cZk47 + f1R4397zPtdNrqfel+X+yl8v+/tl/7zsX5f9+7L/dP81MzMzM3tFO52b5k37poHTwmnitPE57b69ZnLu + d78ovB+dep/4zh2WvLmZL/vbZfnif1yWH2FmZmZm9tqW1k3zpn3TwGnhNPGJ7ken3R8M7/tT70fxnaP0 + E+Cp/Hxxlv9xuJmZmZnZa9vp3bTvCe408aPovj/tflF4p9TPlZMT3zlCPwGeNzfzhSfEzczMzMxe6073 + poFPcKeNT3SfKyb3p90Pwzuei+9z8p17K3l43tg8EZ7lX+kxMzMzM3utO92bBk4Lp4nTxrcn3Q+jOz4U + 3o/i+5x+30b4WX6AmZmZmdlr223zntjO0saPovtF4R2P4vs+wE+E3+78ADMzMzOz17T77j09fBvcz0Z3 + fCi8zx4F+Fm+zMzMzMzs17LbFn4uuM/eeS68j/u/eB54dr7IzMzMzOzXtPsuvu/mn/hQeB/3D3pu9z/A + zMzMzOw17FH7Ptqz3rx588n/ADXM9RyjcON4AAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAACSCAYAAAC0YiQpAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAdJSURBVHhe7dpdcxzlFYVRJxAI + Do6xsc13Af//Ryrvbp2j6mp6rKOYi9F4rapzkxIj3Ty7uid+cXd396L8Y90/132x7l/rvl73zbpv171e + 93bd+3U/rvt53a/rflv3+7o/6v50zl3tdadpNu2m4bScptN2Gk/raT7tZ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1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/uzkbjlfr3qwzHPAZSOvVfNr/5OF4v30qcNPSejX/ + 5OH4cl1++Jt13677bt277VOBm5bWq/m0nw3IFmQTPjoc+fIjP/TVuv6C9PW6t9unAjctrVfz/cVotiCb + sH0xum40HA+vK9unAjctrVfzaf9Jw7H/nqNfV7anjnV5//lx3c/rfl3327rf1/1R96dz7mqvO02zaTcN + p+U0nbb7aWP/mtLfb4yG4+ypo8cj70D55jW/7Kd1+cW/rMsf4Zy77kuraTbtpuG0nKZ7NM6eNh4djuNT + x9l45FGmByQrlV+cyz8ccc5d93WvabcHI02fjcbxaWM0HFmafmXp8cgjTA9IvnnNL+whcc49j+tu03AP + Rtru0ehXlOPTxulwxKXx6CePvPfkw/ONa49ILv/KzDn3PK67TcNpOU2n7f2TxuloxGPDcTYe/fSxH5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dHV15ZxzD7rDP3TOubvu8A+dc+6uu/7P5/GN + c+7i75NNh+Polx/dt865i7+jdo/uVvcNx/6D9n+B75xzX/ztu953/5HbhmP/P/YH9i96vLnvnXNf7G1b + 3g/Jfgdu3DccR4ORX/ak7unufnDOXfztu+2ee0huG5AbR8NxNBrbwdgOxLPlnm/uR+fcxd+22TS8HZT9 + gByOx33DsR+N7VjkL/BiuZd1PznnvpjrbtNwj0mPyNF43Dkct43G+pSx/Bxwcmm9mr91PNYfu/7Z1X44 + tk8az9dPBU4trVfz/eQxGo7t08bNaCz3cv1U4NTSejXf47F/6rhzOPoVJe89eQ96tX4qcGppvZpP+/3K + MhqOj542lnuzfipwamm9mt8/dTxoOPKNaxbo7fqpwKml9Wo+7Y+Ho7/f2L6mvF7u3fqpwKml9Wp++7qS + Tcg23Dkc/f3GzWvKcu/XTwVOLa1X8/26sv2e48HD8WH9VODU0no1/0nDkX9llncewwFfgbRezaf9e4cj + f5AvP3o4+ovRHo5f1k8FTi2tV/Npv78g7eFYvyBdf+z6Zw0HYDiA/yGtV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index d86b8b9..179389d 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -238,5 +239,7 @@ } } + + } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index dff1a64..a151c85 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -291,6 +291,7 @@ this.btnExport.TabIndex = 14; this.btnExport.Text = "导出"; this.btnExport.UseVisualStyleBackColor = true; + this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // btnDetail // diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 61d2987..cbf80fa 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -2,6 +2,7 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using DevComponents.Editors.DateTimeAdv; @@ -10,6 +11,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Windows.Forms; namespace Casic.Birmm.RbFreqStandMeasure.info @@ -22,6 +24,8 @@ private int currentPage = 1; // 当前页码 private int pageCount = 0; // 总页数 private readonly int limitCount = 10; // 每页数据条数,当前页面的表格固定为10条 + DetectionService detectionService = new DetectionServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); JObject condition = new JObject(); // 查询条件 @@ -528,10 +532,105 @@ if (MessageBox.Show("确认删除选中仪器?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + deviceService.delete(Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); MessageBox.Show("删除成功", "提示"); LoadDevList(condition); } } + + private void btnExport_Click(object sender, EventArgs e) + { + string strFilePath = ConfigHelper.GetAppConfig("exportPath") + DateTime.Now.ToString("yyyyMMddHHmmss.csv"); + + long deviceId = Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value); + string deviceName = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[2].Value.ToString(); + string deviceCode = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[4].Value.ToString(); + + List queryList = detectionItemService.search(deviceId, false); + if (null != queryList && queryList.Count > 0) + { + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(deviceName + "(" + deviceCode + ")" + "测试数据及结果"); + strmWriterObj.WriteLine("序号,时间,相对频率偏差"); + + foreach (DetectionItem detectionItem in queryList) + { + string startTime = detectionItem.StartTime.ToString("yyyy-MM-dd HH:mm:ss"); + string endTime = detectionItem.EndTime.ToString("yyyy-MM-dd HH:mm:ss"); + + strmWriterObj.WriteLine("测试起止时间:"+ startTime + "," + endTime); + + for (int type = 1; type < 5; type++) //1-STABILITY,2-ACCURACY,3-BOOT_FEATURE,4-AGE_RATE + { + // 获取数据 + List List = detectionService.search(deviceId, type + "", startTime, endTime); + if (null != List && List.Count > 0) + { + string detecItemName = ""; + + switch (type) + { + case 1: detecItemName = "频率稳定度"; break; + case 2: detecItemName = "频率准确度"; break; + case 3: detecItemName = "开机特性"; break; + case 4: detecItemName = "日老化率"; break; + default: break; + } + strmWriterObj.WriteLine(detecItemName); + int index = 1; + foreach (DetectionDto detection in List) + { + string strBufferLine = index + "," + detection.LogTime + "," + detection.Frequency; + strmWriterObj.WriteLine(strBufferLine); + + index++; + } + } + } + } + strmWriterObj.Close(); + MessageBox.Show("导出成功,存放位置:"+ strFilePath); + } + else + { + MessageBox.Show("所选仪器无测试数据可导出!"); + } + + } + /// +         /// 导出报表为Csv +         /// +         /// DataTable +         /// 物理路径 +         /// 表头 +         /// 字段标题,逗号分隔 + public bool dt2csv(DataTable dt, string strFilePath, string tableheader, string columname) + { + try + { + string strBufferLine = ""; + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(tableheader); + strmWriterObj.WriteLine(columname); + for (int i = 0; i < dt.Rows.Count; i++) + { + strBufferLine = ""; + for (int j = 0; j < dt.Columns.Count; j++) + { + if (j > 0) + strBufferLine += ","; + strBufferLine += dt.Rows[i][j].ToString(); + } + strmWriterObj.WriteLine(strBufferLine); + } + strmWriterObj.Close(); + return true; + } + catch + { + return false; + } + } + } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7f9c9c9..f60767b 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -44,7 +44,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 100; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -69,7 +68,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(83, 27); this.label_devModel.TabIndex = 98; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label9 diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 3a62610..c676897 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -72,7 +72,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 116; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -97,7 +96,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 @@ -122,7 +120,6 @@ this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); this.label3.TabIndex = 119; - this.label3.Text = "111"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label5 @@ -159,7 +156,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // ageRate diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAt4AAAKCCAYAAADm2N7TAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAABk5SURBVHhe7d1bk1vVAYRRkpAQ + CIRLAblXkv//Ix213NulERp7HOiXYa2q5sElH+nxq1374E/evHljZmZmZmbjPfxDMzMzMzP7ZffwD83M + zMzM7Jfd2//8Mn5jZmZmZvYK97O9NLwfffmj/dbMzMzM7BXuUfs+2rM+FN73D7r/Ab8zMzMzM/sV7r6L + 77v5J54L7/u/eB54vujTm/3ezMzMzOxXtNsWvg/x+45+50Ph/Si482V/6D672x/NzMzMzF7h7rv39PAJ + 8ecC/J1H4f0oum+D+zawP7/si5v9yczMzMzsFe62edPAt0F+H+AP4/tD4X0f3bexnR/w5WVfdX82MzMz + M3vFO92bBj4xfiL8UXy/N7yfi+7rKfflcwAAwJ20cpv52fi+fuztZ6/uw/v2pPuL61MBAIAn0spt5nPy + /aLwvj3tfhfdl311fSoAAPBEWrnNfOL7/tT7veF9rpjk3krusXx9fSoAAPBEWrnNnHY+V05eFN4/Oe2+ + 7NvrUwEAgCfSym3m+1PvjwrvvLGZgv/u+lQAAOCJtHKbOe384vA+97tvr5l8c9n316cCAABPpJXbzLfX + T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ASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABY + SSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4A + ALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0s + vAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRy + m1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAr + aeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsA + AFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mF + NwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZu + MwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAl + rdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMA + wEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPw + BgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0spt + ZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKyk + ldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAA + WEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbe + AACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnN + LLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0 + cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAA + K2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIb + AABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZ + hTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJW + bjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBg + Ja3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgD + AMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz + 8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLK + bWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACs + pJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28A + AFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEp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AAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpa + uc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCA + lbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuEN + AAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvM + whsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkr + t5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACw + klZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwB + AGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZ + eAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nl + NrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW + 0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcA + AKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjML + bwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3c + ZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBK +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spJXbzMIbAABW0sptZuENAAAraeU2s/AG + AICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m + 4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV + 28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABY + SSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4A + ALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0s + vAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRy + m1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAr + aeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsA + AFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mF + NwAArKSV28zCGwAAVtLKbeYXhXckvk94f3bZF5ed8P7x+lQAAOCJtHKbOe2chk5Ln/BOY79t7refvXoU + 3l9d9u1lwhsAAB5IK7eZ084/O7x/uD4VAAB4Iq3cZv7o8P70snz488u+vOyby76/PhUAAHgirdxmTjun + odPSaer3hncuf+dDf7jsvGD59WXfXZ8KAAA8kVZuM58XK9PSaerri5WXvSi83103uT4VAAB4Iq3cZk47 + f1R4397zPtdNrqfel+X+yl8v+/tl/7zsX5f9+7L/dP81MzMzM3tFO52b5k37poHTwmnitPE57b69ZnLu + d78ovB+dep/4zh2WvLmZL/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x48MBzOfX63b/Zv + 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 + RU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAABbCAYAAACChWtVAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAW2SURBVHhe7ZrdThxXEAadxLFj + YoLBgP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ATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0H + MJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nD + Acyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9Wre + cAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2a + NxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv + 5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPW + q3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5kfDERmPHo5v1j1d18PxZvtU4NTSejWf9rMB2YIe + jmzE7Wbc/uzmaDierXuxznDAI5DWq/m0/8nD8Xr7VODU0no1f+/h+HJdfvi7dT+s+2ndq+1TgVNL69V8 + 2s8GZAuyCR8cjnz5kR/6el1/Q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GppvZpP+/3K + MhqOj542lnuzfipwamm9mt8/dTxoOPKNaxbo7fqpwKml9Wo+7Y+Ho7/f2L6mvF7u3fqpwKml9Wp++7qS + Tcg23Dkc/f3GzWvKcu/XTwVOLa1X8/26sv2e48HD8WH9VODU0no1/0nDkX9llncewwFfgbRezaf9e4cj + f5AvP3o4+ovRHo5f1k8FTi2tV/Npv78g7eFYvyBdf+z6Zw0HYDiA/yGtV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index d86b8b9..179389d 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -238,5 +239,7 @@ } } + + } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index dff1a64..a151c85 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -291,6 +291,7 @@ this.btnExport.TabIndex = 14; this.btnExport.Text = "导出"; this.btnExport.UseVisualStyleBackColor = true; + this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // btnDetail // diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 61d2987..cbf80fa 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -2,6 +2,7 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using DevComponents.Editors.DateTimeAdv; @@ -10,6 +11,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Windows.Forms; namespace Casic.Birmm.RbFreqStandMeasure.info @@ -22,6 +24,8 @@ private int currentPage = 1; // 当前页码 private int pageCount = 0; // 总页数 private readonly int limitCount = 10; // 每页数据条数,当前页面的表格固定为10条 + DetectionService detectionService = new DetectionServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); JObject condition = new JObject(); // 查询条件 @@ -528,10 +532,105 @@ if (MessageBox.Show("确认删除选中仪器?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + deviceService.delete(Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); MessageBox.Show("删除成功", "提示"); LoadDevList(condition); } } + + private void btnExport_Click(object sender, EventArgs e) + { + string strFilePath = ConfigHelper.GetAppConfig("exportPath") + DateTime.Now.ToString("yyyyMMddHHmmss.csv"); + + long deviceId = Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value); + string deviceName = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[2].Value.ToString(); + string deviceCode = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[4].Value.ToString(); + + List queryList = detectionItemService.search(deviceId, false); + if (null != queryList && queryList.Count > 0) + { + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(deviceName + "(" + deviceCode + ")" + "测试数据及结果"); + strmWriterObj.WriteLine("序号,时间,相对频率偏差"); + + foreach (DetectionItem detectionItem in queryList) + { + string startTime = detectionItem.StartTime.ToString("yyyy-MM-dd HH:mm:ss"); + string endTime = detectionItem.EndTime.ToString("yyyy-MM-dd HH:mm:ss"); + + strmWriterObj.WriteLine("测试起止时间:"+ startTime + "," + endTime); + + for (int type = 1; type < 5; type++) //1-STABILITY,2-ACCURACY,3-BOOT_FEATURE,4-AGE_RATE + { + // 获取数据 + List List = detectionService.search(deviceId, type + "", startTime, endTime); + if (null != List && List.Count > 0) + { + string detecItemName = ""; + + switch (type) + { + case 1: detecItemName = "频率稳定度"; break; + case 2: detecItemName = "频率准确度"; break; + case 3: detecItemName = "开机特性"; break; + case 4: detecItemName = "日老化率"; break; + default: break; + } + strmWriterObj.WriteLine(detecItemName); + int index = 1; + foreach (DetectionDto detection in List) + { + string strBufferLine = index + "," + detection.LogTime + "," + detection.Frequency; + strmWriterObj.WriteLine(strBufferLine); + + index++; + } + } + } + } + strmWriterObj.Close(); + MessageBox.Show("导出成功,存放位置:"+ strFilePath); + } + else + { + MessageBox.Show("所选仪器无测试数据可导出!"); + } + + } + /// +         /// 导出报表为Csv +         /// +         /// DataTable +         /// 物理路径 +         /// 表头 +         /// 字段标题,逗号分隔 + public bool dt2csv(DataTable dt, string strFilePath, string tableheader, string columname) + { + try + { + string strBufferLine = ""; + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(tableheader); + strmWriterObj.WriteLine(columname); + for (int i = 0; i < dt.Rows.Count; i++) + { + strBufferLine = ""; + for (int j = 0; j < dt.Columns.Count; j++) + { + if (j > 0) + strBufferLine += ","; + strBufferLine += dt.Rows[i][j].ToString(); + } + strmWriterObj.WriteLine(strBufferLine); + } + strmWriterObj.Close(); + return true; + } + catch + { + return false; + } + } + } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7f9c9c9..f60767b 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -44,7 +44,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 100; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -69,7 +68,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(83, 27); this.label_devModel.TabIndex = 98; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label9 diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 3a62610..c676897 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -72,7 +72,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 116; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -97,7 +96,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 @@ -122,7 +120,6 @@ this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); this.label3.TabIndex = 119; - this.label3.Text = "111"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label5 @@ -159,7 +156,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // ageRate diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index 133d6b5..8993819 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -71,7 +71,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 107; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -96,7 +95,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); this.label_customerName.TabIndex = 103; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label_devModel @@ -109,7 +107,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 102; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAt4AAAKCCAYAAADm2N7TAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAABk5SURBVHhe7d1bk1vVAYRRkpAQ + CIRLAblXkv//Ix213NulERp7HOiXYa2q5sElH+nxq1374E/evHljZmZmZmbjPfxDMzMzMzP7ZffwD83M + zMzM7Jfd2//8Mn5jZmZmZvYK97O9NLwfffmj/dbMzMzM7BXuUfs+2rM+FN73D7r/Ab8zMzMzM/sV7r6L + 77v5J54L7/u/eB54vujTm/3ezMzMzOxXtNsWvg/x+45+50Ph/Si482V/6D672x/NzMzMzF7h7rv39PAJ + 8ecC/J1H4f0oum+D+zawP7/si5v9yczMzMzsFe62edPAt0F+H+AP4/tD4X0f3bexnR/w5WVfdX82MzMz + M3vFO92bBj4xfiL8UXy/N7yfi+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Bm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/uzkbjlfr3qwzHPAZSOvVfNr/5OF4v30qcNPSejX/ + 5OH4cl1++Jt13677bt277VOBm5bWq/m0nw3IFmQTPjoc+fIjP/TVuv6C9PW6t9unAjctrVfz/cVotiCb + sH0xum40HA+vK9unAjctrVfzaf9Jw7H/nqNfV7anjnV5//lx3c/rfl3327rf1/1R96dz7mqvO02zaTcN + p+U0nbb7aWP/mtLfb4yG4+ypo8cj70D55jW/7Kd1+cW/rMsf4Zy77kuraTbtpuG0nKZ7NM6eNh4djuNT + x9l45FGmByQrlV+cyz8ccc5d93WvabcHI02fjcbxaWM0HFmafmXp8cgjTA9IvnnNL+whcc49j+tu03AP + Rtru0ehXlOPTxulwxKXx6CePvPfkw/ONa49ILv/KzDn3PK67TcNpOU2n7f2TxuloxGPDcTYe/fSxH5G+ + /AHOueu+fbM9Frm0fTYao+GIs/E4DkiPyP76D3DOXe8du+2e94NxcTTiseHoOxuQvvwy59zzvH3Llwaj + 78Gl4WjH/7A/sK9/kXPu+d6x62P3f/HYcLTjB1264x/gnLu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NxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv + 5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPW + q3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0H + MJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nD + Acyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9Wre + cAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2a + NxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv + 5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPW + q3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJ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4ORX/ak7unufnDOXfztu+2ee0huG5AbR8NxNBrbwdgOxLPlnm/uR+fcxd+22TS8HZT9 + gByOx33DsR+N7VjkL/BiuZd1PznnvpjrbtNwj0mPyNF43Dkct43G+pSx/Bxwcmm9mr91PNYfu/7Z1X44 + tk8az9dPBU4trVfz/eQxGo7t08bNaCz3cv1U4NTSejXf47F/6rhzOPoVJe89eQ96tX4qcGppvZpP+/3K + MhqOj542lnuzfipwamm9mt8/dTxoOPKNaxbo7fqpwKml9Wo+7Y+Ho7/f2L6mvF7u3fqpwKml9Wp++7qS + Tcg23Dkc/f3GzWvKcu/XTwVOLa1X8/26sv2e48HD8WH9VODU0no1/0nDkX9llncewwFfgbRezaf9e4cj + f5AvP3o4+ovRHo5f1k8FTi2tV/Npv78g7eFYvyBdf+z6Zw0HYDiA/yGtV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index d86b8b9..179389d 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -238,5 +239,7 @@ } } + + } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index dff1a64..a151c85 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -291,6 +291,7 @@ this.btnExport.TabIndex = 14; this.btnExport.Text = "导出"; this.btnExport.UseVisualStyleBackColor = true; + this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // btnDetail // diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 61d2987..cbf80fa 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -2,6 +2,7 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using DevComponents.Editors.DateTimeAdv; @@ -10,6 +11,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Windows.Forms; namespace Casic.Birmm.RbFreqStandMeasure.info @@ -22,6 +24,8 @@ private int currentPage = 1; // 当前页码 private int pageCount = 0; // 总页数 private readonly int limitCount = 10; // 每页数据条数,当前页面的表格固定为10条 + DetectionService detectionService = new DetectionServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); JObject condition = new JObject(); // 查询条件 @@ -528,10 +532,105 @@ if (MessageBox.Show("确认删除选中仪器?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + deviceService.delete(Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); MessageBox.Show("删除成功", "提示"); LoadDevList(condition); } } + + private void btnExport_Click(object sender, EventArgs e) + { + string strFilePath = ConfigHelper.GetAppConfig("exportPath") + DateTime.Now.ToString("yyyyMMddHHmmss.csv"); + + long deviceId = Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value); + string deviceName = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[2].Value.ToString(); + string deviceCode = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[4].Value.ToString(); + + List queryList = detectionItemService.search(deviceId, false); + if (null != queryList && queryList.Count > 0) + { + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(deviceName + "(" + deviceCode + ")" + "测试数据及结果"); + strmWriterObj.WriteLine("序号,时间,相对频率偏差"); + + foreach (DetectionItem detectionItem in queryList) + { + string startTime = detectionItem.StartTime.ToString("yyyy-MM-dd HH:mm:ss"); + string endTime = detectionItem.EndTime.ToString("yyyy-MM-dd HH:mm:ss"); + + strmWriterObj.WriteLine("测试起止时间:"+ startTime + "," + endTime); + + for (int type = 1; type < 5; type++) //1-STABILITY,2-ACCURACY,3-BOOT_FEATURE,4-AGE_RATE + { + // 获取数据 + List List = detectionService.search(deviceId, type + "", startTime, endTime); + if (null != List && List.Count > 0) + { + string detecItemName = ""; + + switch (type) + { + case 1: detecItemName = "频率稳定度"; break; + case 2: detecItemName = "频率准确度"; break; + case 3: detecItemName = "开机特性"; break; + case 4: detecItemName = "日老化率"; break; + default: break; + } + strmWriterObj.WriteLine(detecItemName); + int index = 1; + foreach (DetectionDto detection in List) + { + string strBufferLine = index + "," + detection.LogTime + "," + detection.Frequency; + strmWriterObj.WriteLine(strBufferLine); + + index++; + } + } + } + } + strmWriterObj.Close(); + MessageBox.Show("导出成功,存放位置:"+ strFilePath); + } + else + { + MessageBox.Show("所选仪器无测试数据可导出!"); + } + + } + /// +         /// 导出报表为Csv +         /// +         /// DataTable +         /// 物理路径 +         /// 表头 +         /// 字段标题,逗号分隔 + public bool dt2csv(DataTable dt, string strFilePath, string tableheader, string columname) + { + try + { + string strBufferLine = ""; + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(tableheader); + strmWriterObj.WriteLine(columname); + for (int i = 0; i < dt.Rows.Count; i++) + { + strBufferLine = ""; + for (int j = 0; j < dt.Columns.Count; j++) + { + if (j > 0) + strBufferLine += ","; + strBufferLine += dt.Rows[i][j].ToString(); + } + strmWriterObj.WriteLine(strBufferLine); + } + strmWriterObj.Close(); + return true; + } + catch + { + return false; + } + } + } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7f9c9c9..f60767b 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -44,7 +44,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 100; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -69,7 +68,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(83, 27); this.label_devModel.TabIndex = 98; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label9 diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 3a62610..c676897 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -72,7 +72,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 116; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -97,7 +96,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 @@ -122,7 +120,6 @@ this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); this.label3.TabIndex = 119; - this.label3.Text = "111"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label5 @@ -159,7 +156,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // ageRate diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index 133d6b5..8993819 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -71,7 +71,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 107; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -96,7 +95,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); this.label_customerName.TabIndex = 103; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label_devModel @@ -109,7 +107,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 102; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 diff --git a/RbFreqStandMeasure/info/stability.designer.cs b/RbFreqStandMeasure/info/stability.designer.cs index 0a6b17e..63e8678 100644 --- a/RbFreqStandMeasure/info/stability.designer.cs +++ b/RbFreqStandMeasure/info/stability.designer.cs @@ -46,7 +46,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); this.label_customerName.TabIndex = 82; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label_devModel @@ -59,7 +58,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 81; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 @@ -96,7 +94,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 86; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 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 +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V28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCA + 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 + E+Cp/Hxxlv9xuJmZmZnZa9vp3bTvCe408aPovj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sfuf + 3RyHY/+K8nL7VOCmpfVqvl9ZRsOxf9p4GI11r7ZPBW5aWq/mezyOTx0fHY5+Rck7T96BXm+fCty0tF7N + 9/cdx6eOi8Pxl6eNdW+2TwVuWlqv5o9PHU8ajnzbmgV6u30qcNPSejWf9sfD0d9v7F9T8n/hvNs+Fbhp + ab2a37+uZBOyDR8djv5+4+E1Zd377VOBm5bWq/l+Xdl/z/Hk4fiwfSpw09J6Nf9Jw5F/XZZ3HsMBn4G0 + Xs2n/UeHI/9Dvvzo4egvRns4ftg+Fbhpab2aT/v9BWkPx/YF6fZj9z9rOADDAfwf0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/uzkbjlfr3qwzHPAZSOvVfNr/5OF4v30qcNPSejX/ + 5OH4cl1++Jt13677bt277VOBm5bWq/m0nw3IFmQTPjoc+fIjP/TVuv6C9PW6t9unAjctrVfz/cVotiCb + sH0xum40HA+vK9unAjctrVfzaf9Jw7H/nqNfV7anjnV5//lx3c/rfl3327rf1/1R96dz7mqvO02zaTcN + p+U0nbb7aWP/mtLfb4yG4+ypo8cj70D55jW/7Kd1+cW/rMsf4Zy77kuraTbtpuG0nKZ7NM6eNh4djuNT + x9l45FGmByQrlV+cyz8ccc5d93WvabcHI02fjcbxaWM0HFmafmXp8cgjTA9IvnnNL+whcc49j+tu03AP + Rtru0ehXlOPTxulwxKXx6CePvPfkw/ONa49ILv/KzDn3PK67TcNpOU2n7f2TxuloxGPDcTYe/fSxH5G+ + /AHOueu+fbM9Frm0fTYao+GIs/E4DkiPyP76D3DOXe8du+2e94NxcTTiseHoOxuQvvwy59zzvH3Llwaj + 78Gl4WjH/7A/sK9/kXPu+d6x62P3f/HYcLTjB1264x/gnLu+O2v37C66u7t78T/lcmBy0+g2HwAAAABJ + RU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAABbCAYAAACChWtVAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAW2SURBVHhe7ZrdThxXEAadxLFj + YoLBgP9l+/0fknQduldHkwF6AxfjoUr6bqzV7N5U6ZwxL25ubl4kv8V+j/0R+zP2OvYm9jZ2FruIXcU+ + xj7Hvsa+xb7HfuR+Ouc2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fzhkNEeuB6Om84RKQHrqfzhkNEeuB6Om84RKQH + rqfzhkNEeuB6Om84RKQHrqfzhkNEeuB6Om84RKQHrqfzhkNEeuB6Om84RKQHrqfzhkNEeuB6Om84RKQH + rqfzhkNEeuB6Om84RKQHrqfzhkNEeuB6Om84RKQHrqfzhkNEeuB6Ot8KBxCPCsfr2EmswnE9nioiuwbX + 03ncpwG0oMJBI26bcfvZwVo4TmPnMcMh8gzA9XQe9x8djqvxVBHZNbiezh8djpcxPvwm9jb2LnY5nioi + uwbX03ncpwG0gCbcGw5efvChV7F6QXoWuxhPFZFdg+vpfL0YpQU0YbwYjbXCcbiujKeKyK7B9XQe948K + x/yeo64r49QR4/7zMfY59jX2LfY99iP30zm32ZWnOIu7OIzLOI3bddqYryn1fqMVjrVTR8WDOxBvXvmy + TzG++EuMH+Gc2/ZwFWdxF4dxGacrGmunjQfDsTx1rMWDo0wFhErxxYw/HHHObXvlK+5WMHB6LRrL00Yr + HJSmriwVD44wFRDevPKFFZL3zrnNr0LBcLiCgdsVjbqiLE8bq+GAtXhQnnrfwYN521oB4a/LWIXEObft + 4Wp5W8HAadyu9xprV5QRDeiGY76yVDzm00etfoxzbrubna1TRkVjvqIcFQ7ggxUOxkOWVxZWJ4/a/IOc + c9vc7GydNNh8RWHlf/XggOFw7vltdvbJwuFVxbl9b3YWh8vnR11V1sLBgyhRRaNOGnMsfDnq3K+xJ3g5 + evPiX3UuEEliaqavAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAACqCAYAAABcS6HpAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAfqSURBVHhe7drbbhxlEIXRcIZA + CAlJOIvk/R/S/LtdZbWGTlImvhjaa0l1g6yxb76t7iFPbm5unpTP1n2+7ot1X637Zt13635Y93zdy3Wv + 1/267vd1f677a93f697WvXPOXe11p2k27abhtJym03YaT+tp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+ ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0H + MJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nD + Acyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9Wre + cAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2a + NxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv + 5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPW + q3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk + 9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAz + ab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzA + TFqv5g0HMJPWq3nDAcyk9WrecAAzab2aNxzATFqv5kfDERmPHo5v1j1d18PxZvtU4NTSejWf9rMB2YIe + jmzE7Wbc/uzmaDierXuxznDAI5DWq/m0/8nD8Xr7VODU0no1f+/h+HJdfvi7dT+s+2ndq+1TgVNL69V8 + 2s8GZAuyCR8cjnz5kR/6el1/Qfp83cvtU4FTS+vVfH8xmi3IJmxfjK4bDcfd68r2qcCppfVqPu3fazj2 + 33P068r21LEu7z+/rvt93Z/r/lr397q3de+cc1d73WmaTbtpO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dkc/f3GzWvKcu/XTwVOLa1X8/26sv2e48HD8WH9VODU0no1/0nDkX9llncewwFfgbRezaf9e4cj + f5AvP3o4+ovRHo5f1k8FTi2tV/Npv78g7eFYvyBdf+z6Zw0HYDiA/yGtV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index d86b8b9..179389d 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -238,5 +239,7 @@ } } + + } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index dff1a64..a151c85 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -291,6 +291,7 @@ this.btnExport.TabIndex = 14; this.btnExport.Text = "导出"; this.btnExport.UseVisualStyleBackColor = true; + this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // btnDetail // diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 61d2987..cbf80fa 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -2,6 +2,7 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using DevComponents.Editors.DateTimeAdv; @@ -10,6 +11,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Windows.Forms; namespace Casic.Birmm.RbFreqStandMeasure.info @@ -22,6 +24,8 @@ private int currentPage = 1; // 当前页码 private int pageCount = 0; // 总页数 private readonly int limitCount = 10; // 每页数据条数,当前页面的表格固定为10条 + DetectionService detectionService = new DetectionServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); JObject condition = new JObject(); // 查询条件 @@ -528,10 +532,105 @@ if (MessageBox.Show("确认删除选中仪器?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + deviceService.delete(Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); MessageBox.Show("删除成功", "提示"); LoadDevList(condition); } } + + private void btnExport_Click(object sender, EventArgs e) + { + string strFilePath = ConfigHelper.GetAppConfig("exportPath") + DateTime.Now.ToString("yyyyMMddHHmmss.csv"); + + long deviceId = Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value); + string deviceName = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[2].Value.ToString(); + string deviceCode = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[4].Value.ToString(); + + List queryList = detectionItemService.search(deviceId, false); + if (null != queryList && queryList.Count > 0) + { + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(deviceName + "(" + deviceCode + ")" + "测试数据及结果"); + strmWriterObj.WriteLine("序号,时间,相对频率偏差"); + + foreach (DetectionItem detectionItem in queryList) + { + string startTime = detectionItem.StartTime.ToString("yyyy-MM-dd HH:mm:ss"); + string endTime = detectionItem.EndTime.ToString("yyyy-MM-dd HH:mm:ss"); + + strmWriterObj.WriteLine("测试起止时间:"+ startTime + "," + endTime); + + for (int type = 1; type < 5; type++) //1-STABILITY,2-ACCURACY,3-BOOT_FEATURE,4-AGE_RATE + { + // 获取数据 + List List = detectionService.search(deviceId, type + "", startTime, endTime); + if (null != List && List.Count > 0) + { + string detecItemName = ""; + + switch (type) + { + case 1: detecItemName = "频率稳定度"; break; + case 2: detecItemName = "频率准确度"; break; + case 3: detecItemName = "开机特性"; break; + case 4: detecItemName = "日老化率"; break; + default: break; + } + strmWriterObj.WriteLine(detecItemName); + int index = 1; + foreach (DetectionDto detection in List) + { + string strBufferLine = index + "," + detection.LogTime + "," + detection.Frequency; + strmWriterObj.WriteLine(strBufferLine); + + index++; + } + } + } + } + strmWriterObj.Close(); + MessageBox.Show("导出成功,存放位置:"+ strFilePath); + } + else + { + MessageBox.Show("所选仪器无测试数据可导出!"); + } + + } + /// +         /// 导出报表为Csv +         /// +         /// DataTable +         /// 物理路径 +         /// 表头 +         /// 字段标题,逗号分隔 + public bool dt2csv(DataTable dt, string strFilePath, string tableheader, string columname) + { + try + { + string strBufferLine = ""; + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(tableheader); + strmWriterObj.WriteLine(columname); + for (int i = 0; i < dt.Rows.Count; i++) + { + strBufferLine = ""; + for (int j = 0; j < dt.Columns.Count; j++) + { + if (j > 0) + strBufferLine += ","; + strBufferLine += dt.Rows[i][j].ToString(); + } + strmWriterObj.WriteLine(strBufferLine); + } + strmWriterObj.Close(); + return true; + } + catch + { + return false; + } + } + } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7f9c9c9..f60767b 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -44,7 +44,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 100; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -69,7 +68,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(83, 27); this.label_devModel.TabIndex = 98; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label9 diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 3a62610..c676897 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -72,7 +72,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 116; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -97,7 +96,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 @@ -122,7 +120,6 @@ this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); this.label3.TabIndex = 119; - this.label3.Text = "111"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label5 @@ -159,7 +156,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // ageRate diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index 133d6b5..8993819 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -71,7 +71,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 107; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -96,7 +95,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); this.label_customerName.TabIndex = 103; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label_devModel @@ -109,7 +107,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 102; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 diff --git a/RbFreqStandMeasure/info/stability.designer.cs b/RbFreqStandMeasure/info/stability.designer.cs index 0a6b17e..63e8678 100644 --- a/RbFreqStandMeasure/info/stability.designer.cs +++ b/RbFreqStandMeasure/info/stability.designer.cs @@ -46,7 +46,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); this.label_customerName.TabIndex = 82; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label_devModel @@ -59,7 +58,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 81; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 @@ -96,7 +94,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 86; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs index d67b5a2..360b1eb 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs @@ -36,11 +36,12 @@ this.button1 = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.text_cycEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label20 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); this.text_cycThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -48,9 +49,6 @@ this.label23 = new System.Windows.Forms.Label(); this.text_cycThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.label13 = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.text_freEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.text_freThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -70,10 +68,6 @@ this.label5 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.text_soOutDelay = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -174,6 +168,52 @@ this.tabPage1.Text = "系统参数"; this.tabPage1.UseVisualStyleBackColor = true; // + // btnCancel + // + this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancel.EnterForeColor = System.Drawing.Color.White; + this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancel.FlatAppearance.BorderSize = 0; + this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancel.HoverForeColor = System.Drawing.Color.White; + this.btnCancel.Location = new System.Drawing.Point(314, 396); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancel.PressForeColor = System.Drawing.Color.White; + this.btnCancel.Radius = 5; + this.btnCancel.Size = new System.Drawing.Size(150, 30); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "放弃修改"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(504, 396); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(150, 30); + this.btnSave.TabIndex = 0; + this.btnSave.Text = "保存设置"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // // tabPage2 // this.tabPage2.Controls.Add(this.roundButton1); @@ -189,61 +229,67 @@ this.tabPage2.Text = "计数器程控检定"; this.tabPage2.UseVisualStyleBackColor = true; // + // roundButton1 + // + this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton1.EnterForeColor = System.Drawing.Color.White; + this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton1.FlatAppearance.BorderSize = 0; + this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.roundButton1.HoverForeColor = System.Drawing.Color.White; + this.roundButton1.Location = new System.Drawing.Point(338, 474); + this.roundButton1.Name = "roundButton1"; + this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton1.PressForeColor = System.Drawing.Color.White; + this.roundButton1.Radius = 5; + this.roundButton1.Size = new System.Drawing.Size(150, 30); + this.roundButton1.TabIndex = 19; + this.roundButton1.Text = "放弃修改"; + this.roundButton1.UseVisualStyleBackColor = true; + this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click); + // + // roundButton2 + // + this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton2.EnterForeColor = System.Drawing.Color.White; + this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton2.FlatAppearance.BorderSize = 0; + this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.roundButton2.HoverForeColor = System.Drawing.Color.White; + this.roundButton2.Location = new System.Drawing.Point(528, 474); + this.roundButton2.Name = "roundButton2"; + this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton2.PressForeColor = System.Drawing.Color.White; + this.roundButton2.Radius = 5; + this.roundButton2.Size = new System.Drawing.Size(150, 30); + this.roundButton2.TabIndex = 20; + this.roundButton2.Text = "保存设置"; + this.roundButton2.UseVisualStyleBackColor = true; + this.roundButton2.Click += new System.EventHandler(this.roundButton2_Click); + // // groupBox3 // - this.groupBox3.Controls.Add(this.label12); - this.groupBox3.Controls.Add(this.label14); - this.groupBox3.Controls.Add(this.text_cycEleAddValue); this.groupBox3.Controls.Add(this.label20); this.groupBox3.Controls.Add(this.label21); this.groupBox3.Controls.Add(this.text_cycThreshold2); this.groupBox3.Controls.Add(this.label22); this.groupBox3.Controls.Add(this.label23); this.groupBox3.Controls.Add(this.text_cycThreshold1); - this.groupBox3.Location = new System.Drawing.Point(31, 336); + this.groupBox3.Location = new System.Drawing.Point(31, 313); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(904, 140); + this.groupBox3.Size = new System.Drawing.Size(904, 99); this.groupBox3.TabIndex = 18; this.groupBox3.TabStop = false; this.groupBox3.Text = "周期灵敏度"; // - // label12 - // - this.label12.BackColor = System.Drawing.Color.Transparent; - this.label12.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(372, 91); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(45, 30); - this.label12.TabIndex = 15; - this.label12.Text = "V"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label14 - // - this.label14.BackColor = System.Drawing.Color.Transparent; - this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label14.Location = new System.Drawing.Point(30, 91); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(159, 30); - this.label14.TabIndex = 12; - this.label14.Text = "测量误差电平增加值:"; - this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // text_cycEleAddValue - // - // - // - // - this.text_cycEleAddValue.Border.Class = "TextBoxBorder"; - this.text_cycEleAddValue.Border.CornerDiameter = 5; - this.text_cycEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.text_cycEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.text_cycEleAddValue.Location = new System.Drawing.Point(195, 91); - this.text_cycEleAddValue.Name = "text_cycEleAddValue"; - this.text_cycEleAddValue.PreventEnterBeep = true; - this.text_cycEleAddValue.Size = new System.Drawing.Size(168, 29); - this.text_cycEleAddValue.TabIndex = 11; - // // label20 // this.label20.BackColor = System.Drawing.Color.Transparent; @@ -320,59 +366,19 @@ // // groupBox2 // - this.groupBox2.Controls.Add(this.label13); - this.groupBox2.Controls.Add(this.label15); - this.groupBox2.Controls.Add(this.text_freEleAddValue); this.groupBox2.Controls.Add(this.label16); this.groupBox2.Controls.Add(this.label17); this.groupBox2.Controls.Add(this.text_freThreshold2); this.groupBox2.Controls.Add(this.label18); this.groupBox2.Controls.Add(this.label19); this.groupBox2.Controls.Add(this.text_freThreshold1); - this.groupBox2.Location = new System.Drawing.Point(31, 177); + this.groupBox2.Location = new System.Drawing.Point(31, 191); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(904, 147); + this.groupBox2.Size = new System.Drawing.Size(904, 101); this.groupBox2.TabIndex = 17; this.groupBox2.TabStop = false; this.groupBox2.Text = "频率灵敏度"; // - // label13 - // - this.label13.BackColor = System.Drawing.Color.Transparent; - this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(372, 91); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(45, 30); - this.label13.TabIndex = 15; - this.label13.Text = "V"; - this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label15 - // - this.label15.BackColor = System.Drawing.Color.Transparent; - this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label15.Location = new System.Drawing.Point(30, 91); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(159, 30); - this.label15.TabIndex = 12; - this.label15.Text = "测量误差电平增加值:"; - this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // text_freEleAddValue - // - // - // - // - this.text_freEleAddValue.Border.Class = "TextBoxBorder"; - this.text_freEleAddValue.Border.CornerDiameter = 5; - this.text_freEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.text_freEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.text_freEleAddValue.Location = new System.Drawing.Point(195, 91); - this.text_freEleAddValue.Name = "text_freEleAddValue"; - this.text_freEleAddValue.PreventEnterBeep = true; - this.text_freEleAddValue.Size = new System.Drawing.Size(168, 29); - this.text_freEleAddValue.TabIndex = 11; - // // label16 // this.label16.BackColor = System.Drawing.Color.Transparent; @@ -461,7 +467,7 @@ this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.text_soOutDelay); - this.groupBox1.Location = new System.Drawing.Point(31, 18); + this.groupBox1.Location = new System.Drawing.Point(31, 29); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(904, 145); this.groupBox1.TabIndex = 0; @@ -476,7 +482,7 @@ this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(45, 30); this.label11.TabIndex = 16; - this.label11.Text = "V"; + this.label11.Text = "VRMS"; this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label10 @@ -485,9 +491,9 @@ this.label10.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label10.Location = new System.Drawing.Point(372, 89); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(45, 30); + this.label10.Size = new System.Drawing.Size(65, 30); this.label10.TabIndex = 15; - this.label10.Text = "V"; + this.label10.Text = "VRMS"; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label9 @@ -550,7 +556,7 @@ this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(45, 30); this.label6.TabIndex = 10; - this.label6.Text = "V"; + this.label6.Text = "VRMS"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label7 @@ -616,98 +622,6 @@ this.text_soOutDelay.Size = new System.Drawing.Size(168, 29); this.text_soOutDelay.TabIndex = 5; // - // btnCancel - // - this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; - this.btnCancel.EnterForeColor = System.Drawing.Color.White; - this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnCancel.FlatAppearance.BorderSize = 0; - this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btnCancel.HoverForeColor = System.Drawing.Color.White; - this.btnCancel.Location = new System.Drawing.Point(314, 396); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnCancel.PressForeColor = System.Drawing.Color.White; - this.btnCancel.Radius = 5; - this.btnCancel.Size = new System.Drawing.Size(150, 30); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "放弃修改"; - this.btnCancel.UseVisualStyleBackColor = true; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnSave - // - this.btnSave.EnterBackColor = System.Drawing.Color.Blue; - this.btnSave.EnterForeColor = System.Drawing.Color.White; - this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnSave.FlatAppearance.BorderSize = 0; - this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); - this.btnSave.HoverForeColor = System.Drawing.Color.White; - this.btnSave.Location = new System.Drawing.Point(504, 396); - this.btnSave.Name = "btnSave"; - this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnSave.PressForeColor = System.Drawing.Color.White; - this.btnSave.Radius = 5; - this.btnSave.Size = new System.Drawing.Size(150, 30); - this.btnSave.TabIndex = 0; - this.btnSave.Text = "保存设置"; - this.btnSave.UseVisualStyleBackColor = true; - this.btnSave.Click += new System.EventHandler(this.btnSave_Click); - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(337, 510); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(150, 30); - this.roundButton1.TabIndex = 19; - this.roundButton1.Text = "放弃修改"; - this.roundButton1.UseVisualStyleBackColor = true; - this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click); - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(527, 510); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(150, 30); - this.roundButton2.TabIndex = 20; - this.roundButton2.Text = "保存设置"; - this.roundButton2.UseVisualStyleBackColor = true; - this.roundButton2.Click += new System.EventHandler(this.roundButton2_Click); - // // SettingCtrlForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -743,9 +657,6 @@ private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Label label14; - private DevComponents.DotNetBar.Controls.TextBoxX text_cycEleAddValue; private System.Windows.Forms.Label label20; private System.Windows.Forms.Label label21; private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold2; @@ -753,9 +664,6 @@ private System.Windows.Forms.Label label23; private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold1; private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label15; - private DevComponents.DotNetBar.Controls.TextBoxX text_freEleAddValue; private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label17; private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold2; diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 8135c6e..6fb5c44 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -17,5 +17,7 @@ List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + + int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index 072757f..8d6bbb2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,7 +9,7 @@ { interface DetectionService { - int add(long deviceId, DateTime logTime, String frequency); + int add(long deviceId, string frequency, string detecItemType); List search(long deviceId, string detectionType, string startTime, string endTime); diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 525c686..1507ec5 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -12,6 +12,8 @@ int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int updateStatus(long id, string status, string channel); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index d1260fe..43075c1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -90,6 +90,52 @@ return iRetval; } + public int updateDetecStatus(long deviceId, string stability, string accuracy, string bootFeature, string ageRate) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem : 数据库链接断开"); + return iRetval; + } + + if (stability.Equals("") && accuracy.Equals("") && bootFeature.Equals("") && ageRate.Equals("")) return -1; + + string sQry = "UPDATE r_detection_item SET"; + if(!stability.Equals("")) + sQry = sQry + " STABILITY=@STABILITY"; + if (!accuracy.Equals("")) + sQry = sQry + " ACCURACY=@ACCURACY"; + if (!bootFeature.Equals("")) + sQry = sQry + " BOOT_FEATURE=@BOOT_FEATURE"; + if (!ageRate.Equals("")) + sQry = sQry + " AGE_RATE=@AGE_RATE"; + + sQry = sQry + " DEVICE_ID = " + deviceId; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STABILITY", MySqlDbType.String, 10).Value = stability; + cmd.Parameters.Add("@ACCURACY", MySqlDbType.String, 10).Value = accuracy; + cmd.Parameters.Add("@BOOT_FEATURE", MySqlDbType.String, 10).Value = bootFeature; + cmd.Parameters.Add("@AGE_RATE", MySqlDbType.String, 10).Value = ageRate; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch (MySqlException e) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDetectionItem: " + e.Message); + iRetval = -1; + } + return iRetval; + } + + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 8c3f140..0b34ca2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(long deviceId, DateTime logTime,String frequency) + public int add(long deviceId, string frequency, string detecItemType) { int iRetval = -1; try @@ -24,13 +24,14 @@ return iRetval; } - string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY)" + - "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY)"; + string sQry = "INSERT INTO r_detection (DEVICE_ID,LOG_TIME,FREQUENCY,DETECTION_ITEM)" + + "values(@DEVICE_ID,@LOG_TIME,@FREQUENCY,@DETECTION_ITEM)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 255).Value = frequency; - cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = logTime; + cmd.Parameters.Add("@LOG_TIME", MySqlDbType.DateTime, 0).Value = DateTime.Now; + cmd.Parameters.Add("@DETECTION_ITEM", MySqlDbType.String, 0).Value = detecItemType; cmd.ExecuteNonQuery(); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index fae05e6..f91799f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -481,5 +481,37 @@ return deviceViewList; } + public int updateStatus(long id, string status, string channel) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_device SET STATUSID=@STATUS, CHANNEL=@CHANNEL WHERE ID = " + id; + + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@STATUS", MySqlDbType.String, 30).Value = status; + cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index a3b6848..47988d8 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -288,6 +288,7 @@ Coordinate.cs + diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index e1b5c26..2ad8402 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); @@ -41,11 +42,6 @@ this.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.label7 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.button2 = new System.Windows.Forms.Button(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -53,21 +49,7 @@ this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); this.label6 = new System.Windows.Forms.Label(); - this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem9 = new DevComponents.Editors.ComboItem(); - this.comboItem10 = new DevComponents.Editors.ComboItem(); - this.comboItem11 = new DevComponents.Editors.ComboItem(); - this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem5 = new DevComponents.Editors.ComboItem(); - this.comboItem6 = new DevComponents.Editors.ComboItem(); - this.comboItem7 = new DevComponents.Editors.ComboItem(); - this.comboItem8 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); this.btn_downCounterList = new System.Windows.Forms.Button(); @@ -91,7 +73,7 @@ // // panel1 // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.dataGridView_CounterResult); this.panel1.Location = new System.Drawing.Point(297, 5); @@ -101,6 +83,7 @@ // // dataGridView_CounterResult // + this.dataGridView_CounterResult.AllowUserToAddRows = false; this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; @@ -133,14 +116,16 @@ this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.Size = new System.Drawing.Size(698, 627); this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.VirtualMode = true; this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellValueChanged); this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); // // panelMedian // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelMedian.BackgroundImage"))); this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelMedian.Controls.Add(this.labelMedian); this.panelMedian.Controls.Add(this.btn_add); @@ -212,13 +197,13 @@ // // panelControl // - this.panelControl.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_control; + this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 416); + this.panelControl.Location = new System.Drawing.Point(10, 396); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(288, 116); + this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // // benEdit @@ -233,7 +218,7 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(62, 58); + this.benEdit.Location = new System.Drawing.Point(63, 70); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; @@ -258,108 +243,20 @@ // // panelSource // - this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; + this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.label7); - this.panelSource.Controls.Add(this.button3); - this.panelSource.Controls.Add(this.textBoxX5); - this.panelSource.Controls.Add(this.button2); - this.panelSource.Controls.Add(this.textBoxX4); this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.textBoxX2); this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); - this.panelSource.Controls.Add(this.roundButton3); - this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBox_unit); - this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); - this.panelSource.Controls.Add(this.label5); - this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 155); + this.panelSource.Location = new System.Drawing.Point(10, 212); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(288, 262); + this.panelSource.Size = new System.Drawing.Size(288, 178); this.panelSource.TabIndex = 1; // - // label7 - // - this.label7.BackColor = System.Drawing.Color.Transparent; - this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(194, 172); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(33, 26); - this.label7.TabIndex = 61; - this.label7.Text = "mV"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // button3 - // - this.button3.BackColor = System.Drawing.Color.White; - this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button3.FlatAppearance.BorderSize = 0; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button3.Location = new System.Drawing.Point(231, 135); - this.button3.Margin = new System.Windows.Forms.Padding(0); - this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button3.Size = new System.Drawing.Size(18, 23); - this.button3.TabIndex = 60; - this.button3.Text = "﹀"; - this.button3.UseVisualStyleBackColor = false; - // - // textBoxX5 - // - // - // - // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(196, 133); - this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(57, 27); - this.textBoxX5.TabIndex = 59; - // - // button2 - // - this.button2.BackColor = System.Drawing.Color.White; - this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.button2.Location = new System.Drawing.Point(168, 136); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.button2.Size = new System.Drawing.Size(18, 23); - this.button2.TabIndex = 58; - this.button2.Text = "﹀"; - this.button2.UseVisualStyleBackColor = false; - // - // textBoxX4 - // - // - // - // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(102, 134); - this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(90, 27); - this.textBoxX4.TabIndex = 57; - // // btn_dropDetecModel // this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; @@ -368,7 +265,7 @@ this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 95); + this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); this.btn_dropDetecModel.Name = "btn_dropDetecModel"; this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); @@ -388,7 +285,7 @@ this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Location = new System.Drawing.Point(101, 77); this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX2.Name = "textBoxX2"; @@ -407,7 +304,7 @@ this.textBox_detecModel.Border.CornerDiameter = 5; this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 93); + this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.textBox_detecModel.Name = "textBox_detecModel"; this.textBox_detecModel.PreventEnterBeep = true; @@ -424,7 +321,7 @@ this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 94); + this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); @@ -444,126 +341,13 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 94); + this.label6.Location = new System.Drawing.Point(17, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; this.label6.Text = "测量模式"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // roundButton3 - // - this.roundButton3.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton3.EnterForeColor = System.Drawing.Color.White; - this.roundButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton3.FlatAppearance.BorderSize = 0; - this.roundButton3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(101, 213); - this.roundButton3.Margin = new System.Windows.Forms.Padding(0); - this.roundButton3.Name = "roundButton3"; - this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton3.PressForeColor = System.Drawing.Color.White; - this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(94, 26); - this.roundButton3.TabIndex = 14; - this.roundButton3.Text = "下发"; - this.roundButton3.UseVisualStyleBackColor = true; - // - // textBoxX1 - // - // - // - // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(102, 172); - this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); - this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(90, 26); - this.textBoxX1.TabIndex = 11; - // - // comboBox_unit - // - this.comboBox_unit.DisplayMember = "Text"; - this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_unit.FormattingEnabled = true; - this.comboBox_unit.ItemHeight = 20; - this.comboBox_unit.Items.AddRange(new object[] { - this.comboItem9, - this.comboItem10, - this.comboItem11, - this.comboItem12}); - this.comboBox_unit.Location = new System.Drawing.Point(196, 134); - this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_unit.Name = "comboBox_unit"; - this.comboBox_unit.Size = new System.Drawing.Size(55, 26); - this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_unit.TabIndex = 13; - // - // comboItem9 - // - this.comboItem9.Text = "全部"; - // - // comboItem10 - // - this.comboItem10.Text = "待检测"; - // - // comboItem11 - // - this.comboItem11.Text = "检测中"; - // - // comboItem12 - // - this.comboItem12.Text = "已检测"; - // - // comboBox_frequency - // - this.comboBox_frequency.DisplayMember = "Text"; - this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBox_frequency.FormattingEnabled = true; - this.comboBox_frequency.ItemHeight = 20; - this.comboBox_frequency.Items.AddRange(new object[] { - this.comboItem5, - this.comboItem6, - this.comboItem7, - this.comboItem8}); - this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); - this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); - this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBox_frequency.Name = "comboBox_frequency"; - this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); - this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBox_frequency.TabIndex = 12; - // - // comboItem5 - // - this.comboItem5.Text = "全部"; - // - // comboItem6 - // - this.comboItem6.Text = "待检测"; - // - // comboItem7 - // - this.comboItem7.Text = "检测中"; - // - // comboItem8 - // - this.comboItem8.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -576,33 +360,11 @@ this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(4, 172); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 26); - this.label5.TabIndex = 2; - this.label5.Text = "电平"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.Transparent; - this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(25, 136); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(62, 26); - this.label4.TabIndex = 2; - this.label4.Text = "频率"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(29, 53); + this.label3.Location = new System.Drawing.Point(29, 77); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -611,7 +373,7 @@ // // panelCounter // - this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; + this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelCounter.Controls.Add(this.btn_downCounterList); this.panelCounter.Controls.Add(this.text_counterCode); @@ -622,7 +384,7 @@ this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(288, 151); + this.panelCounter.Size = new System.Drawing.Size(288, 181); this.panelCounter.TabIndex = 0; // // btn_downCounterList @@ -706,7 +468,7 @@ this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Location = new System.Drawing.Point(102, 113); this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); this.text_counterIp.Name = "text_counterIp"; @@ -719,7 +481,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(15, 101); + this.label1.Location = new System.Drawing.Point(15, 113); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -785,8 +547,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; private RoundButton benEdit; private RoundButton benDelete; private RoundButton btn_add; @@ -797,18 +557,6 @@ private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; - private DevComponents.Editors.ComboItem comboItem5; - private DevComponents.Editors.ComboItem comboItem6; - private DevComponents.Editors.ComboItem comboItem7; - private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; - private DevComponents.Editors.ComboItem comboItem9; - private DevComponents.Editors.ComboItem comboItem10; - private DevComponents.Editors.ComboItem comboItem11; - private DevComponents.Editors.ComboItem comboItem12; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; - private RoundButton roundButton3; private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; private DevComponents.Editors.ComboItem comboItem1; private DevComponents.Editors.ComboItem comboItem2; @@ -816,12 +564,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; private System.Windows.Forms.Button btn_downCounterList; public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; - private System.Windows.Forms.Button button3; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; - private System.Windows.Forms.Button button2; - public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; private System.Windows.Forms.Button btn_dropDetecModel; public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; - private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index ecd9c0d..2cf62aa 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -22,6 +22,9 @@ Label colStdValue = new Label(); Label colValue = new Label(); + string devType = ""; + string devCode = ""; + string devPort = "输入A"; #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -178,19 +181,21 @@ colTime.BringToFront(); - dataGridView_CounterResult.Columns.Add("index", ""); - dataGridView_CounterResult.Columns.Add("devType", ""); - dataGridView_CounterResult.Columns.Add("devNo", ""); - dataGridView_CounterResult.Columns.Add("devPort", ""); - dataGridView_CounterResult.Columns.Add("stdValue", ""); - dataGridView_CounterResult.Columns.Add("value", ""); - dataGridView_CounterResult.Columns.Add("sensitivity", ""); - dataGridView_CounterResult.Columns.Add("logTime", ""); - dataGridView_CounterResult.Columns.Add("id", ""); + } private void LoadCounterDetecInitList() { + //dataGridView_CounterResult.Columns.Add("index", ""); + //dataGridView_CounterResult.Columns.Add("devType", ""); + //dataGridView_CounterResult.Columns.Add("devNo", ""); + //dataGridView_CounterResult.Columns.Add("devPort", ""); + //dataGridView_CounterResult.Columns.Add("stdValue", ""); + //dataGridView_CounterResult.Columns.Add("value", ""); + //dataGridView_CounterResult.Columns.Add("sensitivity", ""); + //dataGridView_CounterResult.Columns.Add("logTime", ""); + //dataGridView_CounterResult.Columns.Add("id", ""); + table_counterDetecInit = new DataTable(); table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); @@ -204,11 +209,7 @@ table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); if (text_counterCode.Text != "") - { - string devType = ""; - string devCode = ""; - string devPort = "输入A"; - + { List list =deviceService.search("", text_counterCode.Text,"","","",""); if (null != list && list.Count > 0) { @@ -225,17 +226,17 @@ { if (textBox_detecModel.Text.Equals("周期测量")) { - table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); - + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); } else { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); } - dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + //dataGridView_CounterResult.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Frequency, "", "", "", counterDetecInit.Id); + index++; } - //dataGridView_CounterResult.DataSource = table_counterDetecInit; + dataGridView_CounterResult.DataSource = table_counterDetecInit; dataGridView_CounterResult.Columns[8].Visible = false; @@ -334,15 +335,100 @@ private void btn_add_Click(object sender, EventArgs e) { - int index = dataGridView_CounterResult.Rows.Add(); - dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; - dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; - dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + //int index = dataGridView_CounterResult.Rows.Add(); + //dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + //dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + //dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + int index = table_counterDetecInit.Rows.Count; + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, "", "", "", "", -1); + + //dataGridView_CounterResult.dat + dataGridView_CounterResult.Rows[index].Cells[4].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[index].Cells[4];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + + } private void roundButton1_Click(object sender, EventArgs e) { } + + private string freAndCycle(string input) + { + string output = ""; + long inputNumberFre = 0; + double inputMumberCye = 0.0; + if (input.Contains("Hz")) + { + if (input.Contains("KHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000); + } + else if (input.Contains("MHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else if (input.Contains("GHz")) + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 3)) * 1000 * 1000); + } + else + { + inputNumberFre = Convert.ToInt64(Convert.ToInt32(input.Substring(0, input.Length - 2))); + if (inputNumberFre == 1) + { + return "1s"; + } + } + double cyc = 1 / inputNumberFre; + int index = 0; + foreach (char c in cyc.ToString().Split('.')[1]) + { + if (c.Equals('0')) index++; + else break; + } + if (index < 2) output = cyc + "s"; + else if (index >= 2 && index < 5) output = cyc * 1000 + "ms"; + else if (index >= 5 && index < 8) output = cyc * 1000 * 1000 + "μs"; + else if (index >= 8) output = cyc * 1000 * 1000 * 1000 + "ns"; + } + else if (input.Contains("s")) + { + if (input.Contains("ms")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000; + } + else if (input.Contains("μs")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000; + } + else if (input.Contains("ns")) + { + inputMumberCye = Convert.ToInt32(input.Substring(0, input.Length - 2)) / 1000 / 1000 / 1000; + } + double fre = 1 / inputMumberCye; + int len = fre.ToString().Split('.')[0].Length; + if (len > 0 && len <= 3) output = fre + "Hz"; + if (len > 3 && len <= 6) output = fre / 1000 + "KHz"; + if (len > 6 && len <= 9) output = fre / 1000 / 1000+ "MHz"; + if (len > 9) output = fre / 1000 / 1000+ "GHz"; + } + + return output; + + } + + private void dataGridView_CounterResult_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id, "", value); + else counterDetecInitService.update(id, value, ""); + } + } } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.resx b/RbFreqStandMeasure/counter/CounterCtrlForm.resx index 1af7de1..8145ce5 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.resx +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.resx @@ -117,4 +117,261 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAt4AAAKCCAYAAADm2N7TAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAABk5SURBVHhe7d1bk1vVAYRRkpAQ + CIRLAblXkv//Ix213NulERp7HOiXYa2q5sElH+nxq1374E/evHljZmZmZmbjPfxDMzMzMzP7ZffwD83M + zMzM7Jfd2//8Mn5jZmZmZvYK97O9NLwfffmj/dbMzMz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JK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt + 3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDA + Slq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AG + AICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m + 4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV + 28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABY + SSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4A + ALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsAAFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0s + vAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mFNwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRy + m1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZuMwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAr + aeU2s/AGAICVtHKbWXgDAMBKWrnNLLwBAGAlrdxmFt4AALCSVm4zC28AAFhJK7eZhTcAAKykldvMwhsA + AFbSym1m4Q0AACtp5Taz8AYAgJW0cptZeAMAwEpauc0svAEAYCWt3GYW3gAAsJJWbjMLbwAAWEkrt5mF + NwAArKSV28zCGwAAVtLKbWbhDQAAK2nlNrPwBgCAlbRym1l4AwDASlq5zSy8AQBgJa3cZhbeAACwklZu + MwtvAABYSSu3mYU3AACspJXbzMIbAABW0sptZuENAAAraeU2s/AGAICV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 + 5Taz8AYA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RsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69X8aDgi49HD + 8fW6l+t6OD5snwrctLRezaf9bEC2oIcjG3G/Gfc/uzkbjlfr3qwzHPAZSOvVfNr/5OF4v30qcNPSejX/ + 5OH4cl1++Jt13677bt277VOBm5bWq/m0nw3IFmQTPjoc+fIjP/TVuv6C9PW6t9unAjctrVfz/cVotiCb + sH0xum40HA+vK9unAjctrVfzaf9Jw7H/nqNfV7anjnV5//lx3c/rfl3327rf1/1R96dz7mqvO02zaTcN + p+U0nbb7aWP/mtLfb4yG4+ypo8cj70D55jW/7Kd1+cW/rMsf4Zy77kuraTbtpuG0nKZ7NM6eNh4djuNT + x9l45FGmByQrlV+cyz8ccc5d93WvabcHI02fjcbxaWM0HFmafmXp8cgjTA9IvnnN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3zrnNr0LBcLiCgdsVjbqiLE8bq+GAtXhQnnrfwYN521oB4a/LWIXEObft + 4Wp5W8HAadyu9xprV5QRDeiGY76yVDzm00etfoxzbrubna1TRkVjvqIcFQ7ggxUOxkOWVxZWJ4/a/IOc + c9vc7GydNNh8RWHlf/XggOFw7vltdvbJwuFVxbl9b3YWh8vnR11V1sLBgyhRRaNOGnMsfDnq3K+xJ3g5 + evPiX3UuEEliaqavAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAQ4AAACqCAYAAABcS6HpAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAfqSURBVHhe7drbbhxlEIXRcIZA + CAlJOIvk/R/S/LtdZbWGTlImvhjaa0l1g6yxb76t7iFPbm5unpTP1n2+7ot1X637Zt13635Y93zdy3Wv + 1/267vd1f677a93f697WvXPOXe11p2k27abhtJym03YaT+tpPu1nA7IF2YRsQzbidjPeMxxfrvt63bfr + nq57tq7H49W6N+vyy35bl1/8x7r8Ec656760mmbTbhpOy2m6RyOtp/m0nw3IFnx0OC6fOo7G48W6HpCs + VH5x7hfn3NVf95p2ezDS9NFoXD5tjIYjS9OvLD0eeYTpAflpXX5hD8nPzrmrvx6KXBruwUjbPRr9inL5 + tHE4HHE0Hlme/r4jH/z9uh6QH+t6SJxz131ptbvtwUjTabu/1zh6RdlGI6bDsX9l6fHYP3309R/jnLve + 2zfbTxk9GvtXlHsNR+QHezhy+ZDLV5ZcP3n07f8g59x13r7ZftLI7V9Rct1/78Edw+Hc47t9sw82HF5V + nDv37ZtNw93zJ72qHA1HPihL1KPRTxr7sfDlqHP/j3vwL0ePRuPuFWX9HHByab2af+9Tx/Zjtz+7uRyO + /SvK0+1TgVNL69V8v7KMhmP/tHE3GuuebZ8KnFpar+Z7PC6fOj44HP2KkneevAM93z4VOLW0Xs339x2X + Tx3vHY5/PW2se7F9KnBqab2av3zqu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wAACxMAAAsTAQCanBgAAAZCSURBVHhe7dpbb9UGEIVR2lIo + FMqlQO9q+/9/ZOrtzESWcZJJ4eFg1pKmDyg94eXbso94dHV15ZxzD7rDP3TOubvu8A+dc+6uu/7P5/GN + c+7i75NNh+Polx/dt865i7+jdo/uVvcNx/6D9n+B75xzX/ztu953/5HbhmP/P/YH9i96vLnvnXNf7G1b + 3g/Jfgdu3DccR4ORX/ak7unufnDOXfztu+2ee0huG5AbR8NxNBrbwdgOxLPlnm/uR+fcxd+22TS8HZT9 + gByOx33DsR+N7VjkL/BiuZd1PznnvpjrbtNwj0mPyNF43Dkct43G+pSx/Bxwcmm9mr91PNYfu/7Z1X44 + tk8az9dPBU4trVfz/eQxGo7t08bNaCz3cv1U4NTSejXf47F/6rhzOPoVJe89eQ96tX4qcGppvZpP+/3K + MhqOj542lnuzfipwamm9mt8/dTxoOPKNaxbo7fqpwKml9Wo+7Y+Ho7/f2L6mvF7u3fqpwKml9Wp++7qS + Tcg23Dkc/f3GzWvKcu/XTwVOLa1X8/26sv2e48HD8WH9VODU0no1/0nDkX9llncewwFfgbRezaf9e4cj + f5AvP3o4+ovRHo5f1k8FTi2tV/Npv78g7eFYvyBdf+z6Zw0HYDiA/yGtV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OG + A5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W8 + 4QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1 + bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRe + zRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCat + V/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ + 69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm + 0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziA + mbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsOYCatV/OGA5hJ69W84QBm0no1bziAmbRezRsO + YCatV/OGA5hJ69W84QBm0no1bziAmbRezY+GIzIePRxPl3u+XA/Hh/VTgVNL69V82s8GZAt6OLIR15tx + /bOro+F4udyb5QwHfAXSejWf9j95ON6vnwqcWlqv5h88HI+Xyw8/W+7Fcq+Xe7d+KnBqab2aT/vZgGxB + NuHO4ciXH/mhJ8v1F6Svlnu7fipwamm9mu8vRrMF2YT1i9HlRsNx87qyfipwamm9mk/7DxqO7fcc/bqy + PnUsl/efX5f7fbk/l/trub+X+6fuX+fcxV53mmbTbhpOy2k6bffTxvY1pb/fGA3H0VNHj0fegfLNa37Z + b8vlF/+xXP4SzrnLvrSaZtNuGk7LabpH4+hp497h2D91HI1HHmV6QLJS+cW5/MMR59xlX/eadnsw0vTR + aOyfNkbDkaXpV5YejzzC9IDkm9f8wh6Sn51zF389FLk03IORtns0+hVl/7RxOBxxNB5Znv6+Ix+cb1t7 + QPKvy3I9JM65y7602t32YKTptN3faxy9oqyjEdPh2L6y9Hhsnz76+i/jnLvc2zbbTxk9GttXlAcNR+QH + ezhy+ZD9K0uunzz6tn8h59xl3rbZftLIbV9Rct1/78ENw+Hc13fbZj/bcHhVce7ct202DXfPn/SqcjQc + +aAsUY9GP2lsx8KXo859GfcZvhy9evQfW1NdRBmZj4AAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index b9840ae..e831b05 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -33,6 +33,7 @@ DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public static List channelFreeList = new List(); public static SerialPort frePort_1 = new SerialPort(); public static SerialPort frePort_2 = new SerialPort(); @@ -42,14 +43,6 @@ public static SerialPort clockPort = new SerialPort(); public static SerialPort satellitePort = new SerialPort(); - private string[] portNames = null; - private List serialPorts; - private byte[] portBuffer; - - public static List channelFreeList = new List(); - - System.Timers.Timer timerPort; //计时器,每1s中读取一次串口数据 - #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F84D7 @@ -683,266 +676,9 @@ } } - private void openPortsAndReceive() - { - // 检测数据串口 - string portName = ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[0]; - int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel1").ToString().Split(' ')[1]); - frePort_1 = portOpen(portName, bandRate); - if (frePort_1 == null) return; + - portName = ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel2").ToString().Split(' ')[1]); - frePort_2 = portOpen(portName, bandRate); - if (frePort_2 == null) return; - - portName = ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel3").ToString().Split(' ')[1]); - frePort_3 = portOpen(portName, bandRate); - if (frePort_3 == null) return; - - portName = ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel4").ToString().Split(' ')[1]); - frePort_4 = portOpen(portName, bandRate); - if (frePort_4 == null) return; - - portName = ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("channel5").ToString().Split(' ')[1]); - frePort_5 = portOpen(portName, bandRate); - if (frePort_5 == null) return; - - // 原子钟串口 - portName = ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("clock").ToString().Split(' ')[1]); - clockPort = portOpen(portName, bandRate); - if (clockPort == null) return; - - // 接收机串口 - portName = ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[0]; - bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").ToString().Split(' ')[1]); - satellitePort = portOpen(portName, bandRate); - if (satellitePort == null) return; - - label_clockStatus.Text = getClockData(clockPort); - getSatelliteData(satellitePort); - - } - - - - private SerialPort portOpen(string portName, int bandRate) - { - try - { - SerialPort port = new SerialPort(); - // 搜索串口 - string[] names = SerialPort.GetPortNames(); - if (names.Length == 0 || Array.IndexOf(names, portName) == -1 ) - { - MessageBox.Show("没有搜索到串口" + portName + "!"); - return null; - } - // 设置串口参数 - port.PortName = names[0]; - port.BaudRate = bandRate; - port.Parity = Parity.None; - port.DataBits = 8; - port.StopBits = StopBits.One; - port.Handshake = Handshake.None; - port.ReadTimeout = -1; - port.WriteTimeout = 3000; - - // 打开串口 - if (!port.IsOpen) - { - port.Open(); - } - if (port.IsOpen) - { - return port; - } - - return null; - } - catch(Exception ex) - { - MessageBox.Show("错误","打开串口失败!"); - LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!"+ ex.Message); - return null; - } - } - - // 获取检测数据 - public string getFrequencyData(SerialPort port) - { - string received = ""; - if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$") && data.EndsWith("")) - { - received = data.Split(' ')[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); - break; - } - } - count++; - } - } - else - { - int count = 0; - while (count < 11) - { - int readLen = port.BytesToRead; - if (readLen > 0) - { - byte[] buffer = new byte[readLen]; - port.Read(buffer, 0, readLen);// 接收数据到buffer里面 - string data = Encoding.ASCII.GetString(buffer); - if ((data.StartsWith("0") || data.StartsWith("1") || data.StartsWith("2") || data.StartsWith("3")) && data.EndsWith("\r\n")) - { - received = data.Split(' ')[2]; - break; - } - } - count++; - } - } - return received; - } - - // 获取铷钟数据 - public string getClockData(SerialPort port) - { - byte[] clockData = new byte[94]; - - string clockStatus = ""; - - int offset = 0; - - int count = 0; - int count2 = 0; - while (count<11) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - // 接收到数据 - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - // 判断接收到的数据 - string data = Encoding.ASCII.GetString(buffer); - if (data.StartsWith("$")) - { - Array.Copy(buffer, 0, clockData, offset, Readlen); - offset = offset + Readlen; - - if (Readlen == 94) - { - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - break; - } - else - { - while (count2 < 60) - { - Readlen = port.BytesToRead; - if (Readlen > 0) - { - buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - Array.Copy(buffer, 0, clockData, offset, Readlen); - data = Encoding.ASCII.GetString(clockData); - string clockStatusCode = data.Split(',')[9]; - switch (clockStatusCode) - { - case "1": clockStatus = "预热"; break; - case "2": clockStatus = "自由运动"; break; - case "3": clockStatus = "捕获"; break; - case "4": clockStatus = "快锁"; break; - case "5": clockStatus = "慢锁"; break; - case "7": clockStatus = "保持"; break; - default: break; - } - - offset = offset + Readlen; - if (offset == 94) break; - } - count2++; - } - } - - break; - } - } - count++; - } - return clockStatus; - - } - - // 获取卫星数据 - public void getSatelliteData(SerialPort port) - { - // RMC - string strRMC = ""; - int offset = 0;// GSV卫星数据的总条数 - - // GSV - byte[] dataGSV = new byte[1024]; - List strGSVList = new List(); - - int count = 0; - while (count < 10) - { - // 获取接收缓冲区长度 - int Readlen = port.BytesToRead; - - if (Readlen > 0) - { - byte[] buffer = new byte[Readlen]; - port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 - - string data = Encoding.ASCII.GetString(buffer); - - // RMC卫星信号,用于获取卫星状态 - if (data.Contains("RMC")) - { - strRMC = data; - } - // GSV卫星信号,用于展示时间、日期、画卫星图等 - if (data.Contains("GSV")) - { - strGSVList.Add(data); - } - } - } - - } + } diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index d86b8b9..179389d 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -238,5 +239,7 @@ } } + + } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index dff1a64..a151c85 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -291,6 +291,7 @@ this.btnExport.TabIndex = 14; this.btnExport.Text = "导出"; this.btnExport.UseVisualStyleBackColor = true; + this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // btnDetail // diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 61d2987..cbf80fa 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -2,6 +2,7 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using DevComponents.Editors.DateTimeAdv; @@ -10,6 +11,7 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.IO; using System.Windows.Forms; namespace Casic.Birmm.RbFreqStandMeasure.info @@ -22,6 +24,8 @@ private int currentPage = 1; // 当前页码 private int pageCount = 0; // 总页数 private readonly int limitCount = 10; // 每页数据条数,当前页面的表格固定为10条 + DetectionService detectionService = new DetectionServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); JObject condition = new JObject(); // 查询条件 @@ -528,10 +532,105 @@ if (MessageBox.Show("确认删除选中仪器?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + deviceService.delete(Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); MessageBox.Show("删除成功", "提示"); LoadDevList(condition); } } + + private void btnExport_Click(object sender, EventArgs e) + { + string strFilePath = ConfigHelper.GetAppConfig("exportPath") + DateTime.Now.ToString("yyyyMMddHHmmss.csv"); + + long deviceId = Convert.ToInt64(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value); + string deviceName = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[2].Value.ToString(); + string deviceCode = dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[4].Value.ToString(); + + List queryList = detectionItemService.search(deviceId, false); + if (null != queryList && queryList.Count > 0) + { + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(deviceName + "(" + deviceCode + ")" + "测试数据及结果"); + strmWriterObj.WriteLine("序号,时间,相对频率偏差"); + + foreach (DetectionItem detectionItem in queryList) + { + string startTime = detectionItem.StartTime.ToString("yyyy-MM-dd HH:mm:ss"); + string endTime = detectionItem.EndTime.ToString("yyyy-MM-dd HH:mm:ss"); + + strmWriterObj.WriteLine("测试起止时间:"+ startTime + "," + endTime); + + for (int type = 1; type < 5; type++) //1-STABILITY,2-ACCURACY,3-BOOT_FEATURE,4-AGE_RATE + { + // 获取数据 + List List = detectionService.search(deviceId, type + "", startTime, endTime); + if (null != List && List.Count > 0) + { + string detecItemName = ""; + + switch (type) + { + case 1: detecItemName = "频率稳定度"; break; + case 2: detecItemName = "频率准确度"; break; + case 3: detecItemName = "开机特性"; break; + case 4: detecItemName = "日老化率"; break; + default: break; + } + strmWriterObj.WriteLine(detecItemName); + int index = 1; + foreach (DetectionDto detection in List) + { + string strBufferLine = index + "," + detection.LogTime + "," + detection.Frequency; + strmWriterObj.WriteLine(strBufferLine); + + index++; + } + } + } + } + strmWriterObj.Close(); + MessageBox.Show("导出成功,存放位置:"+ strFilePath); + } + else + { + MessageBox.Show("所选仪器无测试数据可导出!"); + } + + } + /// +         /// 导出报表为Csv +         /// +         /// DataTable +         /// 物理路径 +         /// 表头 +         /// 字段标题,逗号分隔 + public bool dt2csv(DataTable dt, string strFilePath, string tableheader, string columname) + { + try + { + string strBufferLine = ""; + StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8); + strmWriterObj.WriteLine(tableheader); + strmWriterObj.WriteLine(columname); + for (int i = 0; i < dt.Rows.Count; i++) + { + strBufferLine = ""; + for (int j = 0; j < dt.Columns.Count; j++) + { + if (j > 0) + strBufferLine += ","; + strBufferLine += dt.Rows[i][j].ToString(); + } + strmWriterObj.WriteLine(strBufferLine); + } + strmWriterObj.Close(); + return true; + } + catch + { + return false; + } + } + } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7f9c9c9..f60767b 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -44,7 +44,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 100; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -69,7 +68,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(83, 27); this.label_devModel.TabIndex = 98; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label9 diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 3a62610..c676897 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -72,7 +72,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 116; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -97,7 +96,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 @@ -122,7 +120,6 @@ this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); this.label3.TabIndex = 119; - this.label3.Text = "111"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label5 @@ -159,7 +156,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // ageRate diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index 133d6b5..8993819 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -71,7 +71,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 107; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 @@ -96,7 +95,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); this.label_customerName.TabIndex = 103; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label_devModel @@ -109,7 +107,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 102; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 diff --git a/RbFreqStandMeasure/info/stability.designer.cs b/RbFreqStandMeasure/info/stability.designer.cs index 0a6b17e..63e8678 100644 --- a/RbFreqStandMeasure/info/stability.designer.cs +++ b/RbFreqStandMeasure/info/stability.designer.cs @@ -46,7 +46,6 @@ this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); this.label_customerName.TabIndex = 82; - this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label_devModel @@ -59,7 +58,6 @@ this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); this.label_devModel.TabIndex = 81; - this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label2 @@ -96,7 +94,6 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); this.label1.TabIndex = 86; - this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label4 diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs index d67b5a2..360b1eb 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs @@ -36,11 +36,12 @@ this.button1 = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.text_cycEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label20 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); this.text_cycThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -48,9 +49,6 @@ this.label23 = new System.Windows.Forms.Label(); this.text_cycThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.label13 = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.text_freEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.text_freThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); @@ -70,10 +68,6 @@ this.label5 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.text_soOutDelay = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -174,6 +168,52 @@ this.tabPage1.Text = "系统参数"; this.tabPage1.UseVisualStyleBackColor = true; // + // btnCancel + // + this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancel.EnterForeColor = System.Drawing.Color.White; + this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancel.FlatAppearance.BorderSize = 0; + this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancel.HoverForeColor = System.Drawing.Color.White; + this.btnCancel.Location = new System.Drawing.Point(314, 396); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancel.PressForeColor = System.Drawing.Color.White; + this.btnCancel.Radius = 5; + this.btnCancel.Size = new System.Drawing.Size(150, 30); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "放弃修改"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(504, 396); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(150, 30); + this.btnSave.TabIndex = 0; + this.btnSave.Text = "保存设置"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // // tabPage2 // this.tabPage2.Controls.Add(this.roundButton1); @@ -189,61 +229,67 @@ this.tabPage2.Text = "计数器程控检定"; this.tabPage2.UseVisualStyleBackColor = true; // + // roundButton1 + // + this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton1.EnterForeColor = System.Drawing.Color.White; + this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton1.FlatAppearance.BorderSize = 0; + this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.roundButton1.HoverForeColor = System.Drawing.Color.White; + this.roundButton1.Location = new System.Drawing.Point(338, 474); + this.roundButton1.Name = "roundButton1"; + this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton1.PressForeColor = System.Drawing.Color.White; + this.roundButton1.Radius = 5; + this.roundButton1.Size = new System.Drawing.Size(150, 30); + this.roundButton1.TabIndex = 19; + this.roundButton1.Text = "放弃修改"; + this.roundButton1.UseVisualStyleBackColor = true; + this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click); + // + // roundButton2 + // + this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton2.EnterForeColor = System.Drawing.Color.White; + this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton2.FlatAppearance.BorderSize = 0; + this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.roundButton2.HoverForeColor = System.Drawing.Color.White; + this.roundButton2.Location = new System.Drawing.Point(528, 474); + this.roundButton2.Name = "roundButton2"; + this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton2.PressForeColor = System.Drawing.Color.White; + this.roundButton2.Radius = 5; + this.roundButton2.Size = new System.Drawing.Size(150, 30); + this.roundButton2.TabIndex = 20; + this.roundButton2.Text = "保存设置"; + this.roundButton2.UseVisualStyleBackColor = true; + this.roundButton2.Click += new System.EventHandler(this.roundButton2_Click); + // // groupBox3 // - this.groupBox3.Controls.Add(this.label12); - this.groupBox3.Controls.Add(this.label14); - this.groupBox3.Controls.Add(this.text_cycEleAddValue); this.groupBox3.Controls.Add(this.label20); this.groupBox3.Controls.Add(this.label21); this.groupBox3.Controls.Add(this.text_cycThreshold2); this.groupBox3.Controls.Add(this.label22); this.groupBox3.Controls.Add(this.label23); this.groupBox3.Controls.Add(this.text_cycThreshold1); - this.groupBox3.Location = new System.Drawing.Point(31, 336); + this.groupBox3.Location = new System.Drawing.Point(31, 313); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(904, 140); + this.groupBox3.Size = new System.Drawing.Size(904, 99); this.groupBox3.TabIndex = 18; this.groupBox3.TabStop = false; this.groupBox3.Text = "周期灵敏度"; // - // label12 - // - this.label12.BackColor = System.Drawing.Color.Transparent; - this.label12.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(372, 91); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(45, 30); - this.label12.TabIndex = 15; - this.label12.Text = "V"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label14 - // - this.label14.BackColor = System.Drawing.Color.Transparent; - this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label14.Location = new System.Drawing.Point(30, 91); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(159, 30); - this.label14.TabIndex = 12; - this.label14.Text = "测量误差电平增加值:"; - this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // text_cycEleAddValue - // - // - // - // - this.text_cycEleAddValue.Border.Class = "TextBoxBorder"; - this.text_cycEleAddValue.Border.CornerDiameter = 5; - this.text_cycEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.text_cycEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.text_cycEleAddValue.Location = new System.Drawing.Point(195, 91); - this.text_cycEleAddValue.Name = "text_cycEleAddValue"; - this.text_cycEleAddValue.PreventEnterBeep = true; - this.text_cycEleAddValue.Size = new System.Drawing.Size(168, 29); - this.text_cycEleAddValue.TabIndex = 11; - // // label20 // this.label20.BackColor = System.Drawing.Color.Transparent; @@ -320,59 +366,19 @@ // // groupBox2 // - this.groupBox2.Controls.Add(this.label13); - this.groupBox2.Controls.Add(this.label15); - this.groupBox2.Controls.Add(this.text_freEleAddValue); this.groupBox2.Controls.Add(this.label16); this.groupBox2.Controls.Add(this.label17); this.groupBox2.Controls.Add(this.text_freThreshold2); this.groupBox2.Controls.Add(this.label18); this.groupBox2.Controls.Add(this.label19); this.groupBox2.Controls.Add(this.text_freThreshold1); - this.groupBox2.Location = new System.Drawing.Point(31, 177); + this.groupBox2.Location = new System.Drawing.Point(31, 191); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(904, 147); + this.groupBox2.Size = new System.Drawing.Size(904, 101); this.groupBox2.TabIndex = 17; this.groupBox2.TabStop = false; this.groupBox2.Text = "频率灵敏度"; // - // label13 - // - this.label13.BackColor = System.Drawing.Color.Transparent; - this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(372, 91); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(45, 30); - this.label13.TabIndex = 15; - this.label13.Text = "V"; - this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label15 - // - this.label15.BackColor = System.Drawing.Color.Transparent; - this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label15.Location = new System.Drawing.Point(30, 91); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(159, 30); - this.label15.TabIndex = 12; - this.label15.Text = "测量误差电平增加值:"; - this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // text_freEleAddValue - // - // - // - // - this.text_freEleAddValue.Border.Class = "TextBoxBorder"; - this.text_freEleAddValue.Border.CornerDiameter = 5; - this.text_freEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.text_freEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.text_freEleAddValue.Location = new System.Drawing.Point(195, 91); - this.text_freEleAddValue.Name = "text_freEleAddValue"; - this.text_freEleAddValue.PreventEnterBeep = true; - this.text_freEleAddValue.Size = new System.Drawing.Size(168, 29); - this.text_freEleAddValue.TabIndex = 11; - // // label16 // this.label16.BackColor = System.Drawing.Color.Transparent; @@ -461,7 +467,7 @@ this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.text_soOutDelay); - this.groupBox1.Location = new System.Drawing.Point(31, 18); + this.groupBox1.Location = new System.Drawing.Point(31, 29); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(904, 145); this.groupBox1.TabIndex = 0; @@ -476,7 +482,7 @@ this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(45, 30); this.label11.TabIndex = 16; - this.label11.Text = "V"; + this.label11.Text = "VRMS"; this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label10 @@ -485,9 +491,9 @@ this.label10.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label10.Location = new System.Drawing.Point(372, 89); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(45, 30); + this.label10.Size = new System.Drawing.Size(65, 30); this.label10.TabIndex = 15; - this.label10.Text = "V"; + this.label10.Text = "VRMS"; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label9 @@ -550,7 +556,7 @@ this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(45, 30); this.label6.TabIndex = 10; - this.label6.Text = "V"; + this.label6.Text = "VRMS"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label7 @@ -616,98 +622,6 @@ this.text_soOutDelay.Size = new System.Drawing.Size(168, 29); this.text_soOutDelay.TabIndex = 5; // - // btnCancel - // - this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; - this.btnCancel.EnterForeColor = System.Drawing.Color.White; - this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnCancel.FlatAppearance.BorderSize = 0; - this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btnCancel.HoverForeColor = System.Drawing.Color.White; - this.btnCancel.Location = new System.Drawing.Point(314, 396); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnCancel.PressForeColor = System.Drawing.Color.White; - this.btnCancel.Radius = 5; - this.btnCancel.Size = new System.Drawing.Size(150, 30); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "放弃修改"; - this.btnCancel.UseVisualStyleBackColor = true; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnSave - // - this.btnSave.EnterBackColor = System.Drawing.Color.Blue; - this.btnSave.EnterForeColor = System.Drawing.Color.White; - this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnSave.FlatAppearance.BorderSize = 0; - this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); - this.btnSave.HoverForeColor = System.Drawing.Color.White; - this.btnSave.Location = new System.Drawing.Point(504, 396); - this.btnSave.Name = "btnSave"; - this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnSave.PressForeColor = System.Drawing.Color.White; - this.btnSave.Radius = 5; - this.btnSave.Size = new System.Drawing.Size(150, 30); - this.btnSave.TabIndex = 0; - this.btnSave.Text = "保存设置"; - this.btnSave.UseVisualStyleBackColor = true; - this.btnSave.Click += new System.EventHandler(this.btnSave_Click); - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(337, 510); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(150, 30); - this.roundButton1.TabIndex = 19; - this.roundButton1.Text = "放弃修改"; - this.roundButton1.UseVisualStyleBackColor = true; - this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click); - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(527, 510); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(150, 30); - this.roundButton2.TabIndex = 20; - this.roundButton2.Text = "保存设置"; - this.roundButton2.UseVisualStyleBackColor = true; - this.roundButton2.Click += new System.EventHandler(this.roundButton2_Click); - // // SettingCtrlForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -743,9 +657,6 @@ private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Label label14; - private DevComponents.DotNetBar.Controls.TextBoxX text_cycEleAddValue; private System.Windows.Forms.Label label20; private System.Windows.Forms.Label label21; private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold2; @@ -753,9 +664,6 @@ private System.Windows.Forms.Label label23; private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold1; private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label15; - private DevComponents.DotNetBar.Controls.TextBoxX text_freEleAddValue; private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label17; private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold2; diff --git a/RbFreqStandMeasure/tools/DetectionHelper.cs b/RbFreqStandMeasure/tools/DetectionHelper.cs new file mode 100644 index 0000000..7280745 --- /dev/null +++ b/RbFreqStandMeasure/tools/DetectionHelper.cs @@ -0,0 +1,278 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using System; +using System.Collections.Generic; +using System.Data; +using System.Diagnostics; +using System.IO; +using System.IO.Ports; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.tools +{ + static class DetectionHelper + { + private static System.Threading.Timer timerAccuracy; + delegate void TimerDelegate(string text); + private static long devId = -1; + private static SerialPort portAccuracy; + + private static DetectionService detectionService = new DetectionServiceImpl(); + private static DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + private static DeviceService deviceService = new DeviceServiceImpl(); + + //1-STABILITY,2-ACCURACY,3-BOOT_FEATURE,4-AGE_RATE + + + public static void detecAccuracy(long deviceId, SerialPort port, DateTime endTime) + { + portAccuracy = port; + devId = deviceId; + TimeSpan secondSpan = new TimeSpan(endTime.Ticks - DateTime.Now.Ticks); + int delay = secondSpan.Milliseconds; + timerAccuracy = new System.Threading.Timer(exeAccuracy,null, delay + 200 ,1000); + } + + private static void exeAccuracy(Object State) + { + string result = ""; + double sum = 0.0; + for (int i = 0; i < 3; i++) + { + string fre = getFrequencyData(portAccuracy); + if (fre.Equals("")) + { + MessageBox.Show("从"+ portAccuracy.PortName + "获取数据失败!"); + return; + } + sum = sum + Convert.ToDouble(fre); + detectionService.add(devId, fre, "2"); + + Thread.Sleep(1000); + } + + result = sum / 3 + ""; + detectionItemService.updateDetecStatus(devId, "", result, "", ""); + + deviceService.updateStatus(devId, "3", ""); + } + + + + + public static SerialPort portOpen(string portName, int bandRate) + { + try + { + SerialPort port = new SerialPort(); + // 搜索串口 + string[] names = SerialPort.GetPortNames(); + if (names.Length == 0 || Array.IndexOf(names, portName) == -1) + { + MessageBox.Show("没有搜索到串口" + portName + "!"); + return null; + } + // 设置串口参数 + port.PortName = names[0]; + port.BaudRate = bandRate; + port.Parity = Parity.None; + port.DataBits = 8; + port.StopBits = StopBits.One; + port.Handshake = Handshake.None; + port.ReadTimeout = -1; + port.WriteTimeout = 3000; + + // 打开串口 + if (!port.IsOpen) + { + port.Open(); + } + if (port.IsOpen) + { + return port; + } + + return null; + } + catch (Exception ex) + { + LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口失败!" + ex.Message); + return null; + } + } + + // 获取检测数据 + public static string getFrequencyData(SerialPort port) + { + string received = ""; + if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1")) + { + int count = 0; + while (count < 5) + { + int readLen = port.BytesToRead; + if (readLen > 0) + { + byte[] buffer = new byte[readLen]; + port.Read(buffer, 0, readLen);// 接收数据到buffer里面 + string data = Encoding.ASCII.GetString(buffer); + string[] dataArray = data.Split(' '); + if (data.StartsWith("$") && dataArray.Length == 2 && data.LastIndexOf('$') == 0) + { + received = dataArray[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0'); + break; + } + } + count++; + } + } + else + { + int count = 0; + while (count < 11) + { + int readLen = port.BytesToRead; + if (readLen > 0) + { + byte[] buffer = new byte[readLen]; + port.Read(buffer, 0, readLen);// 接收数据到buffer里面 + string data = Encoding.ASCII.GetString(buffer); + string[] dataArray = data.Split(' '); + if (dataArray.Length == 3) + { + received = dataArray[2]; + break; + } + } + count++; + } + } + return received; + } + + // 获取铷钟数据 + public static string getClockData(SerialPort port) + { + string clockStatus = ""; + int count = 0; + while (count < 5) + { + int Readlen = port.BytesToRead; + // 接收到数据 + if (Readlen > 0) + { + byte[] buffer = new byte[Readlen]; + port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 + string data = Encoding.ASCII.GetString(buffer); + if (data.StartsWith("$") && data.Contains("*")) + { + string clockStatusCode = data.Split(',')[9]; + switch (clockStatusCode) + { + case "1": clockStatus = "预热"; break; + case "2": clockStatus = "自由运动"; break; + case "3": clockStatus = "捕获"; break; + case "4": clockStatus = "快锁"; break; + case "5": clockStatus = "慢锁"; break; + case "7": clockStatus = "保持"; break; + default: break; + } + break; + } + } + count++; + } + + return clockStatus; + + + } + + // 获取卫星RMC数据 + public static string getSatelliteRMCData(SerialPort port) + { + // RMC + string strRMC = ""; + + int count = 0; + while (count < 5) + { + int Readlen = port.BytesToRead; + if (Readlen > 0) + { + byte[] buffer = new byte[Readlen]; + port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 + string data = Encoding.ASCII.GetString(buffer); + string[] dataArray = data.Split('$'); + if (dataArray.Length > 9) + { + foreach (string sss in dataArray) + { + if (sss.Contains("GNRMC") && sss.Contains("*")) + { + string[] resultArray = sss.Split(','); + + string time = resultArray[1]; + time = time.Substring(0, 2) + ":" + time.Substring(2, 2) + ":" + time.Substring(4); + string status = resultArray[2]=="A"?"定位有效":"警告"; + string date = resultArray[9]; + date = date.Substring(4, 2) + "-" + date.Substring(2, 2) + "-" + date.Substring(0, 2); + + strRMC = date + "," + time + "," + status; + } + } + } + } + count++; + } + + return strRMC; + } + + // 获取卫星GSV数据 + public static string getSatelliteGSVData(SerialPort port) + { + // RMC + string strRMC = ""; + + int count = 0; + while (count < 5) + { + int Readlen = port.BytesToRead; + if (Readlen > 0) + { + byte[] buffer = new byte[Readlen]; + port.Read(buffer, 0, Readlen);// 接收数据到buffer里面 + string data = Encoding.ASCII.GetString(buffer); + string[] dataArray = data.Split('$'); + if (dataArray.Length > 9) + { + foreach (string sss in dataArray) + { + if (sss.Contains("GNRMC") && sss.Contains("*")) + { + string[] resultArray = sss.Split(','); + + string time = resultArray[1]; + time = time.Substring(0, 2) + ":" + time.Substring(2, 2) + ":" + time.Substring(4); + string status = resultArray[2] == "A" ? "定位有效" : "警告"; + string date = resultArray[9]; + date = date.Substring(4, 2) + "-" + date.Substring(2, 2) + "-" + date.Substring(0, 2); + + strRMC = date + "," + time + "," + status; + } + } + } + } + count++; + } + + return strRMC; + } + } +} \ No newline at end of file