| | |
| | | BackgroundColor = 0x1F5C62FE, |
| | | BorderColor = CSS_Color.MainColor, |
| | | BorderWidth = 2, |
| | | Radius = 1, |
| | | }; |
| | | showDataTypeView.AddChidren(btnShowHistroyData_Day); |
| | | btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft); |
| | |
| | | IsSelected = false, |
| | | BorderWidth = 1, |
| | | BorderColor = CSS_Color.PromptingColor1, |
| | | Radius = 1, |
| | | }; |
| | | showDataTypeView.AddChidren(btnShowHistroyData_Month); |
| | | btnShowHistroyData_Month.BorderWidth = 1; |
| | | btnShowHistroyData_Month.BorderColor = CSS_Color.PromptingColor1; |
| | | |
| | | var btnShowHistroyData_Year = new Button() |
| | | { |
| | |
| | | IsSelected = false, |
| | | BorderWidth = 1, |
| | | BorderColor = CSS_Color.PromptingColor1, |
| | | Radius = 1, |
| | | }; |
| | | showDataTypeView.AddChidren(btnShowHistroyData_Year); |
| | | btnShowHistroyData_Year.BorderWidth = 1; |
| | | btnShowHistroyData_Year.BorderColor = CSS_Color.PromptingColor1; |
| | | |
| | | var btnShowHistroyData_Total = new Button() |
| | | { |
| | |
| | | IsSelected = false, |
| | | BorderWidth = 1, |
| | | BorderColor = CSS_Color.PromptingColor1, |
| | | Radius = 1, |
| | | }; |
| | | showDataTypeView.AddChidren(btnShowHistroyData_Total); |
| | | btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight); |
| | |
| | | { |
| | | return; |
| | | } |
| | | curQueryType = "total"; |
| | | |
| | | (sender as Button).SelectedBackgroundColor = 0x1F5C62FE; |
| | | (sender as Button).BackgroundColor = 0x1F5C62FE; |
| | | (sender as Button).BorderColor = CSS_Color.MainColor; |
| | |
| | | btnShowHistroyData_Day.BackgroundColor = 0x00000000; |
| | | btnShowHistroyData_Day.SelectedBackgroundColor = 0x00000000; |
| | | |
| | | |
| | | |
| | | #if __IOS__ |
| | | btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft); |
| | | btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight); |
| | | #endif |
| | | }; |
| | | |
| | | btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) => |
| | |
| | | btnShowHistroyData_Total.BackgroundColor = 0x00000000; |
| | | btnShowHistroyData_Total.SelectedBackgroundColor = 0x00000000; |
| | | |
| | | #if __IOS__ |
| | | btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft); |
| | | btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight); |
| | | #endif |
| | | curQueryType = "hour"; |
| | | brokenLine.YvalueText = ""; |
| | | LoadMothed_GetHistoryData(); |
| | |
| | | btnShowHistroyData_Total.BackgroundColor = 0x00000000; |
| | | btnShowHistroyData_Total.SelectedBackgroundColor = 0x00000000; |
| | | |
| | | #if __IOS__ |
| | | btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft); |
| | | btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight); |
| | | #endif |
| | | curQueryType = "month"; |
| | | brokenLine.YvalueText = ""; |
| | | LoadMothed_GetHistoryData(); |
| | |
| | | { |
| | | return; |
| | | } |
| | | |
| | | (sender as Button).SelectedBackgroundColor = 0x1F5C62FE; |
| | | (sender as Button).BackgroundColor = 0x1F5C62FE; |
| | | (sender as Button).BorderColor = CSS_Color.MainColor; |
| | |
| | | btnShowHistroyData_Total.BackgroundColor = 0x00000000; |
| | | btnShowHistroyData_Total.SelectedBackgroundColor = 0x00000000; |
| | | |
| | | #if __IOS__ |
| | | btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft); |
| | | btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight); |
| | | #endif |
| | | |
| | | curQueryType = "year_month"; |
| | | brokenLine.YvalueText = ""; |
| | |
| | | btnTitlea.MouseUpEventHandler = (sender, e) => { |
| | | var skipView = new AirSwitchP3SubloopEnergyPage(device,FunctionAttributeKey.ElectricityA); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(); |
| | | skipView.LoadPage(StringId.RealTimeElectricityConsumptionDataOfPhaseA); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnTitlea.MouseUpEventHandler = (sender, e) => { |
| | | |
| | | btnTitleb.MouseUpEventHandler = (sender, e) => { |
| | | var skipView = new AirSwitchP3SubloopEnergyPage(device, FunctionAttributeKey.ElectricityB); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(); |
| | | skipView.LoadPage(StringId.RealTimeElectricityConsumptionDataOfPhaseB); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnTitlea.MouseUpEventHandler = (sender, e) => { |
| | | |
| | | btnTitlec.MouseUpEventHandler = (sender, e) => { |
| | | var skipView = new AirSwitchP3SubloopEnergyPage(device, FunctionAttributeKey.ElectricityC); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(); |
| | | skipView.LoadPage(StringId.RealTimeElectricityConsumptionDataOfPhaseC); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString()); |
| | | if (revertData == null || revertData.Count == 0 || true) { |
| | | #if DEBUG |
| | | if (revertData == null || revertData.Count == 0) { |
| | | List<string> vs = new List<string>() { |
| | | "1","2","3","4", |
| | | "5","6","7","8", |
| | |
| | | } |
| | | device.SetAttrState("ydata", brokenLine.InitYdataText2(device.name, revertData, "#5C62FE", curQueryType == "year_month") + ", "); |
| | | |
| | | } |
| | | else |
| | | #endif |
| | | } |
| | | else |
| | | { |
| | | List<string> vs = new List<string>(); |
| | | if (brokenLine.YvalueText == "") |