wxr
2021-12-27 da5999ee08de8f6267a4ed491b79b36649c52186
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs
@@ -174,11 +174,11 @@
            #region 选择数据日期范围
            var showDataTypeView = new FrameLayout()
            {
                X = Application.GetRealWidth(183),
                X = Application.GetRealWidth(136),
                Y = Application.GetRealHeight(12),
                Width = Application.GetRealWidth(144),
                Width = Application.GetRealWidth(144+47),
                Height = Application.GetRealHeight(24),
                BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png",
                BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png",
            };
            diagramView.AddChidren(showDataTypeView);
@@ -214,41 +214,68 @@
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = Language.StringByID(StringId.month),//DateTime.Now.Month.ToString() +
                Text = Language.StringByID(StringId.month)
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Month);
            var btnShowHistroyData_Year = new Button()
            {
                X = Application.GetRealWidth(48 * 3),
                Width = Application.GetRealWidth(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = Language.StringByID(StringId.Years),
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Year);
            btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png";
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png";
                btnShowHistroyData_Day.IsSelected = true;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Week.IsSelected = false;
                btnShowHistroyData_Year.IsSelected = false;
                curQueryType = "hour";
                brokenLine.YvalueText = "";
                    LoadMothed_GetHistoryData();
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Week.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg2.png";
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Week.IsSelected = true;
                btnShowHistroyData_Year.IsSelected = false;
                curQueryType = "week";
                brokenLine.YvalueText = "";
                    LoadMothed_GetHistoryData();
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Month.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg3.png";
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = true;
                btnShowHistroyData_Week.IsSelected = false;
                btnShowHistroyData_Year.IsSelected = false;
                curQueryType = "month";
                brokenLine.YvalueText = "";
                    LoadMothed_GetHistoryData();
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Year.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Year.IsSelected = true;
                btnShowHistroyData_Week.IsSelected = false;
                curQueryType = "year_month";
                brokenLine.YvalueText = "";
                LoadMothed_GetHistoryData();
            };
            #endregion