wxr
2022-04-08 271c46f52e74845dac76fa5ece4eb8b94d9168f4
金茂温控器
10个文件已添加
19个文件已修改
1330 ■■■■■ 已修改文件
DLL/Scan/HDL.Shared.IOS.ScanQRCode.dll 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Application.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/DataIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/JinMaoIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/hvaccac.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Other/JPush/JPushReceiver.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/DataIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/JinMaoIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/hvaccac.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/AppUnlockPage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmebly.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacControlPage.cs 545 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacDayHistoryPage.cs 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacHistoryChoosePage.cs 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacWeekHistoryPage.cs 342 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Scan/HDL.Shared.IOS.ScanQRCode.dll
Binary files differ
HDL-ON_Android/Application.cs
@@ -84,6 +84,7 @@
                BusSocketStart();
                //后台回到前台
                new HDL_ON.UI.AppUnlockPage().LoadPage();
            }
        }
@@ -114,11 +115,6 @@
        public int mCount;
        ///// <summary>
        ///// 是否进入后台
        ///// </summary>
        //public bool IsEnterBackground = false;
        /// <summary>
        /// 进入后台的时间
        /// </summary>
@@ -129,7 +125,6 @@
        /// </summary>
        void BusSocketStop()
        {
            //IsEnterBackground = true;
            CloseTime = DateTime.Now;
            MainPage.IsEnterBackground = true;
            //进入后台mqtt正在连接重置状态
@@ -143,8 +138,6 @@
        /// </summary>
        void BusSocketStart()
        {
            //IsEnterBackground = false;
            if (CloseTime.AddSeconds(10) < DateTime.Now)
            {
                //后台超过10s就断开MQTT重连
HDL-ON_Android/Assets/Language.ini
@@ -518,6 +518,11 @@
530=In order to prevent the wrong touch and click of opening and closing the door and ensure family safety, please enter your door lock password.
531=Password free unlocking within five minutes
532=The device is offline and cannot be operated temporarily
533=Statistical Chart
534=Data
535=Dew point temperature
536=Temperature statistics
537=Humidity statistics
1000=Room Humidity
@@ -1659,6 +1664,11 @@
530=为防止开关门的误触点击,保证家庭安全,请输入您的门锁开门密码。
531=五分钟内免密码开锁
532=设备离线中,暂时无法操作
533=24小时统计图
534=数据
535=露点温度
536=温度统计图
537=湿度统计图
 
1000=室内湿度
1001=童锁
@@ -2781,6 +2791,11 @@
530=In order to prevent the wrong touch and click of opening and closing the door and ensure family safety, please enter your door lock password.
531=Password free unlocking within five minutes
532=The device is offline and cannot be operated temporarily
533=Statistical Chart
534=Data
535=Dew point temperature
536=Temperature statistics
537=Humidity statistics
@@ -3403,3 +3418,6 @@
10031=Устройство не должно быть пустым.
10032=У пользователя нет разрешения.
10033=Устройство не существует.
HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/DataIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/JinMaoIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/hvaccac.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -230,6 +230,9 @@
    <AndroidAsset Include="Assets\Phone\Public\MsgIcon\CallIcon.png" />
    <AndroidAsset Include="Assets\Phone\Public\MsgIcon\AnswerIcon.png" />
    <AndroidAsset Include="Assets\Phone\Public\MsgIcon\HangUpIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\CAC\DataIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\CAC\JinMaoIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\hvaccac.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\values\colors.xml" />
@@ -1436,6 +1439,7 @@
  <ItemGroup>
    <Folder Include="libs\arm64-v8a\" />
    <Folder Include="Zxing\" />
    <Folder Include="Assets\Phone\FunctionIcon\CAC\" />
  </ItemGroup>
  <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" />
  <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -37,6 +37,9 @@
            //2020-12-23 解决点击通知栏打开不了APP问题
            //base.OnNotifyMessageOpened(context, notificationMessage);
            //NotificationManager NotifyManager = (NotificationManager)GetSystemService(Context.NotificationService);
            //NotificationManager notificationManager = NotifyManager;
            OpenNotification(context, notificationMessage);
        }
@@ -83,7 +86,11 @@
            {
                HDLCommon.Current.AdjustPushMessage(pushMes);
            });
            if (!MainPage.IsEnterBackground)
            {
                NotificationManager nMgr = (NotificationManager)Shared.Application.Activity.GetSystemService(Context.NotificationService);
                nMgr.CancelAll();
            }
        }
        /// <summary>
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -484,6 +484,7 @@
        <Folder Include="Resources\Phone\PersonalCenter\FacePassage\" />
        <Folder Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\" />
        <Folder Include="Base.lproj\" />
        <Folder Include="Resources\Phone\FunctionIcon\CAC\" />
    </ItemGroup>
    <ItemGroup>
        <InterfaceDefinition Include="LaunchScreen.storyboard" />
@@ -1388,6 +1389,9 @@
      <BundleResource Include="Resources\Phone\Public\MsgIcon\CallIcon.png" />
      <BundleResource Include="Resources\Phone\Public\MsgIcon\AnswerIcon.png" />
      <BundleResource Include="Resources\Phone\Public\MsgIcon\HangUpIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\CAC\DataIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\CAC\JinMaoIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\hvaccac.png" />
    </ItemGroup>
    <ItemGroup>
      <ITunesArtwork Include="iTunesArtwork" />
HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/DataIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/JinMaoIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/hvaccac.png
HDL_ON/Common/R.cs
@@ -6,6 +6,27 @@
    {
        /// <summary>
        /// 湿度统计图
        /// </summary>
        public const int HumidityStatistics = 537;
        /// <summary>
        /// 温度统计图
        /// </summary>
        public const int TemperatureStatistics = 536;
        /// <summary>
        /// 露点温度
        /// </summary>
        public const int DewPointTemp = 535;
        /// <summary>
        /// 数据
        /// </summary>
        public const int Data = 534;
        /// <summary>
        /// 24小时统计图
        /// </summary>
        public const int StatisticalChart24Hour = 533;
        /// <summary>
        /// 设备离线中,暂时无法操作
        /// </summary>
        public const int DeviceOfflineCannotOption = 532;
HDL_ON/DAL/DriverLayer/Control.cs
@@ -1066,6 +1066,10 @@
                                break;
                            case SPK.CurtainShades:
                                break;
                            case SPK.HvacCac:
                                Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status);
                                break;
                            case SPK.AcStandard:
                            case SPK.HvacAC:
                            case SPK.AcIr:
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1029,10 +1029,10 @@
#endif
                //是否生产模式
                bool isProduce = true;
#if DEBUG
                isProduce = false;
#endif
                if (HttpUtil.GlobalRequestHttpsHost == "https://test-gz.hdlcontrol.com")
                {
                    isProduce = false;
                }
                if (string.IsNullOrEmpty(OnAppConfig.Instance.PushDeviceToken))
                {
                    Utlis.WriteLine("PushDeviceToken 为空");
HDL_ON/Entity/Function/Function.cs
@@ -1264,6 +1264,7 @@
            spkList.Add(AcStandard);
            spkList.Add(HvacAC);
            spkList.Add(AcIr);
            spkList.Add(HvacCac);
            return spkList;
        }
        #endregion
HDL_ON/HDL_ON.projitems
@@ -490,6 +490,9 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\FirmwareUpdateView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockUnlockPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\CacControlPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\CacWeekHistoryPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\CacDayHistoryPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\CacHistoryChoosePage.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
HDL_ON/UI/UI0-Public/AppUnlockPage.cs
@@ -95,6 +95,7 @@
                                HDLCommon.Current.AdjustPushMessage(UserInfo.Current.pushMessageInfo);
                            });
                        }
                        return;
                    }
                }
HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -428,6 +428,10 @@
        /// </summary>
        public void TipLinphoneCall(String msg, ESVideoInfo mESVideoInfo)
        {
            if (UserInfo.Current.alreadyShowCallInDialog)
            {
                return;
            }
            UserInfo.Current.alreadyShowCallInDialog = true;
            Dialog dialog = new Dialog();
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -182,6 +182,10 @@
                        var acPage = new AcControlPage();
                        acPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.HvacCac:
                        var cacPage = new CacControlPage();
                        cacPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.IrLearn:
                        var irLearinPage = new IrLearnPage();
                        irLearinPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -649,6 +649,25 @@
            //});
            FunctionList.List.Functions.Add(new Function()
            {
                spk = SPK.HvacCac,
                name = "测试金茂温控枸杞",
                attributes = new List<FunctionAttributes>()
                {
                    new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
                    new FunctionAttributes(){ key = "mode",curValue= "cool",state = "cool" ,value = new List<string>(){ "cool", "heat" } },
                    new FunctionAttributes(){ key = "set_temp",curValue= "22",state = "22" ,value = new List<string>(){},min = 0,max = 30 },
                    //new FunctionAttributes(){ key = "set_temp_step",curValue= "low",state = "low" ,value = new List<string>(){ "high", "medium", "low", "auto", "stop" } },
                    new FunctionAttributes(){ key = "humidity",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "room_temp",curValue= "26",state = "26" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "dew_point_temp",curValue= "20",state = "20" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "room_humidity",curValue= "20",state = "20" ,value = new List<string>(){  },min = 0,max = 1000 },
                    //new FunctionAttributes(){ key = "tvoc",curValue= "20",state = "20" ,value = new List<string>(){  },min = 0,max = 100 },
                },
            });
            //FunctionList.List.Functions.Add(new Function()
            //{
            //    spk = SPK.HvacAirFreshJinmao,
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -61,6 +61,7 @@
                //空调
                case SPK.AcStandard:
                case SPK.HvacAC:
                case SPK.HvacCac://毛细空调
                //地热
                case SPK.FloorHeatStandard:
                case SPK.HvacFloorHeat:
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -356,6 +356,9 @@
            strPath = "LogicIcon/airconditionerlogic.png";
          }
          break;
        case SPK.HvacCac:
            strPath = "FunctionIcon/Icon/hvaccac.png";
            break;
        case SPK.FloorHeatStandard:
        case SPK.HvacFloorHeat:
          {
@@ -518,6 +521,7 @@
            {
                functionTypeList.Add(SPK.AcStandard);
                functionTypeList.Add(SPK.HvacAC);
                functionTypeList.Add(SPK.HvacCac);
            }
            ///地暖类
            else if (deviceType == Language.StringByID(StringId.FloorHeating))
@@ -604,7 +608,7 @@
                functionTypeList.Add(SPK.AirSwitch);
                functionTypeList.Add(SPK.PanelSocket);
                functionTypeList.Add(SPK.ElectricSocket);
                functionTypeList.Add(SPK.HvacCac);
            }
@@ -657,6 +661,7 @@
            deviceTypeList.Add(SPK.AirSwitch);
            deviceTypeList.Add(SPK.PanelSocket);
            deviceTypeList.Add(SPK.ElectricSocket);
                        deviceTypeList.Add(SPK.HvacCac);
          }
          break;
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacControlPage.cs
@@ -37,10 +37,6 @@
        /// </summary>
        Button btnMode;
        /// <summary>
        /// 扫风按钮
        /// </summary>
        Button btnSwing;
        /// <summary>
        /// 风速按钮
        /// </summary>
        Button btnWindSpeed;
@@ -118,6 +114,17 @@
        /// </summary>
        private void InitFrameWhiteContent1()
        {
            Button btnJinmaoIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(94),
                Width = Application.GetRealWidth(164),
                Height = Application.GetRealHeight(43),
                UnSelectedImagePath = "FunctionIcon/CAC/JinMaoIcon.png"
            };
            FrameWhiteCentet1.AddChidren(btnJinmaoIcon);
            temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
            arcBar = new DiyArcSeekBar()
            {
@@ -183,7 +190,7 @@
                Y = btnTemp.Bottom,
                Width = Application.GetRealWidth(120),
                Height = Application.GetRealHeight(20),
                Text = Language.StringByID(StringId.IndoorTemp) + "20°C",
                Text = Language.StringByID(StringId.IndoorTemp) + "20°C/" + Language.StringByID(StringId.Humidity) +"45%",
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            };
@@ -215,34 +222,45 @@
                Y = Application.GetRealHeight(334),
                Width = Application.GetRealWidth(30),
                Height = Application.GetRealWidth(30),
                UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)),
                UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode),true),
            };
            FrameWhiteCentet1.AddChidren(btnMode);
            btnSwing = new Button()
            Button btnModeText = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(330),
                Width = Application.GetRealWidth(40),
                Height = Application.GetRealWidth(40),
                UnSelectedImagePath = "FunctionIcon/AC/SweepIconNullOn.png",
                X = Application.GetRealWidth(30),
                Y = btnMode.Bottom,
                Width = Application.GetRealWidth(90),
                Height = Application.GetRealHeight(20),
                TextAlignment = TextAlignment.Center,
                TextSize = 12,
                TextColor = CSS_Color.TextualColor,
                TextID = StringId.Mode
            };
            if (device.GetAttribute(FunctionAttributeKey.Swing) != null)
            {
                FrameWhiteCentet1.AddChidren(btnSwing);
            }
            FrameWhiteCentet1.AddChidren(btnModeText);
            btnWindSpeed = new Button()
            {
                X = Application.GetRealWidth(235),
                Y = Application.GetRealHeight(337),
                Width = Application.GetRealWidth(30),
                Height = Application.GetRealWidth(30),
                UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed)),
                X = Application.GetRealWidth(238),
                Y = Application.GetRealHeight(333),
                Width = Application.GetRealWidth(38),
                Height = Application.GetRealWidth(38),
                UnSelectedImagePath = "FunctionIcon/CAC/DataIcon.png",
            };
            FrameWhiteCentet1.AddChidren(btnWindSpeed);
            Button btnDataText = new Button()
            {
                X = Application.GetRealWidth(215),
                Y = btnWindSpeed.Bottom,
                Width = Application.GetRealWidth(90),
                Height = Application.GetRealHeight(20),
                TextAlignment = TextAlignment.Center,
                TextSize = 12,
                TextColor = CSS_Color.TextualColor,
                TextID = StringId.Data
            };
            FrameWhiteCentet1.AddChidren(btnDataText);
            btnSwitch = new Button()
            {
@@ -259,7 +277,6 @@
            LoadEvent_TempChange();
            LoadEvent_AcStatesChange();
            LoadDiv_IrView();
        }
        /// <summary>
@@ -397,456 +414,6 @@
            dialog.Show();
        }
        /// <summary>
        /// 加载修改扫风模式区域
        /// </summary>
        void LoadDiv_ChangeSwingView()
        {
            Dialog dialog = new Dialog();
            FrameLayout dialogView = new FrameLayout()
            {
                BackgroundColor = CSS_Color.DialogTransparentColor1,
            };
            dialog.AddChidren(dialogView);
            FrameLayout modeChangeView;
            modeChangeView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(128),
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealHeight(287),
                BackgroundImagePath = "FunctionIcon/AC/DivBg2.png",
            };
            dialogView.AddChidren(modeChangeView);
            Button btnTitle;
            btnTitle = new Button()
            {
                X = Application.GetRealWidth(8 + 16),
                Y = Application.GetRealHeight(8),
                Width = Application.GetRealWidth(112),
                Height = Application.GetRealHeight(44),
                TextID = StringId.Swing,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
            };
            modeChangeView.AddChidren(btnTitle);
            Button btnLine = new Button()
            {
                X = btnTitle.X,
                Y = btnTitle.Bottom,
                Width = Application.GetRealWidth(112),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.BackgroundColor,
            };
            modeChangeView.AddChidren(btnLine);
            var modeList = device.GetAttribute(FunctionAttributeKey.Swing).value;
            foreach (var m in modeList)
            {
                Button btnModeIcon = new Button()
                {
                    X = btnTitle.X,
                    Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8),
                    Width = Application.GetRealWidth(24),
                    Height = Application.GetRealWidth(24),
                    IsSelected = device.GetAttrState(FunctionAttributeKey.Swing) == m,
                };
                modeChangeView.AddChidren(btnModeIcon);
                Button btnModeText = new Button()
                {
                    X = Application.GetRealWidth(12) + btnModeIcon.Right,
                    Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 8),
                    Height = Application.GetRealHeight(44),
                    Width = Application.GetRealWidth(90),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    SelectedTextColor = CSS_Color.MainColor,
                    IsSelected = device.GetAttrState(FunctionAttributeKey.Swing) == m,
                    TextSize = CSS_FontSize.TextFontSize,
                };
                modeChangeView.AddChidren(btnModeText);
                if (modeList.IndexOf(m) < modeList.Count - 1)
                {
                    modeChangeView.AddChidren(new Button()
                    {
                        X = btnTitle.X,
                        Y = btnModeText.Bottom,
                        Width = Application.GetRealWidth(112),
                        Height = Application.GetRealHeight(1),
                        BackgroundColor = CSS_Color.BackgroundColor,
                    });
                }
                btnModeIcon.UnSelectedImagePath = acFunction.GetSwingIconPath(m, false);
                btnModeIcon.SelectedImagePath = acFunction.GetSwingIconPath(m);
                btnModeText.Text = acFunction.GetSwingAttrText(m);
                EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                {
                    dialog.Close();
                };
                EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                {
                    //if (!device.online)
                    //{
                    //    new Tip()
                    //    {
                    //        CloseTime = 1,
                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                    //        Direction = AMPopTipDirection.None,
                    //    }.Show(MainPage.BaseView);
                    //}
                    btnModeIcon.IsSelected = btnModeText.IsSelected = true;
                    device.SetAttrState(FunctionAttributeKey.Swing, m);
                    btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(m);
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.Swing, m);
                    Control.Ins.SendWriteCommand(device, d);
                    dialog.Close();
                };
                btnModeIcon.MouseUpEventHandler = eventHandler1;
                btnModeText.MouseUpEventHandler = eventHandler1;
                dialogView.MouseUpEventHandler = eventHandler;
            }
            dialogView.MouseUpEventHandler = (sender, e) => {
                dialog.Close();
            };
            dialog.Show();
        }
        /// <summary>
        /// 加载修改模式区域
        /// </summary>
        void LoadDiv_ChangeFanView()
        {
            Dialog dialog = new Dialog();
            FrameLayout dialogView = new FrameLayout()
            {
                BackgroundColor = CSS_Color.DialogTransparentColor1,
            };
            dialog.AddChidren(dialogView);
            FrameLayout modeChangeView;
            modeChangeView = new FrameLayout()
            {
                X = Application.GetRealWidth(185),
                Y = Application.GetRealHeight(172),
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealHeight(243),
                BackgroundImagePath = "FunctionIcon/AC/DivBg2.png",
            };
            dialogView.AddChidren(modeChangeView);
            Button btnTitle;
            btnTitle = new Button()
            {
                X = Application.GetRealWidth(8 + 16),
                Y = Application.GetRealHeight(8),
                Width = Application.GetRealWidth(112),
                Height = Application.GetRealHeight(44),
                TextID = StringId.ChooseFan,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
            };
            modeChangeView.AddChidren(btnTitle);
            Button btnLine = new Button()
            {
                X = btnTitle.X,
                Y = btnTitle.Bottom,
                Width = Application.GetRealWidth(112),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.BackgroundColor,
            };
            modeChangeView.AddChidren(btnLine);
            var modeList = device.GetAttribute(FunctionAttributeKey.FanSpeed).value;
            foreach (var m in modeList)
            {
                Button btnFanIcon = new Button()
                {
                    X = btnTitle.X,
                    Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8),
                    Width = Application.GetRealWidth(24),
                    Height = Application.GetRealWidth(24),
                    IsSelected = device.GetAttrState(FunctionAttributeKey.FanSpeed) == m,
                };
                modeChangeView.AddChidren(btnFanIcon);
                Button btnFanText = new Button()
                {
                    X = Application.GetRealWidth(12) + btnFanIcon.Right,
                    Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 8),
                    Height = Application.GetRealHeight(44),
                    Width = Application.GetRealWidth(70),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    SelectedTextColor = CSS_Color.MainColor,
                    IsSelected = device.GetAttrState(FunctionAttributeKey.FanSpeed) == m,
                    TextSize = CSS_FontSize.TextFontSize,
                };
                modeChangeView.AddChidren(btnFanText);
                btnFanIcon.UnSelectedImagePath = acFunction.GetFanIconPath(m, false);
                btnFanIcon.SelectedImagePath = acFunction.GetFanIconPath(m);
                btnFanText.Text = acFunction.GetFanAttrText(m);
                if (modeList.IndexOf(m) < modeList.Count - 1)
                {
                    modeChangeView.AddChidren(new Button()
                    {
                        X = btnTitle.X,
                        Y = btnFanText.Bottom,
                        Width = Application.GetRealWidth(112),
                        Height = Application.GetRealHeight(1),
                        BackgroundColor = CSS_Color.BackgroundColor,
                    });
                }
                EventHandler<MouseEventArgs> closeDialogEvent = (sender, e) =>
                {
                    dialog.Close();
                };
                EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                {
                    //if (!device.online)
                    //{
                    //    new Tip()
                    //    {
                    //        CloseTime = 1,
                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                    //        Direction = AMPopTipDirection.None,
                    //    }.Show(MainPage.BaseView);
                    //}
                    btnFanIcon.IsSelected = btnFanText.IsSelected = true;
                    device.SetAttrState(FunctionAttributeKey.FanSpeed, m);
                    btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(m);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.FanSpeed, m);
                    Control.Ins.SendWriteCommand(device, d);
                    //btnWindSpeed.UnSelectedImagePath = btnFanIcon.UnSelectedImagePath;
                    dialog.Close();
                };
                btnFanIcon.MouseUpEventHandler = eventHandler1;
                btnFanText.MouseUpEventHandler = eventHandler1;
                dialogView.MouseUpEventHandler = closeDialogEvent;
            }
            dialog.Show();
        }
        /// <summary>
        /// 加载红外遥控器,额外按钮
        /// </summary>
        void LoadDiv_IrView()
        {
            if (device.spk == SPK.AcIr)
            {
                var btnMore = new Button()
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = Application.GetRealHeight(334 + 80),
                    Width = Application.GetRealWidth(35),
                    Height = Application.GetRealWidth(35),
                    UnSelectedImagePath = "FunctionIcon/AC/More.png",
                };
                FrameWhiteCentet1.AddChidren(btnMore);
                btnMore.MouseUpEventHandler = (sender, e) => {
                    LoadDialog_IrMoreView();
                };
            }
        }
        /// <summary>
        /// 加载额外对红外按钮界面
        /// </summary>
        void LoadDialog_IrMoreView()
        {
            Dialog dialog = new Dialog();
            var div = new FrameLayout();
            dialog.AddChidren(div);
            div.MouseUpEventHandler = (sender, e) => {
                dialog.Close();
            };
            var bodyView = new FrameLayout()
            {
                Y = Application.GetRealHeight(427),//667
                Height = Application.GetRealHeight(240),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            div.AddChidren(bodyView);
            var contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(16),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(296 + 200),
            };
            bodyView.AddChidren(contentView);
            var row = new FrameLayout()
            {
                Height = Application.GetRealHeight(60),
                Width = Application.GetRealWidth(296),
                Gravity = Gravity.CenterHorizontal,
            };
            contentView.AddChidren(row);
            int index = 0;
            List<FunctionAttributes> attrList = new List<FunctionAttributes>();
            attrList.AddRange(device.attributes);
            attrList.Add(new FunctionAttributes()
            {
                key = "+",
            });
            foreach (var attr in attrList)
            {
                if (attr.key == FunctionAttributeKey.Mode
                    || attr.key == FunctionAttributeKey.OnOff
                    || attr.key == FunctionAttributeKey.SetTemp
                    || attr.key == FunctionAttributeKey.SetTempStep
                    || attr.key == FunctionAttributeKey.FanSpeed
                    || attr.key == FunctionAttributeKey.FanManual
                    || attr.key == FunctionAttributeKey.FanAuto
                    )
                {
                    continue;
                }
                if (index != 0 && index % 3 == 0)
                {
                    row = new FrameLayout()
                    {
                        Height = Application.GetRealHeight(56),
                        Width = Application.GetRealWidth(296),
                        Gravity = Gravity.CenterHorizontal,
                    };
                    contentView.AddChidren(row);
                }
                if (attr.key == "+")
                {
                    var addView = new FrameLayout()
                    {
                        Gravity = Gravity.CenterVertical,
                        Width = Application.GetRealWidth(88),
                        Height = Application.GetRealHeight(40),
                        Radius = (uint)Application.GetRealHeight(18),
                        BorderColor = CSS_Color.PromptingColor1,
                        BorderWidth = (uint)Application.GetRealWidth(2),
                    };
                    if (index % 3 == 1)
                    {
                        addView.Gravity = Gravity.Center;
                    }
                    else if (index % 3 == 2)
                    {
                        addView.X = Application.GetRealWidth(208);
                    }
                    row.AddChidren(addView);
                    var btnAdd = new Button()
                    {
                        Gravity = Gravity.Center,
                        UnSelectedImagePath = "Public/PlusSignIcon.png",
                        Width = Application.GetRealWidth(32),
                        Height = Application.GetRealWidth(32),
                    };
                    addView.AddChidren(btnAdd);
                    btnAdd.MouseUpEventHandler = (sender, e) =>
                    {
                        dialog.Close();
                        Action action = () => {
                            LoadDialog_IrMoreView();
                        };
                        var addButton = new AcControlPage_AddIrButton(action);
                        MainPage.BasePageView.AddChidren(addButton);
                        addButton.Show(device);
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                    };
                }
                else
                {
                    var btn = new Button()
                    {
                        Gravity = Gravity.CenterVertical,
                        Width = Application.GetRealWidth(88),
                        Height = Application.GetRealHeight(40),
                        Radius = (uint)Application.GetRealHeight(18),
                        BorderColor = CSS_Color.PromptingColor1,
                        BorderWidth = (uint)Application.GetRealWidth(2),
                        TextAlignment = TextAlignment.Center,
                        TextSize = CSS_FontSize.TextFontSize,
                        TextColor = CSS_Color.FirstLevelTitleColor,
                        SelectedTextColor = CSS_Color.MainBackgroundColor,
                        SelectedBackgroundColor = CSS_Color.MainColor,
                    };
                    if (attr.value.Count > 0)
                    {
                        btn.Text = attr.value[0];
                    }
                    if (index % 3 == 1)
                    {
                        btn.Gravity = Gravity.Center;
                    }
                    else if (index % 3 == 2)
                    {
                        btn.X = Application.GetRealWidth(208);
                    }
                    row.AddChidren(btn);
                    btn.MouseUpEventHandler = (sender, e) =>
                    {
                        //if (!device.online)
                        //{
                        //    new Tip()
                        //    {
                        //        CloseTime = 1,
                        //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                        //        Direction = AMPopTipDirection.None,
                        //    }.Show(MainPage.BaseView);
                        //}
                        Dictionary<string, string> d = new Dictionary<string, string>();
                        d.Add(attr.key, "");
                        Control.Ins.SendWriteCommand(device, d);
                        new System.Threading.Thread(() =>
                        {
                            System.Threading.Thread.Sleep(2000);
                            Application.RunOnMainThread(() =>
                            {
                                btn.IsSelected = false;
                            });
                        })
                        { IsBackground = true }.Start();
                    };
                }
                index++;
            }
            dialog.Show();
        }
        #endregion
@@ -975,22 +542,12 @@
                }
                LoadDiv_ChangeModeView();
            };
            //扫风改变模式
            btnSwing.MouseUpEventHandler = (sender, e) =>
            {
                if (device.trait_on_off.curValue.ToString() == "off")
                {
                    return;
                }
                LoadDiv_ChangeSwingView();
            };
            btnWindSpeed.MouseUpEventHandler = (sender, e) =>
            {
                if (device.trait_on_off.curValue.ToString() == "off")
                {
                    return;
                }
                LoadDiv_ChangeFanView();
                var page = new CacHistoryChoosePage(device);
                MainPage.BasePageView.AddChidren(page);
                page.InitView();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            btnSwitch.MouseUpEventHandler = (sender, e) =>
@@ -1042,13 +599,9 @@
                }
                else
                {
                    btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C";
                    btnMode.SelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode));
                    btnSwing.SelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing));
                    btnWindSpeed.SelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed));
                    btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode), false);
                    btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing), false);
                    btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed), false);
                    btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C"
                                        + Language.StringByID(StringId.Humidity) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState("room_humidity").Replace(", ", "."))) + "%";
                    btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode));
                    temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")));
@@ -1057,7 +610,6 @@
                    if (device.trait_on_off.curValue.ToString() == "on")
                    {
                        btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = true;
                        arcBar.IsOffline = false;
                        btnSwitch.IsSelected = true;
                        arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png";
@@ -1072,7 +624,6 @@
                    }
                    else
                    {
                        btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = false;
                        arcBar.IsOffline = true;
                        btnSwitch.IsSelected = false;
                        arcBar.IsClickable = false;
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacDayHistoryPage.cs
New file
@@ -0,0 +1,165 @@
using System;
using System.Collections.Generic;
using HDL_ON.DAL.Server;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
    public class CacDayHistoryPage : FrameLayout
    {
        CacDayHistoryPage bodyView;
        EchartsOption_BrokenLine brokenLine;
        MyEchartsViewOn myEchartsView_Line;
        string curQueryType = "hour";
        public CacDayHistoryPage()
        {
            bodyView = this;
        }
        /// <summary>
        ///
        /// </summary>
        public void InitView()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.StatisticalChart24Hour)).LoadTopView();
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            var contentView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(603),
            };
            bodyView.AddChidren(contentView);
            var historyDataView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealWidth(52),
                Height = Application.GetRealWidth(350),
            };
            contentView.AddChidren(historyDataView);
            brokenLine = new EchartsOption_BrokenLine();
            myEchartsView_Line = new MyEchartsViewOn()
            {
                Y = Application.GetRealWidth(10),
                Height = Application.GetRealWidth(338),
            };
            historyDataView.AddChidren(myEchartsView_Line);
#if DEBUG
            List<string> vs = new List<string>() {
                        "1","2","3","4","5","6","7","8","9","10","11","12","13","14"
                    };
            brokenLine.InitXdataText(vs);
            brokenLine.InitYdataText("yData", new List<EnvironmentalSensorHistor>() {
                new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23"  },
                new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22"  },
                new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "-11"  },
                new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21"  },
                new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "-41"  },
                new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23"  },
                new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "-31"  },
                new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "-23"  },
                new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "-11"  },
                new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "-21"  },
                new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24"  },
                new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41"  },
                new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32"  },
                new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23"  }
            }, "#FF9D54");
            brokenLine.yTitle = "(℃)";
            brokenLine.xTitle = "";
            if (curQueryType != "hour")
            {
                brokenLine.xTitle = Language.StringByID(StringId.Date);
            }
            var opString = brokenLine.InitOption();
                myEchartsView_Line.ShowWithOption(opString);
#endif
        }
        /// <summary>
        /// 读取历史数据
        /// </summary>
        void LoadMothed_GetHistoryData(Function sr, bool isDel)
        {
            var loadPage = new Loading()
            {
                LodingBackgroundColor = 0x88888888,
            };
            bodyView.AddChidren(loadPage);
            new System.Threading.Thread(() =>
            {
                try
                {
                    Application.RunOnMainThread(() =>
                    {
                        loadPage.Start(Language.StringByID(StringId.PleaseWait));
                    });
                    var sensorType = sr.spk.Split(".")[1];
                    var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, sr.deviceId, "total_electricity");
                    if (revertObj != null)
                    {
                        if (revertObj.Code == StateCode.SUCCESS)
                        {
                            var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
                            List<string> vs = new List<string>();
                            if (brokenLine.YvalueText == "")
                            {
                                foreach (var data in revertData)
                                {
                                    vs.Add(data.fieldName);
                                }
                                brokenLine.InitXdataText(vs);
                            }
                            if (sr.GetAttribute("ydata") == null)
                            {
                                sr.attributes.Add(new FunctionAttributes() { key = "ydata" });
                            }
                            sr.SetAttrState("ydata", brokenLine.InitYdataText(sr.name, revertData, sr.GetAttrState("color")) + ",");
                        }
                    }
                    brokenLine.yTitle = Language.StringByID(StringId.EnergyConsumption) + "(kW)";
                    brokenLine.xTitle = Language.StringByID(StringId.timeMode);
                    if (curQueryType != "hour")
                    {
                        brokenLine.xTitle = Language.StringByID(StringId.Date);
                    }
                    var opString = brokenLine.InitOption();
                    Application.RunOnMainThread(() =>
                    {
                        myEchartsView_Line.ShowWithOption(opString);
                    });
                }
                catch (Exception ex)
                {
                    MainPage.Log($"sensor history error : {ex.Message}");
                }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        loadPage.Hide();
                    });
                }
            })
            { IsBackground = true }.Start();
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacHistoryChoosePage.cs
New file
@@ -0,0 +1,108 @@
using System;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
    /// <summary>
    /// 温控器历史数据显示选择界面
    /// </summary>
    public class CacHistoryChoosePage : FrameLayout
    {
        FrameLayout bodyView;
        Function device;
        public CacHistoryChoosePage(Function function)
        {
            device = function;
            bodyView = this;
        }
        public void InitView()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.Data)).LoadTopView();
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            FrameLayout tempView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(tempView);
            Button btnTempRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            tempView.AddChidren(btnTempRight);
            Button btnTempLine = new Button()
            {
                Y = Application.GetRealHeight(49),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.DividingLineColor
            };
            tempView.AddChidren(btnTempLine);
            Button btnTempName = new Button()
            {
                X = Application.GetRealWidth(16),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.TemperatureStatistics
            };
            tempView.AddChidren(btnTempName);
            btnTempName.MouseUpEventHandler = (sender, e) => {
                var page = new CacWeekHistoryPage(device,"temp");
                MainPage.BasePageView.AddChidren(page);
                page.InitView();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            FrameLayout humidityView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64 + 50),
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(humidityView);
            Button btnHumidityRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            humidityView.AddChidren(btnHumidityRight);
            Button btnHumidityName = new Button()
            {
                X = Application.GetRealWidth(16),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.HumidityStatistics
            };
            humidityView.AddChidren(btnHumidityName);
            btnHumidityName.MouseUpEventHandler = (sender, e) => {
                var page = new CacWeekHistoryPage(device, "humidity");
                MainPage.BasePageView.AddChidren(page);
                page.InitView();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacWeekHistoryPage.cs
New file
@@ -0,0 +1,342 @@
using System;
using System.Collections.Generic;
using HDL_ON.DAL.Server;
using HDL_ON.Entity;
using HDL_ON.Stan;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
    public class CacWeekHistoryPage : FrameLayout
    {
        CacWeekHistoryPage bodyView;
        Function device;
        /// <summary>
        /// 数据显示类型
        /// temp 温度
        /// humidity 湿度
        /// </summary>
        string showType;
        public CacWeekHistoryPage(Function device,string type)
        {
            bodyView = this;
            this.device = device;
            showType = type;
            BackgroundColor = CSS_Color.BackgroundColor;
        }
        public void InitView()
        {
            new TopViewDiv(bodyView, "数据").LoadTopView();
            InitContentView();
        }
        private void InitContentView()
        {
            FrameLayout contentView = new FrameLayout()
            {
                Y = Application.GetRealHeight(80),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(482),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(5)
            };
            bodyView.AddChidren(contentView);
            Button btnTitle = new Button()
            {
                Height = Application.GetRealHeight(60),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.Center,
                Text = "最近7天每天平均室内温度统计图"
            };
            contentView.AddChidren(btnTitle);
            FrameLayout dataView = new FrameLayout()
            {
                Y = Application.GetRealHeight(69),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(293),
                Height = Application.GetRealHeight(336),
            };
            contentView.AddChidren(dataView);
            Button btnUnit = new Button()
            {
                Height = Application.GetRealHeight(15),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = 0xFF43425D,
                TextSize = 8,
                Text = "单位:℃"
            };
            dataView.AddChidren(btnUnit);
            Dictionary<string, int> dataDic = new Dictionary<string, int>();
#if DEBUG
            dataDic.Add("0201", 20);
            dataDic.Add("0202", -20);
            dataDic.Add("0203", 10);
            dataDic.Add("0204", 40);
            dataDic.Add("0205", 20);
            dataDic.Add("0206", 20);
            dataDic.Add("0207", 20);
            //dataDic.Add("0201", -20);
            //dataDic.Add("0202", -20);
            //dataDic.Add("0203", -20);
            //dataDic.Add("0204", -40);
            //dataDic.Add("0205", -20);
            //dataDic.Add("0206", -20);
            //dataDic.Add("0207", -20);
#endif
            DataItemView dataShowView = new DataItemView("0");
            dataShowView.Height = Application.GetRealHeight(157 * 2 + 1);
            dataShowView.Y = Application.GetRealHeight(21);
            List<string> items = new List<string>()
            {
                "50","40","30","20","10","0","-10","-20","-30","-40","-50"
            };
            int index = 0;
            foreach(var item in items)
            {
                DataItemView dataItemView;
                if(item == "0")
                {
                    dataItemView = dataShowView;
                }
                else
                {
                    dataItemView = new DataItemView(item);
                    dataItemView.Y = index * Application.GetRealHeight(30) + Application.GetRealHeight(15);
                }
                dataItemView.InitView();
                dataView.AddChidren(dataItemView);
                index++;
            }
            RefrshDataView(dataDic, dataShowView);
            {
                var dateHorView = new HorizontalScrolViewLayout()
                {
                    X = Application.GetRealWidth(51),
                    Y = dataView.Bottom + Application.GetRealHeight(11),
                    Width = Application.GetRealWidth(267),
                    Height = Application.GetRealHeight(26),
                };
                contentView.AddChidren(dateHorView);
                foreach(var dic in dataDic)
                {
                    FrameLayout dateView = new FrameLayout()
                    {
                        Width = Application.GetRealWidth(39),
                        Height = Application.GetRealHeight(26),
                    };
                    dateHorView.AddChidren(dateView);
                    Button btnLineh = new Button()
                    {
                        Width = 1,
                        Height = Application.GetRealHeight(4),
                        Gravity = Gravity.CenterHorizontal,
                        BackgroundColor = 0xFFDBDBDB
                    };
                    dateView.AddChidren(btnLineh);
                    Button btnDate = new Button()
                    {
                        Y = Application.GetRealHeight(12),
                        Height = Application.GetRealHeight(14),
                        TextColor = 0xFF43425D,
                        TextSize = 10,
                        Text = dic.Key,
                    };
                    dateView.AddChidren(btnDate);
                }
            }
            Button btnTip = new Button()
            {
                Y = contentView.Bottom + Application.GetRealHeight(28),
                Height = Application.GetRealHeight(20),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
                TextAlignment = TextAlignment.Center,
                Text = "*可通过点击柱形图查看当天24小时温度统计"
            };
            bodyView.AddChidren(btnTip);
            new System.Threading.Thread(() => {
                var revertObj = new HttpServerRequest().GetSensorHistory("week", device.deviceId, "room_temp");
            }) { IsBackground = true }.Start();
        }
        void RefrshDataView(Dictionary<string,int> dataDic, DataItemView dataShowView)
        {
            int valueIndex = 0;
            foreach (var data in dataDic)
            {
                ColumnarView cv = new ColumnarView(data.Value);
                cv.X = Application.GetRealWidth(valueIndex * 38 + 25);
                cv.InitView();
                dataShowView.AddChidren(cv);
                cv.Clicker();
                valueIndex++;
            }
        }
    }
    class DataItemView : FrameLayout
    {
        string value;
        public DataItemView(string value)
        {
            this.value = value;
            Width = Application.GetRealWidth(293);
            Height = Application.GetRealHeight(30);
        }
        public void InitView() {
            Button btnValue = new Button()
            {
                Gravity = Gravity.CenterVertical,
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealHeight(30),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = 0xFF43425D,
                TextSize = 8,
                Text = value
            };
            AddChidren(btnValue);
            Button btnLine = new Button()
            {
                Gravity = Gravity.CenterVertical,
                X = Application.GetRealWidth(26),
                Width = Application.GetRealWidth(267),
                Height = 1,
                BackgroundColor = CSS_Color.DividingLineColor,
            };
            AddChidren(btnLine);
        }
    }
    class ColumnarView : VerticalScrolViewLayout
    {
        int value;
        /// <summary>
        /// 方向:向上、向下
        /// </summary>
        bool isUpward;
        Button btnValue;
        Button btnValueText;
        public ColumnarView(int value)
        {
            this.isUpward = value >= 0;
            if (isUpward)
            {
                this.value = value;
            }
            else
            {
                this.value = value * -1;
            }
            Width = Application.GetRealWidth(39);
            Height = Application.GetRealHeight(value * 3 + 30);
        }
        public void InitView()
        {
            int yValue = 0;
            btnValue = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Height = Application.GetRealHeight(value * 3),
                Width = Application.GetRealWidth(16),
                BackgroundColor = 0xFFFF9D54,
            };
            btnValueText = new Button()
            {
                Height = Application.GetRealHeight(30),
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextColor = 0xFF43425D,
                Text = value + "℃",
            };
            AddChidren(btnValueText);
            if (isUpward)
            {
                //btnValue.Height += Application.GetRealHeight(1);
                yValue = 158 - 30 - value * 3;
                yValue = yValue > 0 ? yValue : 158;
                Y = Application.GetRealHeight(yValue);
                AddChidren(btnValueText);
                AddChidren(btnValue);
            }
            else
            {
                btnValue.Height += Application.GetRealHeight(2);
                Y = Application.GetRealHeight(157);
                AddChidren(btnValue);
                AddChidren(btnValueText);
            }
        }
        public void Clicker()
        {
            btnValue.MouseUpEventHandler = (sender, e) =>
            {
                var page = new CacDayHistoryPage();
                MainPage.BasePageView.AddChidren(page);
                page.InitView();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            btnValueText.MouseUpEventHandler = (sender, e) =>
            {
                var page = new CacDayHistoryPage();
                MainPage.BasePageView.AddChidren(page);
                page.InitView();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs
@@ -4,7 +4,7 @@
namespace HDL_ON.UI
{
    /// <summary>
    /// 曲线图
    /// 曲线图数据
    /// </summary>
    public class EchartsOption_BrokenLine
    {
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -365,6 +365,57 @@
                #endregion
            }
            if (function.spk == SPK.HvacCac)
            {
                #region 毛细空调
                var energyView1 = new FrameLayout()
                {
                    Height = Application.GetRealHeight(55),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                };
                contentView.AddChidren(energyView1);
                var btnEnergyText1 = new Button()
                {
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(160),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextID = StringId.DewPointTemp,
                };
                energyView1.AddChidren(btnEnergyText1);
                double realTimePower = 0;
                double.TryParse(function.GetAttrState("dew_point_temp"), out realTimePower);
                var energyValue1 = new Button()
                {
                    Width = Application.GetRealWidth(355),
                    TextAlignment = TextAlignment.CenterRight,
                    TextSize = CSS_FontSize.TextFontSize,
                    TextColor = CSS_Color.PromptingColor1,
                    Text = realTimePower + "°C",
                };
                energyView1.AddChidren(energyValue1);
                energyView1.AddChidren(
                    new Button()
                    {
                        Gravity = Gravity.CenterHorizontal,
                        Y = Application.GetRealHeight(54),
                        BackgroundColor = CSS_Color.DividingLineColor,
                        Width = Application.GetRealWidth(343),
                        Height = Application.GetRealHeight(1)
                    });
                //-----------------
                #endregion
            }
            LoadEventList();
        }