public override string ToString() { string content = "当前状态 : " + FaultTitle + "\r\n太阳能电压 : " + Field1.ToString("0.00") + " V\r\n超容电压 : " + Field2.ToString("0.00") + " V\r\n超容电流 : " + Field3.ToString("0.00") + " A\r\n功率 : " + Field4.ToString("0.00") + " W\r\n温度 : " + Field5.ToString("0.00") + " ℃"; if (Field6 > 100) { content += "\r\n更新时间 : " + CreateTime; } else { content += "\r\n超容余量 : " + Field6.ToString("0.00") + " %\r\n更新时间 : " + CreateTime; } return(content); }
public string ToOldString() { string content = "当前状态 : " + FaultTitle + "\r\n太阳能电压 : " + Field1.ToString("0.00") + " V\r\n超容电压 : " + Field2.ToString("0.00") + " V\r\n超容电流 : " + Field3.ToString("0.00") + " A\r\n功率 : " + Field4.ToString("0.00") + " W\r\n温度 : " + Field5.ToString("0.00") + " ℃"; content += "\r\n更新时间 : " + CreateTime; return(content); }