| | |
| | | |
| | | Button btnRighta = new Button() |
| | | { |
| | | X = Application.GetRealWidth(221), |
| | | X = Application.GetRealWidth(201), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(116), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = 0xFF768194, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = "---V", |
| | | Text = "--- V", |
| | | }; |
| | | viewa.AddChidren(btnRighta); |
| | | |
| | |
| | | |
| | | Button btnRightb = new Button() |
| | | { |
| | | X = Application.GetRealWidth(221), |
| | | X = Application.GetRealWidth(201), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(116), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = 0xFF768194, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = "---A", |
| | | Text = "--- A", |
| | | }; |
| | | viewb.AddChidren(btnRightb); |
| | | |
| | |
| | | |
| | | Button btnRightc = new Button() |
| | | { |
| | | X = Application.GetRealWidth(221), |
| | | X = Application.GetRealWidth(201), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(116), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = 0xFF768194, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = "---W", |
| | | Text = "--- W", |
| | | }; |
| | | viewc.AddChidren(btnRightc); |
| | | |
| | |
| | | }; |
| | | historyDataView.AddChidren(myEchartsView_Line); |
| | | |
| | | //EnergyRow(energy, energyListView, index); |
| | | var btnTip = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(289), |
| | | Height = Application.GetRealHeight(41), |
| | | Width = Application.GetRealWidth(300), |
| | | TextAlignment = TextAlignment.Center, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextID = StringId.AirSwitchP3HistroyTip1, |
| | | }; |
| | | historyDataView.AddChidren(btnTip); |
| | | |
| | | LoadMothed_GetHistoryData(); |
| | | |
| | |
| | | }; |
| | | totalElectricityView.AddChidren(btnTotalElectricity); |
| | | |
| | | |
| | | double totalNumber = 0.00; |
| | | double.TryParse(device.GetAttrState(key), out totalNumber); |
| | | var btnTotalNumber = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(27), |
| | |
| | | TextSize = 49, |
| | | TextColor = 0xFF030D1C, |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = device.GetAttrState(FunctionAttributeKey.TotalElectricity), |
| | | Text = totalNumber.ToString("F2"), |
| | | }; |
| | | totalElectricityView.AddChidren(btnTotalNumber); |
| | | |
| | | |
| | | btnShowHistroyData_Day.MouseUpEventHandler += (sender, e) => { |
| | | totalElectricityView.RemoveFromParent(); |
| | |
| | | //viewa.Visible = true; |
| | | //viewb.Visible = true; |
| | | //viewc.Visible = true; |
| | | historyDataView.Height = Application.GetRealHeight(330); |
| | | btnTip.TextID = StringId.AirSwitchP3HistroyTip1; |
| | | historyDataView.Height = Application.GetRealWidth(330); |
| | | }; |
| | | btnShowHistroyData_Month.MouseUpEventHandler += (sender, e) => { |
| | | totalElectricityView.RemoveFromParent(); |
| | |
| | | //viewa.Visible = true; |
| | | //viewb.Visible = true; |
| | | //viewc.Visible = true; |
| | | historyDataView.Height = Application.GetRealHeight(330); |
| | | btnTip.TextID = StringId.AirSwitchP3HistroyTip2; |
| | | historyDataView.Height = Application.GetRealWidth(330); |
| | | }; |
| | | btnShowHistroyData_Year.MouseUpEventHandler += (sender, e) => { |
| | | totalElectricityView.RemoveFromParent(); |
| | |
| | | //viewa.Visible = true; |
| | | //viewb.Visible = true; |
| | | //viewc.Visible = true; |
| | | historyDataView.Height = Application.GetRealHeight(330); |
| | | btnTip.TextID = StringId.AirSwitchP3HistroyTip3; |
| | | historyDataView.Height = Application.GetRealWidth(330); |
| | | }; |
| | | btnShowHistroyData_Total.MouseUpEventHandler += (sender, e) => { |
| | | myEchartsView_Line.RemoveFromParent(); |