hxb
2021-07-21 d4ff2cb026bfa348c62651c0547511eede9f94f3
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -595,18 +595,18 @@
            };
            selfInfoView.AddChidren(btnSeltSensorValue);
            Button btnShowData;
            btnShowData = new Button()
            {
                X = Application.GetRealWidth(291),
                Y = Application.GetRealWidth(62),
                Width = Application.GetMinRealAverage(32),
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png",
                SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png",
                IsSelected = true,
            };
            selfInfoView.AddChidren(btnShowData);
            //Button btnShowData;
            //btnShowData = new Button()
            //{
            //    X = Application.GetRealWidth(291),
            //    Y = Application.GetRealWidth(62),
            //    Width = Application.GetMinRealAverage(32),
            //    Height = Application.GetMinRealAverage(32),
            //    UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png",
            //    SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png",
            //    IsSelected = true,
            //};
            //selfInfoView.AddChidren(btnShowData);
            //btnShowData.MouseUpEventHandler = (sender, e) => {
            //    btnShowData.IsSelected = !btnShowData.IsSelected;
            //    if(btnShowData.IsSelected)
@@ -644,7 +644,9 @@
            bool initTitleButton = true;
            foreach (var tempSensor in FunctionList.List.GetEnvirSensorsList())
            var tempList = FunctionList.List.GetEnvirSensorsList();
            foreach (var tempSensor in tempList)
            {
                if (tempSensor.sid == function.sid)
                {
@@ -675,7 +677,7 @@
                #region 其它传感器信息栏
                FrameLayout otherInfoView = new FrameLayout()
                {
                    Gravity = Gravity.CenterVertical,
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealWidth(100),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
@@ -739,7 +741,11 @@
                {
                    Action backAction = () =>
                    {
                        btnSeltSensorName.Text = tempSensor.name;
                        MainPage.Log("45678i");
                        Application.RunOnMainThread(() =>
                        {
                            btnSeltSensorName.Text = tempSensor.name;
                        });
                    };
                    var infoView = new FunctionBaseInfoSetPage(tempSensor, backAction);
                    MainPage.BasePageView.AddChidren(infoView);
@@ -774,21 +780,26 @@
                    btnShowData1.IsSelected = !btnShowData1.IsSelected;
                    if (btnShowData1.IsSelected)
                    {
                        if (!showFunctions.Contains(function))
                        if (!showFunctions.Contains(tempSensor))
                        {
                            showFunctions.Add(function);
                            showFunctions.Add(tempSensor);
                        }
                    }
                    else
                    {
                        if (showFunctions.Contains(function))
                        if (showFunctions.Contains(tempSensor))
                        {
                            showFunctions.Remove(function);
                            showFunctions.Remove(tempSensor);
                        }
                    }
                    LoadMothed_GetSensorHistoryData();
                };
                #endregion
                contentView.AddChidren(new Button()
                {
                    Height = Application.GetRealHeight(12),
                });
            }
            #endregion
@@ -826,7 +837,7 @@
                    string yDataString = "";
                    foreach (var sr in FunctionList.List.GetEnvirSensorsList())
                    foreach (var sr in showFunctions)
                    {
                        if (sr.spk != function.spk)
                        {
@@ -839,7 +850,9 @@
                        }
                        var sensorType = sr.spk.Split(".")[1];
                        var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, sr.deviceId,"value");
                        var queryType = sr.GetAttrState("spk")==null? "value": sr.GetAttrState("spk");
                        var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, sr.deviceId, queryType);
                        if (revertObj != null)
                        {
                            if (revertObj.Code == StateCode.SUCCESS)