| | |
| | | double tt = 0; |
| | | double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out tt); |
| | | tt *= 100;//乘以100,小于1无法加载echart |
| | | tt = Math.Round(tt, 2); |
| | | list.Add(ene.name, tt.ToString()); |
| | | } |
| | | myEchartsView_Pie.ShowWithOption(new EchartsOption_Pie().InitDateJson(list)); |
| | |
| | | |
| | | row.Y = btnLine.Bottom; |
| | | view.AddChidren(row); |
| | | //记录需要更新的更新按钮 |
| | | listButton_value.Add(row.btnValue); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 记录需要更新的更新按钮 |
| | | /// </summary> |
| | | public List<Button> listButton_value = new List<Button>(); |
| | | |
| | | /// <summary> |
| | |
| | | var newValue = updataTemp.GetAttrState(FunctionAttributeKey.Power); |
| | | //if (newValue != btn.Text) |
| | | { |
| | | btn.Text = newValue; |
| | | btn.Text = Math.Round(double.Parse(newValue), 2).ToString(); |
| | | UpdataValue(); |
| | | } |
| | | } |
| | |
| | | Dictionary<string, string> list = new Dictionary<string, string>();//饼图数据 |
| | | foreach (var ene in bodyView.energyList) |
| | | { |
| | | double power = 0; |
| | | double power = 0.00; |
| | | double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out power); |
| | | power = Math.Round(power, 2); |
| | | totalValue += power; |
| | | |
| | | int realTimePower = 0; |
| | | int.TryParse(ene.GetAttrState(FunctionAttributeKey.Power), out realTimePower); |
| | | double realTimePower = 0; |
| | | double.TryParse(ene.GetAttrState(FunctionAttributeKey.Power), out realTimePower); |
| | | realtimeValue += realTimePower; |
| | | realtimeValue = Math.Round(realtimeValue, 2); |
| | | |
| | | #region 饼图数据 |
| | | double tt = 0; |
| | | double tt = 0.00; |
| | | double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out tt); |
| | | tt = Math.Round(tt, 2); |
| | | tt *= 100;//乘以100,小于1无法加载echart |
| | | list.Add(ene.name, tt.ToString()); |
| | | #endregion |