diff --git a/INT69DC_7C/DataStore.cs b/INT69DC_7C/DataStore.cs index db82067..fea436c 100644 --- a/INT69DC_7C/DataStore.cs +++ b/INT69DC_7C/DataStore.cs @@ -3754,7 +3754,7 @@ namespace INT69DC_7C ret = 0.0; else { - sValue = string.Format("{0:0.0}", ((double)this.ExNgTotalCount / (double)this.TotalCount) * 100); + sValue = string.Format("{0:0.00}", ((double)this.ExNgTotalCount / (double)this.TotalCount) * 100.0); ret = double.Parse(sValue); } diff --git a/INT69DC_7C/Forms/FormDataStatistics.cs b/INT69DC_7C/Forms/FormDataStatistics.cs index b004a3b..7a7d047 100644 --- a/INT69DC_7C/Forms/FormDataStatistics.cs +++ b/INT69DC_7C/Forms/FormDataStatistics.cs @@ -437,10 +437,10 @@ namespace INT69DC_7C.Forms this.SetLabelText(this.labelTareRange, commonList.TareRange); this.SetLabelText(this.labelTotalCount, string.Format("{0}", commonList.TotalCount.ToString())); - this.SetLabelText(this.labelTotalUnderCount, string.Format("{0} / {1}", commonList.TotalUnderCount, commonList.TotalUnderPercentage)); - this.SetLabelText(this.labelTotalPassCount, string.Format("{0} / {1}", commonList.TotalPassCount, commonList.TotalPassPercentage)); - this.SetLabelText(this.labelTotalOverCount, string.Format("{0} / {1}", commonList.TotalOverCount, commonList.TotalOverPercentage)); - this.SetLabelText(this.labelTotalExNgCount, string.Format("{0} / {1}", commonList.TotalExNgCount, commonList.TotalExNgPercentage)); + this.SetLabelText(this.labelTotalUnderCount, string.Format("{0} / {1:0.00}", commonList.TotalUnderCount, commonList.TotalUnderPercentage)); + this.SetLabelText(this.labelTotalPassCount, string.Format("{0} / {1:0.00}", commonList.TotalPassCount, commonList.TotalPassPercentage)); + this.SetLabelText(this.labelTotalOverCount, string.Format("{0} / {1:0.00}", commonList.TotalOverCount, commonList.TotalOverPercentage)); + this.SetLabelText(this.labelTotalExNgCount, string.Format("{0} / {1:0.00}", commonList.TotalExNgCount, commonList.TotalExNgPercentage)); this.SetLabelText(this.labelTotalNGCount, string.Format("{0}", commonList.TotalNGCount.ToString())); this.SetLabelText(this.labelTotalPassAverage, string.Format("{0:0.000}", commonList.TotalPassAverageWeight)); @@ -452,21 +452,21 @@ namespace INT69DC_7C.Forms { this.SetLabelText(this.CollectionPassCount[i], datas[i].PassTotalCount.ToString()); this.SetLabelText(this.CollectionPassAverage[i], string.Format("{0:0.000}", datas[i].PassAverage)); - this.SetLabelText(this.CollectionPassPercentage[i], datas[i].PassPercentage.ToString()); + this.SetLabelText(this.CollectionPassPercentage[i], string.Format("{0:0.00}", datas[i].PassPercentage)); this.SetLabelText(this.CollectionPassSD[i], string.Format("{0:0.00}", datas[i].PassStandardDeviation)); this.SetLabelText(this.CollectionPassMinWeight[i], Helper.DoubleToString(datas[i].PassMinWeight, 1)); this.SetLabelText(this.CollectionPassMaxWeight[i], Helper.DoubleToString(datas[i].PassMaxWeight, 1)); this.SetLabelText(this.CollectionOverCount[i], datas[i].OverTotalCount.ToString()); this.SetLabelText(this.CollectionOverSumWeight[i], Helper.DoubleToString(datas[i].OverSumWeight / 1000, 3)); - this.SetLabelText(this.CollectionOverPercentage[i], datas[i].OverPercentage.ToString()); + this.SetLabelText(this.CollectionOverPercentage[i], string.Format("{0:0.00}", datas[i].OverPercentage)); this.SetLabelText(this.CollectionUnderCount[i], datas[i].UnderTotalCount.ToString()); this.SetLabelText(this.CollectionUnderSumWeight[i], Helper.DoubleToString(datas[i].UnderSumWeight / 1000, 3)); - this.SetLabelText(this.CollectionUnderPercentage[i], datas[i].UnderPercentage.ToString()); + this.SetLabelText(this.CollectionUnderPercentage[i], string.Format("{0:0.00}", datas[i].UnderPercentage)); this.SetLabelText(this.CollectionExNgCount[i], datas[i].ExNgTotalCount.ToString()); - this.SetLabelText(this.CollectionExNgPercentage[i], datas[i].ExNgPercentage.ToString()); + this.SetLabelText(this.CollectionExNgPercentage[i], string.Format("{0:0.00}", datas[i].ExNgPercentage)); this.SetLabelText(this.CollectionTotalCount[i], datas[i].TotalCount.ToString()); this.SetLabelText(this.CollectionTotalNGCount[i], datas[i].TotalNGCount.ToString());