9个文件已添加
2个文件已删除
48个文件已修改
3672 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/FengLinVideo/Form/MonitorFragment.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/FengLinVideo/Form/ReverseCallFragment.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/VideoActivity.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_APP_Project.sln 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ApiUtlis.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/OnAppConfig.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs 107 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs 221 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs 398 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs 340 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/ObjectClass.cs 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/Send.cs 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs 531 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs 224 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs 223 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,39 +1,47 @@
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget." />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/DriverLayer/Control.cs">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-001674E61438002E" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs">
    <Files>
      <File FileName="HDL-ON_iOS/Info.plist" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" />
      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" />
      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" />
      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="404" Column="11" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" />
      <File FileName="HDL_ON/Entity/FunctionList.cs" />
      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" Line="337" Column="28" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs" Line="87" Column="21" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs" Line="142" Column="29" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Music/A31LocalMusicList.cs" Line="26" Column="22" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" Line="17" Column="22" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="HDL_APP_Project" expanded="True">
            <Node name="HDL_ON" expanded="True">
              <Node name="DAL" expanded="True">
                <Node name="DriverLayer" expanded="True">
                  <Node name="Control.cs" selected="True" />
                </Node>
                <Node name="Mqtt" expanded="True" />
              </Node>
              <Node name="Common" expanded="True" />
              <Node name="UI" expanded="True">
                <Node name="UI1-Login" expanded="True" />
                <Node name="UI0-Stan" expanded="True">
                  <Node name="Controls" expanded="True">
                    <Node name="BaseControl" expanded="True" />
                  </Node>
                </Node>
                <Node name="UI2" expanded="True">
                  <Node name="1-HomePage" expanded="True" />
                  <Node name="3-Intelligence" expanded="True">
                    <Node name="Automation" expanded="True">
                      <Node name="LogicView" expanded="True" />
                      <Node name="AddLogic.cs" selected="True" />
                    </Node>
                  </Node>
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="Music" expanded="True" />
                    <Node name="Video" expanded="True">
                      <Node name="View" expanded="True" />
                    </Node>
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_iOS" expanded="True" />
            <Node name="HDL-ON_Android" expanded="True">
              <Node name="Assets" expanded="True" />
            </Node>
            <Node name="HDL-ON_iOS" expanded="True">
              <Node name="Resources" expanded="True" />
            </Node>
          </Node>
        </State>
      </Pad>
@@ -45,8 +53,8 @@
    <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
    <String>Shared.IOS/Shared.IOS.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.4b65c4650918" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore />
  </MonoDevelop.Ide.DebuggingService.Breakpoints>
HDL-ON_Android/Assets/Language.ini
@@ -411,6 +411,7 @@
426=Air dry time
427=Disinfect time
428=Anion Time
429=Real time power consumption: {0}kw
429=H
430=Min
@@ -423,7 +424,9 @@
437=Device List
438=humidity:{0}%    air:{1}    wind:{2}
1000=Room Humidity
1000=Indoor Humidity
1001=V-chip
1002=Anion
1003=Sterilization
@@ -1196,6 +1199,7 @@
436=已添加功能
437=设备列表
438=湿度:{0}%    空气:{1}    风速:{2}级
439=实时功耗: {0}kW
1000=室内湿度
1001=童锁
@@ -1284,6 +1288,24 @@
1084=风速1档
1085=风速2档
1086=风速3档
4000=可视对讲
4001=通话记录
4002=*云端照片只保留30天
4003=门口机呼叫
4004=已接听
4005=已开锁
4006=年
4007=来自
4008=呼叫
4009=未开锁
4010=未接听
4011=已拒绝
4012=配置参数有异常!
4013=门禁二维码
4014=临时密码
5000=音乐
@@ -1539,6 +1561,16 @@
7120=防拆功能
7121=在线
7122=不在线
7123=空气质量
7124=优
7125=良
7126=差
7127=发送通知
7128=通知内容
7129=(100字内)
7130=账号选择
7131=App推送
9000=请使用新的手机账号登录APP
9001=请使用新的邮箱账号登录APP
HDL-ON_Android/Assets/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png
HDL-ON_Android/FengLinVideo/Form/MonitorFragment.cs
@@ -38,7 +38,7 @@
        private TextView unlockText;
        // 更新线程
        private Thread thread = null;
        public static Thread thread = null;
        public MonitorFragment(VideoPhone phone)
        {
HDL-ON_Android/FengLinVideo/Form/ReverseCallFragment.cs
@@ -113,6 +113,7 @@
            }
        }
        public static Thread unlockThread = null;//公开出来,关闭activity的时候要结束这个线程,不然会引起崩溃
        /// <summary>
        /// 更新开锁按钮状态,开锁成功,15秒内不给再点击按钮
        /// </summary>
@@ -124,15 +125,28 @@
                unlockImg.Enabled = false;
                new Thread(() =>
                {
                    Thread.Sleep(15 * 1000);
                    Activity.RunOnUiThread(() =>
                    {
                        if (unlockImg != null)
                            unlockImg.Enabled = true;
                    });
                }).Start();
                unlockThread = new Thread(() =>
                  {
                      try
                      {
                          Thread.Sleep(15 * 1000);
                      Activity.RunOnUiThread(() =>
                      {
                          try {
                              if (unlockImg != null)
                                  unlockImg.Enabled = true;
                          }
                          catch { }
                      });
                      }
                      catch { }
                  });//.Start();
                unlockThread.Start();
                PostUnlock();
            }
            catch { }
        }
@@ -218,7 +232,7 @@
                switch (event1)
                {
                    case "EVT_RECV_CUSTOM_DATA":
                    case "EVT_RECV_CUSTOM_DATA":// 开锁成功
                        string data = tp.GetString("data");
                        UpdataUnlockState();
                        break;
@@ -265,7 +279,7 @@
                    {
                        string UserData = "user text";
                        //注意:RequestAudio 请求对方音频,RequestVideo请求对方视频 SendAudio发送本地音频 SendVideo 发送本地视频 一般门口不接收到视频,所以最好设置0,减少流量消耗
                        string param = string.Format("RequestAudio=1\r\n" + "RequestVideo=1\r\n" + "SendAudio=1\r\n" + "SendVideo=0r\n" + "UserData=%s\r\n", UserData);
                        string param = string.Format("RequestAudio=1\r\n" + "RequestVideo=1\r\n" + "SendAudio=1\r\n" + "SendVideo=1r\n" + "UserData=%s\r\n", UserData);
                        mPhone.AcceptRing(param);
                        answerLayout.Visibility = ViewStates.Gone;
                        PostAnswer();
@@ -317,7 +331,7 @@
                    Dictionary<string, object> d = new Dictionary<string, object>();
                    d.Add("callId", VideoActivity.CallId);
                    d.Add("images", images);
                    d.Add("imagesName", img_name);
                    d.Add("imagesName", "_Android.jpg");
                    string jsonString = HttpUtil.GetSignRequestJson(d);
                    string url = "/home-wisdom/app/fl/vi/screenshot";
@@ -400,5 +414,27 @@
            }).Start();
        }
        /// <summary>
        /// post 开锁记录
        /// </summary>
        private void PostUnlock()
        {
            new Thread(() =>
            {
                try
                {
                    Dictionary<string, object> d = new Dictionary<string, object>();
                    d.Add("callId", VideoActivity.CallId);//呼叫记录id int
                    string jsonString = HttpUtil.GetSignRequestJson(d);
                    string url = "/home-wisdom/app/fl/vi/unlock";
                    ResponsePackNew response = HttpUtil.RequestHttpsPost(url, jsonString);
                    Log.Info("FengLinVideo", "Post Reject Response code=" + response.Code);
                }
                catch { }
            }).Start();
        }
    }
}
HDL-ON_Android/HDL-ON_Android.csproj
@@ -336,6 +336,7 @@
    <Folder Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\" />
    <Folder Include="Assets\Phone\PirIcon\" />
    <Folder Include="Assets\Phone\VideoIcon\" />
    <Folder Include="Assets\Phone\FunctionIcon\Energy\" />
  </ItemGroup>
  <ItemGroup />
  <ItemGroup>
@@ -1076,6 +1077,7 @@
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\0.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\add.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AC\More.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Energy\EnergyDrodDownIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\VentilateSelect.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\EnergySelect.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\Fan2Select.png" />
@@ -1099,12 +1101,6 @@
  <ItemGroup>
    <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" />
    <AndroidNativeLibrary Include="libs\armeabi-v7a\libjcore127.so" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\ys\ys.csproj">
      <Project>{DF065E3F-C3A1-4908-9582-000974B7C290}</Project>
      <Name>ys</Name>
    </ProjectReference>
  </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/Properties/AndroidManifest.xml
@@ -1,6 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103262" android:versionName="1.1.202103262" package="com.hdl.onpro">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103302" android:versionName="1.1.202103302" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" />
    <!--  可视对讲权限-->
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <!--  定位权限-->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
HDL-ON_Android/VideoActivity.cs
@@ -43,7 +43,7 @@
        public static int Tpye = 0;//类型,0 监控,1反呼
        public static string UUId;
        public static int CallId;//callId 呼叫记录id
        public static string CallId;//callId 呼叫记录id
        public static string CmtID;//cmtID 丰林社区号
        public static string Roomno;//roomno 丰林房间号
        public static string Unitno;//unitno 丰林楼栋号 string
@@ -60,7 +60,7 @@
                ESVideoUUID = Intent.GetStringExtra("ESVideoUUID");//室外机UUID,例:JJY000007FSEYX
                DeviceName = Intent.GetStringExtra("DeviceName");//室外机的名称,例,室外机
                UUId = Intent.GetStringExtra("uuid");//
                CallId = Intent.GetIntExtra("callId", 0);
                CallId = Intent.GetStringExtra("callId");
                CmtID = Intent.GetStringExtra("cmtID");
                Roomno = Intent.GetStringExtra("roomno");
                Unitno = Intent.GetStringExtra("unitno");
@@ -169,7 +169,7 @@
                        mPhone.SetRemoteSurfaceHolder(mRemoteSurfaceHolder, "mRemoteSurfaceHolder!=null"); //设置来电窗口
                    }
                    ViewGroup v = (ViewGroup)FindViewById(Resource.Id.localVideo);
                    ViewGroup v = (ViewGroup)FindViewById(Resource.Id.locaVideo);
                    mPhone.SetLocalVideoContainer(v);//设置本地视频窗口,一定要调用,不然后会出现没声音
                }
                else
@@ -215,6 +215,28 @@
                mPhone = null;
                //mPhone.OnActivityDestroy();
            }
            if (ReverseCallFragment.unlockThread != null)
            {
                try
                {
                    //
                    ReverseCallFragment.unlockThread.Interrupt();
                }
                catch { }
                ReverseCallFragment.unlockThread = null;
            }
            if (MonitorFragment.thread != null)
            {
                try
                {
                    //
                    MonitorFragment.thread.Interrupt();
                }
                catch { }
                MonitorFragment.thread = null;
            }
        }
        public override void OnBackPressed()
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -446,6 +446,7 @@
        <Folder Include="Resources\Phone\FunctionIcon\ArmSensor\" />
        <Folder Include="Resources\Phone\FunctionIcon\Electrical\ClothesHanger\" />
        <Folder Include="Resources\Phone\FunctionIcon\EnvirSensor\" />
        <Folder Include="Resources\Phone\FunctionIcon\Energy\" />
    </ItemGroup>
    <ItemGroup>
        <InterfaceDefinition Include="LaunchScreen.storyboard" />
@@ -1195,6 +1196,7 @@
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\TvocIcon.png" />
      <BundleResource Include="Resources\Phone\PirIcon\add.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\AC\More.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Energy\EnergyDrodDownIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\AirFresh\VentilateSelect.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\AirFresh\EnergySelect.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\AirFresh\Fan2Select.png" />
HDL-ON_iOS/Info.plist
@@ -104,9 +104,9 @@
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>CFBundleShortVersionString</key>
    <string>1.1.202103262</string>
    <string>1.1.202103301</string>
    <key>CFBundleVersion</key>
    <string>202103262</string>
    <string>202103301</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Language.ini
@@ -411,6 +411,7 @@
426=Air dry time
427=Disinfect time
428=Anion Time
429=Real time power consumption: {0}kw
429=H
430=Min
@@ -1196,6 +1197,7 @@
436=已添加功能
437=设备列表
438=湿度:{0}%    空气:{1}    风速:{2}级
439=实时功耗: {0}kW
1000=室内湿度
1001=童锁
@@ -1285,6 +1287,22 @@
1085=风速2档
1086=风速3档
4000=可视对讲
4001=通话记录
4002=*云端照片只保留30天
4003=门口机呼叫
4004=已接听
4005=已开锁
4006=年
4007=来自
4008=呼叫
4009=未开锁
4010=未接听
4011=已拒绝
4012=配置参数有异常!
4013=门禁二维码
4014=临时密码
5000=音乐
5001=组合
@@ -1539,6 +1557,15 @@
7120=防拆功能
7121=在线
7122=不在线
7123=空气质量
7124=优
7125=良
7126=差
7127=发送通知
7128=通知内容
7129=(100字内)
7130=账号选择
7131=App推送
9000=请使用新的手机账号登录APP
9001=请使用新的邮箱账号登录APP
HDL-ON_iOS/Resources/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png
HDL_APP_Project.sln
@@ -9,8 +9,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blufi", "HdlBluWi\Blufi.csproj", "{2DDF4C3C-6998-432E-9F43-6786D82F0630}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ys", "ys\ys.csproj", "{DF065E3F-C3A1-4908-9582-000974B7C290}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
@@ -57,17 +55,5 @@
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhone.Build.0 = Debug|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.ActiveCfg = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.Build.0 = Release|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.Build.0 = Release|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.ActiveCfg = Debug|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.Build.0 = Debug|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.ActiveCfg = Release|Any CPU
        {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.Build.0 = Release|Any CPU
    EndGlobalSection
EndGlobal
HDL_ON/Common/ApiUtlis.cs
@@ -277,6 +277,13 @@
                    //===================读取逻辑列表==========================
                    UI.UI2.Intelligence.Automation.MainView.GetLogicList();
                    //===================读取可视对讲数据==========================
                    var flVideoInfo = HttpRequest.CheckFlVideo();
                    if(flVideoInfo.Code == StateCode.SUCCESS)
                    {
                        FunctionList.List.videoIntercom = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.Video.VideoClouds>(flVideoInfo.Data.ToString());
                    }
                }
                catch (Exception ex)
                {
HDL_ON/Common/OnAppConfig.cs
@@ -75,7 +75,7 @@
        /// <summary>
        ///  账号注册服务器信息
        /// </summary>
        public string RequestHttpsHost = "https://china.hdlcontrol.com";
        public string RequestHttpsHost ="https://china.hdlcontrol.com";
        /// <summary>
        /// 
        /// </summary>
HDL_ON/Common/R.cs
@@ -4,7 +4,7 @@
{
    public static class StringId
    {
        //public const int EnergyMonitoring = 439;
        public const int RealTimePowerConsumption = 439;
        public const int EnvirSensorValueTip = 438;
        public const int DeviceList = 437;
        public const int AddedDevice = 436;
@@ -782,6 +782,21 @@
        public const int FanThreeGear = 1086;
        public const int keshiduijiang = 4000;
        public const int tonghuajilu = 4001;
        public const int baolu30 = 4002;
        public const int menkoujihujiao = 4003;
        public const int yijieting = 4004;
        public const int yikaisuo = 4005;
        public const int nian = 4006;
        public const int laizi = 4007;
        public const int hujiao = 4008;
        public const int weikaisuo = 4009;
        public const int weijieting = 4010;
        public const int yijujue = 4011;
        public const int peizhicanshuyouyichang = 4012;
        public const int menjinerweima = 4013;
        public const int linshimima = 4014;
        public const int a31Music = 5000;
        public const int merge = 5001;
@@ -1040,6 +1055,15 @@
        public const int fangchaigongneng = 7120;
        public const int zaixian = 7121;
        public const int buzaixian = 7122;
        public const int kongqizhiliang = 7123;
        public const int kongqiyou= 7124;
        public const int kongqiliang = 7125;
        public const int kongqicha = 7126;
        public const int fasongtongzhi = 7127;
        public const int tongzhineirong = 7128;
        public const int xianzhichangdu = 7129;
        public const int zhanghaoxuanze = 7130;
        public const int apptuisong = 7131;
        #region LE新增
        /// <summary>
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -492,7 +492,7 @@
                            Address = mHome.homeAddress,
                            isAllowCreateScene = mHome.isAllowCreateScene,
                        };
                        if (home.isBindGateway)
                        //if (home.isBindGateway)
                        {
                            UserInfo.Current.regionList.Add(home);
                        }
@@ -2225,11 +2225,25 @@
        public ResponsePackNew EZGetChildToken()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            //d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson);
        }
        #endregion
        #region 可视对讲
        /// <summary>
        /// 检查住宅是否绑定丰林,并获取门口机列表
        /// </summary>
        /// <returns></returns>
        public ResponsePackNew CheckFlVideo()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson);
            return pack;
        }
        #endregion
    }
}
HDL_ON/DAL/Server/HttpUtil.cs
@@ -153,6 +153,8 @@
                {
                    urlHead = OnAppConfig.Instance.RequestHttpsHost;
                }
                //"https://bahrain-gateway.hdlcontrol.com";
                 urlHead="https://china-gateway.hdlcontrol.com";
                string requestFullUrl = urlHead + apiPath;
HDL_ON/DAL/Server/NewAPI.cs
@@ -567,9 +567,17 @@
        /// 删除通话记录
        /// </summary>
        public const string API_POST_FL_DeleteCallInfo = "/home-wisdom/app/fl/vi/delete";
        /// <summary>
        /// 获取门口机列表
        /// </summary>
        public const string API_POST_FL_List = "http://112.74.164.111:180/api.php/Device/getmonitorUUID";
        /// <summary>
        /// 动态密码/二维码开锁
        /// </summary>
        public const string API_POST_FL_QRcode = "http://112.74.164.111:180/api.php/Device/setdynamicpwd";
        #endregion
    }
    ///// <summary>
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -59,12 +59,12 @@
        /// <param name="mESVideoInfo"></param>
        public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo)
        {
            this.esVideoInfo = mESVideoInfo;
#if __IOS__
             int roomID = 0;
            int.TryParse(mESVideoInfo.roomno, out roomID);
            ESOnMonitorViewController vc = new ESOnMonitorViewController();
            vc.MESVideoID = mESVideoInfo.ESVideoUUID;
            //vc.MESRoomID = mESVideoInfo.ESRoomID;
            vc.MESRoomID =roomID;
            vc.DeviceName = mESVideoInfo.DeviceName;
            //vc.RoomName = mESVideoInfo.RoomName;
            vc.MESCallDelegate = new OnESCallDelegate(this);
@@ -96,9 +96,11 @@
        {
            this.esVideoInfo = mESVideoInfo;
#if __IOS__
            int roomID = 0;
            int.TryParse(mESVideoInfo.roomno, out roomID);
            ESOnIntercomViewController vc = new ESOnIntercomViewController();
            vc.MESVideoID = mESVideoInfo.ESVideoUUID;
            //vc.MESRoomID = mESVideoInfo.ESRoomID;
            vc.MESRoomID = roomID;
            vc.DeviceName = mESVideoInfo.DeviceName;
            //vc.RoomName = mESVideoInfo.RoomName;
            //vc.MESCallDelegate = new OnESCallDelegate(this);
@@ -415,27 +417,27 @@
        /// <summary>
        /// 丰林请求的唯一id
        /// </summary>
        public string uuid;
        public string uuid = string.Empty;
        /// <summary>
        /// 丰林社区id
        /// </summary>
        public string cmtID;
        public string cmtID = string.Empty;
        /// <summary>
        /// 丰林房间号
        /// </summary>
        public string roomno;
        public string roomno = string.Empty;
        /// <summary>
        /// 丰林楼栋号
        /// </summary>
        public string unitno;
        public string unitno = string.Empty;
        ///// <summary>
        ///// 丰林住宅Id
        ///// </summary>
        //public string HomeID;
        //public string HomeID= string.Empty;
        /// <summary>
        /// 呼叫记录Id
        /// </summary>
        public string callId;
        public string callId = string.Empty;
    }
HDL_ON/Entity/Function/Function.cs
@@ -1070,6 +1070,23 @@
        }
        #endregion
        #region 能源
        /// <summary>
        /// 能源模块
        /// </summary>
        public const string EnergyStandard = "energy.standard";
        /// <summary>
        /// 能源spk列表
        /// </summary>
        /// <returns></returns>
        public static List<string> EnergySpkList()
        {
            var spkList = new List<string>();
            spkList.Add(EnergyStandard);
            return spkList;
        }
        #endregion
        #region 音乐
        /// <summary>
        /// (音乐)
HDL_ON/Entity/FunctionList.cs
@@ -80,6 +80,17 @@
            var spkList = SPK.AirFreshSpkList();
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        /// <summary>
        /// 能源列表
        /// </summary>
        /// <returns></returns>
        public List<Function> GetEnergyList()
        {
            var spkList = SPK.EnergySpkList();
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        #region 家电列表 electricals
        /// <summary>
        /// 家电列表
@@ -117,6 +128,14 @@
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        /// <summary>
        /// 可视对讲列表
        /// </summary>
        public UI.UI2.FuntionControlView.Video.VideoClouds videoIntercom;
        /// <summary>
        /// 场景列表
        /// </summary>
        public List<Scene> scenes = new List<Scene>();
        /// <summary>
HDL_ON/HDL_ON.projitems
@@ -380,7 +380,6 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AcControlPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\FhControlPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\TvControlPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\MainView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\FrameLayout50.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\FrameLayout60.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\ShowDialog.cs" />
@@ -388,10 +387,16 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\EnvironmentalScience\EchartsOption_Pie.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\SetPir.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AcControlPage_AddIrButton.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\Send.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\EnergyMainPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)DAL\ThirdPartySdk\ESOnVideo.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\EchartsOption_Energy.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AirFreshControlPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoSend.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoMainView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\ObjectClass.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InputPushText.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AirQuality.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
HDL_ON/UI/MainPage.cs
@@ -20,7 +20,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string VersionString = "1.1.0326";
        public static string VersionString = "1.2.0330";
        ///// <summary>
        ///// 客户端类型
        ///// </summary>
HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
@@ -292,9 +292,11 @@
                return myMethod.Invoke(form, parameter);
            }
            catch (Exception ex)
            {
                //出现未知错误,数据丢失
                HdlMessageLogic.Current.ShowAppProgramIsError(ex);
            {
#if DEBUG
                //出现未知错误,数据丢失
                HdlMessageLogic.Current.ShowAppProgramIsError(ex);
#endif
                return null;
            }
        }
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -204,7 +204,10 @@
                }
                else
                {
                    etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374
                    etAccount.Text = "BB01010101@evoyo.com";//可视对讲
                    //etAccount.Text = "13168123446";
                    //etAccount.Text = "13602944661";//kx
                    //etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374
                    //15971583093 gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试
                }
                b = !b;
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -495,12 +495,16 @@
                    case ShowFunction.Panel:
                        break;
                    case ShowFunction.SecurityMonitoring:
                        functionCount = 1;
                        //functionCount = 1;
                        break;
                    case ShowFunction.Sensor:
                        functionCount = FunctionList.List.GetArmSensorList().Count;
                        break;
                    case ShowFunction.VideoIntercom:
                        if (FunctionList.List.videoIntercom != null)
                        {
                            functionCount = 1;
                        }
                        break;
                }
@@ -623,7 +627,7 @@
                            LoadEvent_SwitchFunction(btnLightPower, item, functionView);
                        };
                        functionPageTitleId = StringId.Lights;
                        #endregion
                        break;
                    case ShowFunction.AC:
@@ -801,12 +805,17 @@
                        break;
                    case ShowFunction.VideoIntercom:
                        btnName.TextID = StringId.VideoIntercom;
                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                        {
                            var videoMethod = new UI2.FuntionControlView.Video.VideoMethod();
                            videoMethod.MianView(this,FunctionList.List.videoIntercom);
                        };
                        break;
                }
                //界面跳转--音乐跳转自己的界面--环境跳转自己的界面
                if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring
                    && ShowFunction.EnergyMonitoring!= item)
                    && ShowFunction.EnergyMonitoring!= item && ShowFunction.VideoIntercom != item)
                {
                    btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                    {
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
@@ -46,7 +46,7 @@
            shiwaiView.frameLayout.Y = functionView.frameLayout.Bottom;
            shiwaiView.btnText.TextID = StringId.shiwaibainhua;
            shiwaiView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png";
            //viewLayout.AddChidren(shiwaiView.FLayoutView());
            viewLayout.AddChidren(shiwaiView.FLayoutView());
            #endregion
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -111,26 +111,37 @@
            #region  执行推送 发送通知
            ///上下间隔12像素
            viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
            /////执行推送iew
            //LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
            //push.frameLayout.Height = Application.GetRealHeight(50);
            //push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            //push.btnText.TextID = StringId.push;
            //push.btnNextIcon.Width = Application.GetRealWidth(36);
            //push.btnNextIcon.Height = Application.GetRealWidth(36);
            //push.btnNextIcon.X = Application.GetRealWidth(305);
            //push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png";
            //push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png";
            //viewLayout.AddChidren(push.FLayoutView());
            /////发送通知View
            //LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView();
            //notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
            //notification.btnText.TextID = StringId.notification;
            //viewLayout.AddChidren(notification.FLayoutView());
            /////上下间隔62像素
            //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) });
            ///执行推送iew
            LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
            push.frameLayout.Height = Application.GetRealHeight(50);
            push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            push.btnText.TextID = StringId.push;
            push.btnNextIcon.Width = Application.GetRealWidth(36);
            push.btnNextIcon.Height = Application.GetRealWidth(36);
            push.btnNextIcon.X = Application.GetRealWidth(305);
            push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png";
            push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png";
            push.btnClick.Width = Application.GetRealWidth(305);
            viewLayout.AddChidren(push.FLayoutView());
            ///发送通知View
            LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView();
            notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
            notification.btnText.TextID = StringId.notification;
            notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor;
            viewLayout.AddChidren(notification.FLayoutView());
            if (Logic.currlogic.pushConfigs.Count > 0)
            {
                push.btnNextIcon.IsSelected = true;
            }
            else
            {
                push.btnNextIcon.IsSelected = false;
            }
            ///上下间隔62像素
            viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) });
            #endregion
            #region  保存
            ///保存View
            LogicView.SaveView saveView = new LogicView.SaveView();
@@ -175,6 +186,63 @@
            cyclicTitle.btnClick.MouseUpEventHandler += (sender, e) =>
            {
                DateMethod(cyclicTitle.btnText);
            };
            ///是否要推送点击事件
            //初始化对象
            PushConfigs pushConfigs = new PushConfigs();
            if (Logic.currlogic.pushConfigs.Count > 0)
            {
                pushConfigs = Logic.currlogic.pushConfigs[0];
            }
            else
            {
                if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo))
                {
                    //默认推送当前账号
                    pushConfigs.pushTarget.Add(UserInfo.Current.userMobileInfo);
                }
                else
                {
                    //默认推送当前账号
                    pushConfigs.pushTarget.Add(UserInfo.Current.userEmailInfo);
                }
            }
            push.btnNextIcon.MouseUpEventHandler += (sender, e) =>
            {
               push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected;
                if (push.btnNextIcon.IsSelected)
                {
                    if (Logic.currlogic.pushConfigs.Count > 0)
                    {
                        //清空之前旧配置数据
                        Logic.currlogic.pushConfigs.Clear();
                    }
                    //增加配置数据
                    Logic.currlogic.pushConfigs.Add(pushConfigs);
                }
                else
                {
                    if (Logic.currlogic.pushConfigs.Count > 0)
                    {
                        //默认取第一个赋值
                        pushConfigs = Logic.currlogic.pushConfigs[0];
                        //清空配置数据
                        Logic.currlogic.pushConfigs.Clear();
                    }
                }
            };
            ///输入推送文本
            notification.btnClick.MouseUpEventHandler += (sender, e) =>
            {
                InputPushText inputPushText = new InputPushText();
                MainPage.BasePageView.AddChidren(inputPushText);
                inputPushText.Show(pushConfigs);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                inputPushText.action += (pushConfigsIfon) =>
                {
                    //赋值
                    pushConfigs = pushConfigsIfon;
                };
            };
            ///保存点击事件
            saveView.btnClick.MouseUpEventHandler += (sender, e) =>
@@ -460,7 +528,6 @@
        {
            //定义一个局部weekList列表用来记录选中数据;
            List<string> weekStateList = new List<string>();
            PublicInterface weekView = new PublicInterface();
            if (Logic.currlogic.cycle.type == "week")
            {
HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs
New file
@@ -0,0 +1,132 @@
using System;
using System.Collections.Generic;
using Shared;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public class AirQuality : FrameLayout
    {
        public AirQuality()
        {
            Tag = "Logic";
        }
        public void Show()
        {
            #region  界面布局
            LogicView.TopView topView = new LogicView.TopView();
            topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
            this.AddChidren(topView.FLayoutView());
            topView.topNameBtn.TextID = StringId.selectionCondition;
            topView.Location();
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                RemoveFromParent();
            };
            FrameLayout viewLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64 + 20),
                Width = Application.GetRealWidth(LogicView.TextSize.view375),
                Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 20),
                BackgroundColor = CSS.CSS_Color.viewMiddle,
            };
            this.AddChidren(viewLayout);
            #endregion
            var list = new List<string> {
                Language.StringByID(StringId.kongqiyou),
                Language.StringByID(StringId.kongqiliang),
                Language.StringByID(StringId.kongqicha),
            };
            for (int i = 0; i < list.Count; i++)
            {
                LogicView.SelectTypeView view = new LogicView.SelectTypeView();
                view.frameLayout.Y = Application.GetRealHeight(i * 50);
                view.btnIcon.Visible = false;
                view.btnNextIcon.Visible = false;
                view.btnText.X = Application.GetRealWidth(16);
                view.btnLine.X = Application.GetRealWidth(16);
                view.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
                view.btnText.Text = list[i];
                view.btnClick.Tag = list[i];
                viewLayout.AddChidren(view.FLayoutView());
                view.btnClick.MouseUpEventHandler += (sen, e) =>
                {
                    string value = "";
                    string text = view.btnClick.Tag.ToString();
                    if (text == Language.StringByID(StringId.kongqiyou))
                    {
                        //优
                        value = "excellent";
                    }
                    else if (text == Language.StringByID(StringId.kongqiliang))
                    {
                        //良
                        value = "good";
                    }
                    else if (text == Language.StringByID(StringId.kongqicha))
                    {
                        //差
                        value = "poor";
                    }
                    AddDic(value);
                };
            }
        }
        /// <summary>
        /// 封装数据
        /// </summary>
        /// <param name="value"></param>
        private void AddDic(string value)
        {
            Input input = new Input();
            input.sid = LogicMethod.NewSid();
            input.condition_type = "9";
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.dictionary(dic, "key", "air_quality");
            LogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.dictionary(dic, "value", value);
            input.condition.Add(dic);
            AddCondition(input);
        }
        /// <summary>
        /// 添加条件
        /// </summary>
        /// <param name="input"></param>
        private void AddCondition(Input input)
        {
            ///记录索引值
            int index = -1;
            for (var i = 0; i < Logic.currlogic.input.Count; i++)
            {
                var condition_type = Logic.currlogic.input[i].condition_type;
                if (condition_type == "9")
                {
                    ///找到标记索引,退出循环体
                    index = i;
                    break;
                }
            }
            if (index != -1)
            {
                //移除旧数据
                Logic.currlogic.input.RemoveAt(index);
                //新数据插入旧数据的位置
                Logic.currlogic.input.Insert(index, input);
            }
            else
            {
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -391,6 +391,40 @@
                            }
                        }
                        break;
                    case "9":
                        {
                            inputView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png";
                            foreach (var dic in dicList)
                            {
                                string strtext = "";
                                string value = dic["value"];
                                switch (value)
                                {
                                    case "excellent":
                                        {
                                            strtext = Language.StringByID(StringId.kongqiyou);
                                        }
                                        break;
                                    case "good":
                                        {
                                            strtext = Language.StringByID(StringId.kongqiliang);
                                        }
                                        break;
                                    case "poor":
                                        {
                                            strtext = Language.StringByID(StringId.kongqicha);
                                        }
                                        break;
                                }
                                inputView.btnText.TextID = StringId.kongqizhiliang;
                                inputView.btnState.Text = strtext;
                            }
                        }
                        break;
                }
                //再次编辑条件状态点击事件
@@ -549,6 +583,15 @@
                                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                            }
                            break;
                        case "9":
                            {
                                AirQuality airQuality = new AirQuality();
                                MainPage.BasePageView.AddChidren(airQuality);
                                airQuality.Show();
                                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                            }
                            break;
                    }
                };
                ///删除控件
HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs
New file
@@ -0,0 +1,144 @@
using System;
using Shared;
using System.Collections.Generic;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public class InputPushText : FrameLayout
    {
        public InputPushText()
        {
            Tag = "Logic";
        }
        public  Action<PushConfigs> action;
        public void Show(PushConfigs pushConfigs)
        {
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            LogicView.TopView topView = new LogicView.TopView();
            topView.topNameBtn.TextID = StringId.fasongtongzhi;
            this.AddChidren(topView.FLayoutView());
            FrameLayout viewLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64),
                Width = Application.GetRealWidth(LogicView.TextSize.view375),
                Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 76),
                BackgroundColor = CSS.CSS_Color.viewMiddle,
            };
            this.AddChidren(viewLayout);
            #region  通知内容
            LogicView.AddOutputInputTextView addInputTextView = new LogicView.AddOutputInputTextView();
            addInputTextView.btnIf.TextID = StringId.tongzhineirong;
            viewLayout.AddChidren(addInputTextView.FLayoutView(46, 12));
            ///输入推送文本
            EditTextView textBox = new EditTextView//EditText
            {
                Y = Application.GetRealHeight(42),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(152),
                TextAlignment = TextAlignment.TopLeft,
                Radius=(uint)Application.GetRealHeight(12),
                Text= pushConfigs.pushContent,
                TextSize = LogicView.TextSize.text14,
                TextColor= CSS.CSS_Color.textColor,
                PlaceholderText =Language.StringByID(StringId.xianzhichangdu),//"(100字以内)",
                PlaceholderTextColor = CSS.CSS_Color.textCancelColor,
                BackgroundColor = CSS.CSS_Color.textWhiteColor,
            };
            viewLayout.AddChidren(textBox);
            textBox.TextChangeEventHandler += (sender, e) =>
            {
                var leng = e.Length;
                if (leng > 100)
                {
                    textBox.Text = e.Substring(0,100);
#if __Android__
                    textBox.SetSelectionEnd();
#endif
                }
                pushConfigs.pushContent = textBox.Text.Trim();
            };
            #endregion
            #region  App推送
            LogicView.LogicTypeTitleView appPush = new LogicView.LogicTypeTitleView();
            appPush.frameLayout.Y = Application.GetRealHeight(206);
            appPush.frameLayout.Radius = (uint)Application.GetRealHeight(12);
            appPush.btnText.TextID = StringId.apptuisong;
            appPush.btnText.X = Application.GetRealWidth(12);
            viewLayout.AddChidren(appPush.FLayoutView());
            appPush.btnClick.MouseUpEventHandler += (sender, e) =>
            {
                //定义一个局部账号列表用来记录选中数据;
                List<string> accountList = new List<string>();
                Loading loading = new Loading();
                this.AddChidren(loading);
                loading.Start();
                new System.Threading.Thread(() =>
                {
                    try
                    {
                        var userList = Send.GetResidenceMemberAccount();
                        for (int i = 0; i < userList.Count; i++)
                        {
                            var user = userList[i];
                            accountList.Add(user.Account);
                        }
                    }
                    catch { }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            loading.Hide();
                            if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo))
                            {
                                //默认推送当前账号
                                accountList.Insert(0, UserInfo.Current.userMobileInfo);
                            }
                            else
                            {
                                //默认推送当前账号
                                accountList.Insert(0, UserInfo.Current.userEmailInfo);
                            }
                            PublicInterface view = new PublicInterface();
                            view.FrameOrVvList(this, accountList, pushConfigs.pushTarget, StringId.zhanghaoxuanze
                               , (list) =>
                               {
                                   pushConfigs.pushTarget = list;
                               });
                        });
                    }
                })
                { IsBackground = true }.Start();
            };
            #endregion
            #region  确认
            LogicView.SaveView saveView = new LogicView.SaveView();
            saveView.btnSave.TextID = StringId.queren;
            saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            this.AddChidren(saveView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                action(pushConfigs);
                RemoveFromParent();
            };
            saveView.btnClick.MouseUpEventHandler += (e, sen) =>
            {
                action(pushConfigs);
                RemoveFromParent();
            };
            #endregion
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -5,6 +5,7 @@
    /// <summary>
    /// 逻辑存储数据对象
    /// </summary>
    [Serializable]
    public class Logic
    {
@@ -48,12 +49,17 @@
        /// 逻辑输出目标数组
        /// </summary>
        public List<Output> output = new List<Output>();
        /// <summary>
        /// 推送配置
        /// </summary>
        public List<PushConfigs> pushConfigs = new List<PushConfigs>();
    }
    /// <summary>
    /// 执行周期对象
    /// </summary>
    [Serializable]
    public class Cycle
    {
        /// <summary>
@@ -66,6 +72,7 @@
    /// <summary>
    /// 输入条件对象
    /// </summary>
    [Serializable]
    public class Input
    {
        /// <summary>
@@ -85,10 +92,15 @@
        /// </summary>
        public string condition_type = "";
        public List<Dictionary<string, string>> condition = new List<Dictionary<string, string>>();
        /// <summary>
        /// 地理围栏配置
        /// </summary>
        public Fence geo_fence = new Fence();
    }
    /// <summary>
    /// 输出目标对象
    /// </summary>
    [Serializable]
    public class Output
    {
        /// <summary>
@@ -104,7 +116,44 @@
        public string target_type = "";
        public List<Dictionary<string, string>> status = new List<Dictionary<string, string>>();
    }
    /// <summary>
    /// 地理围栏配置
    /// </summary>
    [Serializable]
    public class Fence
    {
        /// <summary>
        /// 经度
        /// </summary>
        public string longitude = string.Empty;
        /// <summary>
        /// 纬度
        /// </summary>
        public string latitude = string.Empty;
        /// <summary>
        /// 单位米
        /// </summary>
        public string radius = string.Empty;
    }
    /// <summary>
    /// 推送配置
    /// </summary>
    [Serializable]
    public class PushConfigs
    {
        /// <summary>
        /// 推送方式(APP/SMS)
        /// </summary>
        public string pushMethod = "APP";
        /// <summary>
        /// 推送内容
        /// </summary>
        public string pushContent = string.Empty;
        /// <summary>
        /// 推送目标
        /// </summary>
        public List<string> pushTarget = new List<string> {};
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs
@@ -35,7 +35,6 @@
            frameLayout.Height = Application.GetRealHeight(flHeight);
            btnIf.Y= Application.GetRealHeight(btnY);
            frameLayout.AddChidren(btnIf);
            return frameLayout;
        }
    }
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs
@@ -9,7 +9,7 @@
        /// <summary>
        /// 最上面块View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        public FrameLayout frameLayout = new FrameLayout
        {
            BackgroundColor = CSS.CSS_Color.viewTop,
            Height = Application.GetRealHeight(64),
@@ -22,7 +22,7 @@
        {
            TextSize = TextSize.text18,
            TextColor = CSS.CSS_Color.textColor,
            Width = Application.GetRealWidth(TextSize.view375-60-60),
            Width = Application.GetRealWidth(TextSize.view375 - 60 - 60),
            Height = Application.GetRealHeight(25),
            Y = Application.GetRealHeight(30),
            X = Application.GetRealWidth(60)
@@ -62,7 +62,7 @@
        /// <summary>
        /// 设置图标增加热键大小
        /// </summary>
        public Button clickSetBtn = new Button
        public Button clickSetBtn = new Button
        {
            X = Application.GetRealWidth(337 - 37),
            Width = Application.GetRealWidth(28 + 37),
@@ -82,6 +82,35 @@
            return frameLayout;
        }
        #endregion
        /// <summary>
        /// 显示位置
        /// </summary>
        public void Location()
        {
            //获取宽度
            int widthValue = topNameBtn.GetTextWidth();
            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
            Button locationBtn = new Button
            {
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(18),
                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
                Y = Application.GetRealHeight(34 + 1),
                UnSelectedImagePath = "LogicIcon/location.png",
            };
            frameLayout.AddChidren(locationBtn);
            Button textBtn = new Button
            {
                Height = Application.GetRealHeight(14),
                Y = Application.GetRealHeight(57),
                TextSize = LogicView.TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                Text = "广东广州市番禺区石楼镇",
            };
            frameLayout.AddChidren(textBtn);
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -123,7 +123,7 @@
        /// <summary>
        ///  按+跳转到逻辑界面的方法
        /// </summary>
        public static void SkipAddLogicPage()
        public void SkipAddLogicPage()
        {
            Logic.currlogic = new Logic();
            var addLogic = new AddLogic();
@@ -244,7 +244,7 @@
            if (idStr.Code == "0" && idStr.Data != null && idStr.Data.ToString() != "")
            {
                var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data);
                var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Date>>(date);
                var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicData>>(date);
                for (int i = 0; i < dateList.Count; i++)
                {
                    //添加逻辑ID
@@ -478,12 +478,12 @@
            }
        }
    }
    class Date
    class LogicData
    {
        /// <summary>
        /// 云端唯一id
        /// </summary>
        public string userLogicId = "";
        public string userLogicId = "";
        /// <summary>
        /// 网关id
        /// </summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
@@ -388,6 +388,157 @@
        }
        /// <summary>
        /// 超出5个元素该用滑动控件
        /// </summary>
        /// <param name="frame">显示在哪个界面的父控件</param>
        /// <param name="list">显示数据源</param>
        /// <param name="stateList">之前状态数据源</param>
        /// <param name="titleText">标题</param>
        /// <param name="action">返回值索引值</param>
        public void FrameOrVvList(FrameLayout frame, List<string> list,List<string>stateList, int titleText, Action<List<string>> action)
        {
            int line = 0;
            if (list.Count == 0 || list.Count > 5)
            {
                //超出5个只能默认5个;
                line = 5;
            }
            else
            {
                line = list.Count;
            }
            FrameLayout frameLayout = new FrameLayout
            {
                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
            };
            frame.AddChidren(frameLayout);
            LogicView.DateView view = new LogicView.DateView();
            view.btnTitle.TextID = titleText;
            view.FLayoutView(frameLayout, line);
            view.btnCancel.MouseUpEventHandler += (sender, e) =>
            {
                //移除fLayout界面
                frameLayout.RemoveFromParent();
            };
            //小于5使用
            FrameLayout frameL = new FrameLayout
            {
                Y = Application.GetRealHeight(56),
                Height = Application.GetRealHeight(50 * line),
            };
            //大于5使用
            VerticalRefreshLayout verticalRefresh = new VerticalRefreshLayout
            {
                Y = Application.GetRealHeight(56),
                Height = Application.GetRealHeight(50 * 5),
            };
            verticalRefresh.BeginHeaderRefreshingAction += () =>
            {
                //关闭刷新View;
                verticalRefresh.EndHeaderRefreshing();
            };
            if (list.Count == 0)
            {
                //Button btnTipNot = new Button
                //{
                //    X = Application.GetRealWidth(93),
                //    Y = Application.GetRealHeight(80),
                //    Width = Application.GetRealWidth(158),
                //    Height = Application.GetRealWidth(158),
                //    UnSelectedImagePath = "TipNot.png",
                //};
                //view.frameLayout.AddChidren(btnTipNot);
                //Button btnTipNotText = new Button()
                //{
                //    Y = btnTipNot.Bottom + Application.GetRealHeight(16),
                //    Height = Application.GetRealHeight(20),
                //    TextID = StringId.secnenull,
                //    TextColor = CSS.CSS_Color.textColor,
                //    TextSize = LogicView.TextSize.text14,
                //    TextAlignment = TextAlignment.Center,
                //};
                //view.frameLayout.AddChidren(btnTipNotText);
            }
            else if (list.Count > 0 && list.Count <= 5)
            {
                view.frameLayout.AddChidren(frameL);
            }
            else if (list.Count > 5)
            {
                view.frameLayout.AddChidren(verticalRefresh);
            }
            List<string> selecetdList = new List<string>();
            for (int i = 0; i < list.Count; i++)
            {
                string strName = list[i];
                LogicView.CheckView checkView = new LogicView.CheckView();
                checkView.btnText.TextSize = LogicView.TextSize.text14;
                if (list.Count <= 5)
                {
                    checkView.frameLayout.Y = Application.GetRealWidth(i * 50);
                    frameL.AddChidren(checkView.FLayoutView());
                    if (line - 1 == i)
                    {
                        checkView.btnLine.BackgroundColor = CSS.CSS_Color.view;
                    }
                }
                else
                {
                    verticalRefresh.AddChidren(checkView.FLayoutView());
                }
                if (stateList.Contains(strName)) {
                    checkView.btnClick.IsSelected = true;
                    checkView.btnCheckIcon.IsSelected = true;
                    selecetdList.Add(strName);
                }
                checkView.btnText.Text = strName;
                checkView.btnClick.Tag = strName;//标记
                //点击事件
                checkView.btnClick.MouseUpEventHandler += (sender1, e1) =>
                {
                    checkView.btnClick.IsSelected = !checkView.btnClick.IsSelected;
                    checkView.btnCheckIcon.IsSelected = checkView.btnClick.IsSelected;
                    if (checkView.btnClick.IsSelected)
                    {
                        if (!selecetdList.Contains(checkView.btnClick.Tag.ToString()))
                        {
                            selecetdList.Add(checkView.btnClick.Tag.ToString());
                        }
                    }
                    else
                    {
                        if (selecetdList.Contains(checkView.btnClick.Tag.ToString()))
                        {
                            selecetdList.Remove(checkView.btnClick.Tag.ToString());
                        }
                    }
                };
            }
            view.btnConfirm.MouseUpEventHandler += (sender1, e1) =>
            {
                if (selecetdList.Count == 0)
                {
                    return;
                }
                //列表索引值
                action(selecetdList);
                //移除fLayout界面
                frameLayout.RemoveFromParent();
            };
        }
        /// <summary>
        /// 获取界面列表
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -4,11 +4,33 @@
using HDL_ON.DAL.Server;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public  class Send
    {
        /// <summary>
        /// 调用获取住宅子账号列表
        /// </summary>
        public static List<ResidenceMemberInfo> GetResidenceMemberAccount()
        {
            var responePack = new HttpServerRequest().GetResidenceMemberAccount();
            if (responePack.Code == StateCode.SUCCESS)
            {
                return Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString());
            }
            //失败
            else
            {
                //提示
                IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
            }
            return new List<ResidenceMemberInfo>();
        }
        /// <summary>
        /// 获取逻辑ID列表
        /// </summary>
@@ -105,6 +127,25 @@
                    outputArray.Add(outputTypeJOb);
                }
                var pushConfigsArray = new JArray { };
                if (logic.pushConfigs.Count > 0)
                {   // 推送文本
                    foreach (var pushConfig in logic.pushConfigs)
                    {
                        var pushConfigJob = new JObject { };
                        pushConfigJob.Add("pushMethod", pushConfig.pushMethod);
                        pushConfigJob.Add("pushContent", pushConfig.pushContent);
                        var accountArray = new JArray { };
                        foreach (var account in pushConfig.pushTarget)
                        {
                            accountArray.Add(account);
                        }
                        pushConfigJob.Add("pushTarget", accountArray);
                        pushConfigsArray.Add(pushConfigJob);
                    }
                }
                var logicjArray = new JArray { };
                var logicIfon = new JObject { };
                logicIfon.Add("sid", logic.sid);
@@ -115,6 +156,7 @@
                logicIfon.Add("cycle", cycleJObject);
                logicIfon.Add("input", inputArray);
                logicIfon.Add("output", outputArray);
                logicIfon.Add("pushConfigs", pushConfigsArray);
                logicjArray.Add(logicIfon);
                var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add);
@@ -192,6 +234,25 @@
                    outputArray.Add(outputTypeJOb);
                }
                var pushConfigsArray = new JArray { };
                if (logic.pushConfigs.Count > 0)
                {   // 推送文本
                    foreach (var pushConfig in logic.pushConfigs)
                    {
                        var pushConfigJob = new JObject { };
                        pushConfigJob.Add("pushMethod", pushConfig.pushMethod);
                        pushConfigJob.Add("pushContent", pushConfig.pushContent);
                        var accountArray = new JArray { };
                        foreach (var account in pushConfig.pushTarget)
                        {
                            accountArray.Add(account);
                        }
                        pushConfigJob.Add("pushTarget", accountArray);
                        pushConfigsArray.Add(pushConfigJob);
                    }
                }
                var logicjArray = new JArray { };
                var logicIfon = new JObject { };
                logicIfon.Add("userLogicId", logic.userLogicId);
@@ -203,6 +264,8 @@
                logicIfon.Add("cycle", cycleJObject);
                logicIfon.Add("input", inputArray);
                logicIfon.Add("output", outputArray);
                logicIfon.Add("pushConfigs", pushConfigsArray);
                logicjArray.Add(logicIfon);
                var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update);
HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
@@ -18,29 +18,7 @@
            topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
            this.AddChidren(topView.FLayoutView());
            topView.topNameBtn.Text = titelText;
            //获取宽度
            int widthValue = topView.topNameBtn.GetTextWidth();
            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
            Button locationBtn = new Button
            {
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(18),
                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
                Y = Application.GetRealHeight(34 + 1),
                UnSelectedImagePath = "LogicIcon/location.png",
            };
            topView.frameLayout.AddChidren(locationBtn);
            Button textBtn = new Button
            {
                Height = Application.GetRealHeight(14),
                Y = Application.GetRealHeight(57),
                TextSize = LogicView.TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                Text = "广东广州市番禺区石楼镇",
            };
            topView.frameLayout.AddChidren(textBtn);
            topView.Location();
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                RemoveFromParent();
HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
@@ -46,6 +46,15 @@
            weatherView.btnText.TextID = StringId.tianqibianhua;
            viewLayout.AddChidren(weatherView.FLayoutView());
            //空气质量
            LogicView.SelectTypeView kongqiViewk = new LogicView.SelectTypeView();
            kongqiViewk.frameLayout.Y = weatherView.frameLayout.Bottom;
            kongqiViewk.btnIcon.Visible = false;
            kongqiViewk.btnText.X = Application.GetRealWidth(16);
            kongqiViewk.btnLine.X = Application.GetRealWidth(16);
            kongqiViewk.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            kongqiViewk.btnText.TextID = StringId.kongqizhiliang;
            viewLayout.AddChidren(kongqiViewk.FLayoutView());
            #endregion
            #region  所有点击事件
@@ -64,7 +73,14 @@
                weatherCondition.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            //空气质量
            kongqiViewk.btnClick.MouseUpEventHandler += (sen, e) => {
                AirQuality airQuality = new AirQuality();
                MainPage.BasePageView.AddChidren(airQuality);
                airQuality.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            #endregion
        }
    }
HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs
@@ -16,29 +16,7 @@
            topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
            this.AddChidren(topView.FLayoutView());
            topView.topNameBtn.TextID = StringId.selectionCondition;
            //获取宽度
            int widthValue = topView.topNameBtn.GetTextWidth();
            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
            Button locationBtn = new Button
            {
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(18),
                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
                Y = Application.GetRealHeight(34 + 1),
                UnSelectedImagePath = "LogicIcon/location.png",
            };
            topView.frameLayout.AddChidren(locationBtn);
            Button textBtn = new Button
            {
                Height = Application.GetRealHeight(14),
                Y = Application.GetRealHeight(57),
                TextSize = LogicView.TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                Text = "广东广州市番禺区石楼镇",
            };
            topView.frameLayout.AddChidren(textBtn);
            topView.Location();
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                RemoveFromParent();
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -606,7 +606,8 @@
                else
                {
                    //跳转到逻辑界面
                    UI2.Intelligence.Automation.MainView.SkipAddLogicPage();
                    UI2.Intelligence.Automation.MainView logicMainView = new UI2.Intelligence.Automation.MainView();
                    logicMainView.SkipAddLogicPage();
                }
            };
        }
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -260,6 +260,7 @@
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var page = new BrandListPage();// AddThirdPartyBrandListpage(); // BrandListPage();
                MainPage.BasePageView.AddChidren(page);
                page.LoadPage();
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -148,174 +148,6 @@
            #endregion
            ///初始化界面
            UIView(vv);
        }
        void GoToShowSortSelection(List<string> dataList)
        {
            Dictionary<string, List<string>> dict = new Dictionary<string, List<string>>();
            foreach (var data in dataList)
            {
                //提取字符串第一位
                //string s = data.Substring(0, 1);
                var key = GetCharSpellCode(data);
                if (dict.ContainsKey(key))
                {
                    var value = dict[key];
                    if (value == null)
                    {
                        value = new List<string>();
                    }
                    value.Add(data);
                }
                else
                {
                    var value = new List<string>();
                    value.Add(data);
                    dict.Add(key, value);
                }
            }
            Application.RunOnMainThread(() =>
            {
                JLCountrycode.CountryCodeView.Current.ShowSortSelection("选择红外品牌", dict, (countryName) =>
                {
                    //Console.WriteLine("countryName: " + countryName);
                    Utlis.ShowTip("选中了:" + countryName);
                });
            });
        }
        /// <summary>
        /// 获取汉字首字母
        /// </summary>
        /// <param name="textValue"></param>
        /// <returns></returns>
        private string GetCharSpellCode(string textValue)
        {
            long iCnChar;
            byte[] ZW = Encoding.GetEncoding("gb2312").GetBytes(textValue);
            //如果是字母,则直接返回
            if (ZW.Length == 1)
            {
                return textValue.ToUpper();
            }
            else
            {
                // get the array of byte from the single char
                int i1 = (short)(ZW[0]);
                int i2 = (short)(ZW[1]);
                iCnChar = i1 * 256 + i2;
            }
            // iCnChar match the constant
            if ((iCnChar >= 45217) && (iCnChar <= 45252))
            {
                return "A";
            }
            else if ((iCnChar >= 45253) && (iCnChar <= 45760))
            {
                return "B";
            }
            else if ((iCnChar >= 45761) && (iCnChar <= 46317))
            {
                return "C";
            }
            else if ((iCnChar >= 46318) && (iCnChar <= 46825))
            {
                return "D";
            }
            else if ((iCnChar >= 46826) && (iCnChar <= 47009))
            {
                return "E";
            }
            else if ((iCnChar >= 47010) && (iCnChar <= 47296))
            {
                return "F";
            }
            else if ((iCnChar >= 47297) && (iCnChar <= 47613))
            {
                return "G";
            }
            else if ((iCnChar >= 47614) && (iCnChar <= 48118))
            {
                return "H";
            }
            else if ((iCnChar >= 48119) && (iCnChar <= 49061))
            {
                return "J";
            }
            else if ((iCnChar >= 49062) && (iCnChar <= 49323))
            {
                return "K";
            }
            else if ((iCnChar >= 49324) && (iCnChar <= 49895))
            {
                return "L";
            }
            else if ((iCnChar >= 49896) && (iCnChar <= 50370))
            {
                return "M";
            }
            else if ((iCnChar >= 50371) && (iCnChar <= 50613))
            {
                return "N";
            }
            else if ((iCnChar >= 50614) && (iCnChar <= 50621))
            {
                return "O";
            }
            else if ((iCnChar >= 50622) && (iCnChar <= 50905))
            {
                return "P";
            }
            else if ((iCnChar >= 50906) && (iCnChar <= 51386))
            {
                return "Q";
            }
            else if ((iCnChar >= 51387) && (iCnChar <= 51445))
            {
                return "R";
            }
            else if ((iCnChar >= 51446) && (iCnChar <= 52217))
            {
                return "S";
            }
            else if ((iCnChar >= 52218) && (iCnChar <= 52697))
            {
                return "T";
            }
            else if ((iCnChar >= 52698) && (iCnChar <= 52979))
            {
                return "W";
            }
            else if ((iCnChar >= 52980) && (iCnChar <= 53640))
            {
                return "X";
            }
            else if ((iCnChar >= 53689) && (iCnChar <= 54480))
            {
                return "Y";
            }
            else if ((iCnChar >= 54481) && (iCnChar <= 55289))
            {
                return "Z";
            }
            else return ("");
        }
        /// <summary>
@@ -458,21 +290,28 @@
                {
                    //清空之前数据
                    DeviceTypeList.Clear();
                    var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString());
                    for (int a = 0; a < jArray.Count; a++)
                    try
                    {
                        var jay = jArray[a];
                        var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
                        var objDeviceType = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceType>(str);
                        if (objDeviceType != null)
                        var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString());
                        for (int a = 0; a < jArray.Count; a++)
                        {
                            if (null == DeviceTypeList.Find((c) => c.id == objDeviceType.id))
                            var jay = jArray[a];
                            var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
                            var objDeviceType = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceType>(str);
                            if (objDeviceType != null)
                            {
                                DeviceTypeList.Add(objDeviceType);
                                if (null == DeviceTypeList.Find((c) => c.id == objDeviceType.id))
                                {
                                    DeviceTypeList.Add(objDeviceType);
                                }
                            }
                        }
                        action();
                    }
                    action();
                    catch
                    {
                    }
                }
                else
                {
@@ -497,21 +336,31 @@
                {
                    //清空之前数据
                    brandList.Clear();
                    var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString());
                    for (int a = 0; a < jArray.Count; a++)
                    try
                    {
                        var jay = jArray[a];
                        var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
                        var brand = Newtonsoft.Json.JsonConvert.DeserializeObject<Brand>(str);
                        if (brand != null)
                        var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString());
                        for (int a = 0; a < jArray.Count; a++)
                        {
                            if (null == brandList.Find((c) => c.id == brand.id))
                            var jay = jArray[a];
                            var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
                            var brand = Newtonsoft.Json.JsonConvert.DeserializeObject<Brand>(str);
                            if (brand != null)
                            {
                                brandList.Add(brand);
                                if (null == brandList.Find((c) => c.id == brand.id))
                                {
                                    brandList.Add(brand);
                                }
                            }
                        }
                    }
                    actionBrand(brandList);
                    catch { }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            actionBrand(brandList);
                        });
                    }
                }
                else
                {
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -485,8 +485,8 @@
            var bodyView = new FrameLayout()
            {
                Y = Application.GetRealHeight(423),
                Height = Application.GetRealHeight(296),
                Y = Application.GetRealHeight(427),//667
                Height = Application.GetRealHeight(240),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            div.AddChidren(bodyView);
@@ -496,7 +496,6 @@
                Y = Application.GetRealHeight(16),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(296+200),
            };
            bodyView.AddChidren(contentView);
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -405,7 +405,7 @@
                {
                    lightingView.SetViewStatus(lightTemp.state == "on");
                }
                Console.WriteLine($"时间戳:{device.time_stamp}  时间:{device.GeteTime()} 烘干:{hotDryTemp.state} 风干:{windDryTemp.state} 消毒:{disinfectTemp.state} 灯光状态:{lightTemp.state}");
                MainPage.Log($"时间戳:{device.time_stamp}  时间:{device.GeteTime()} 烘干:{hotDryTemp.state} 风干:{windDryTemp.state} 消毒:{disinfectTemp.state} 灯光状态:{lightTemp.state}");
                #endregion
                #region 修改时间
HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs
New file
@@ -0,0 +1,150 @@
using System;
using System.Collections.Generic;
namespace HDL_ON.UI.UI2.EchartsOption_Energy
{
    public class EchartsOption_Energy
    {
        ///// <summary>
        /////
        ///// </summary>
        public EchartTitle title  = new EchartTitle();
        /// <summary>
        ///
        /// </summary>
        public EchartTooltip tooltip;
        /// <summary>
        ///
        /// </summary>
        public EchartGrid grid = new EchartGrid();
        /// <summary>
        ///
        /// </summary>
        public Echart_xAxis xAxis = new Echart_xAxis();
        /// <summary>
        ///
        /// </summary>
        public Echart_yAxis yAxis = new Echart_yAxis();
        /// <summary>
        ///
        /// </summary>
        public List<EchartSeriesItem> series =new List<EchartSeriesItem>();
        public EchartsOption_Energy()
        {
            tooltip = new EchartTooltip
            {
                trigger = "axis",
            };
        }
    }
    public class EchartTitle
    {
        public string text;
    }
    /// <summary>
    /// 线条属性
    /// </summary>
    public class EchartLineStyle
    {
        /// <summary>
        /// 坐标轴刻度线宽
        /// type   |   string
        /// 可选:
        /// 'solid'
        /// 'dashed'
        /// 'dotted'
        /// </summary>
        public string type = "solid";
        /// <summary>
        ///
        /// </summary>
        public int width = 1;
        /// <summary>
        /// 刻度线的颜色
        /// </summary>
        public string color = "#333";
    }
    public class EchartTooltip
    {
        /// <summary>
        ///
        /// </summary>
        public string trigger ="axis";
    }
    public class EchartGrid
    {
        /// <summary>
        ///
        /// </summary>
        public string left = "3%";
        /// <summary>
        ///
        /// </summary>
        public string right = "4%";
        /// <summary>
        ///
        /// </summary>
        public string bottom = "3%";
        /// <summary>
        ///
        /// </summary>
        public bool containLabel = true;
    }
    /// <summary>
    /// 坐标轴属性
    /// </summary>
    public class Echart_xAxis
    {
        public string type = "category";
        public List<string> data = new List<string>();
        public int offset = 5;
        public bool boundaryGap = false;
    }
    /// <summary>
    /// 坐标轴属性
    /// </summary>
    public class Echart_yAxis
    {
        public string type = "value";
    }
    public class EchartSeriesItem
    {
        /// <summary>
        /// 客厅
        /// </summary>
        public string name = "";
        /// <summary>
        ///
        /// </summary>
        public string type = "line";
        /// <summary>
        ///
        /// </summary>
        public bool smooth = true;
        /// <summary>
        ///
        /// </summary>
        public List<int> data;
        /// <summary>
        /// none 去掉拐点
        /// </summary>
        public string symbol = "none";
        /// <summary>
        /// 线条样式
        /// </summary>
        public EchartLineStyle lineStyle;
    }
}
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -1,32 +1,53 @@
using System;
using System.Collections.Generic;
using HDL_ON.DAL.Server;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using HDL_ON.UI.UI2.EchartsOption_Energy;
using Shared;
namespace HDL_ON.UI
{
    public class EnergyMainPage : FrameLayout
    {
        FrameLayout bodyView;
        List<uint> colorList = new List<uint>(){0xFF80AEFF, 0xFFFFD154, 0xFFFF9D54, 0xFFFE6A6A, 0xFFB183C3, 0xFFADE764,
                                        0xFFD7504B, 0xFFC6E579, 0xFFF4E001, 0xFFF0805A, 0xFF26C0C0};
        List<string> colorList2 = new List<string>() {
                                        "#80AEFF", "#FFD154", "#FF9D54", "#FE6A6A", "#B183C3", "#ADE764",
                                        "#D7504B", "#C6E579", "#F4E001", "#F0805A", "#26C0C0"};
        public EnergyMainPage()
        {
            bodyView = this;
        }
        /// <summary>
        ///
        /// </summary>
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.EnergyMonitoring)).LoadTopView();
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            var contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(603),
            };
            bodyView.AddChidren(contentView);
            #region 顶部view
            var generalTableView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(80),
                Y = Application.GetRealHeight(16),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(148),
                Radius = (uint)Application.GetRealWidth(5),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(generalTableView);
            contentView.AddChidren(generalTableView);
            TextButton btnTotalValue = new TextButton()
            {
@@ -58,18 +79,19 @@
            };
            generalTableView.AddChidren(btnTotalValueUint);
            var btnValue = new Button()
            var btnRealTimeData = new Button()
            {
                X = Application.GetRealWidth(18),
                Y = btnTotalValue.Bottom,
                Width = Application.GetRealWidth(209),
                Height = Application.GetRealWidth(28),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                IsBold = true,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.RealTimePowerConsumption,
            };
            generalTableView.AddChidren(btnValue);
            generalTableView.AddChidren(btnRealTimeData);
            btnRealTimeData.Text = Language.StringByID(StringId.RealTimePowerConsumption).Replace("{0}", "0");
            var echartsView = new FrameLayout()
            {
@@ -79,7 +101,8 @@
                //Y = Application.GetRealWidth(16),
            };
            generalTableView.AddChidren(echartsView);
            MyEchartsViewOn myEchartsView = new MyEchartsViewOn() {
            MyEchartsViewOn myEchartsView = new MyEchartsViewOn()
            {
                Width = Application.GetRealWidth(118),
                Height = Application.GetRealWidth(118),
            };
@@ -97,6 +120,365 @@
            myEchartsView.ShowWithOption(echartRootJson);
            var btnDrodDown = new Button()
            {
                Y = Application.GetRealWidth(118),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(30),
                UnSelectedImagePath = "FunctionIcon/Energy/EnergyDrodDownIcon.png",
            };
            generalTableView.AddChidren(btnDrodDown);
            #endregion
            var energyList = FunctionList.List.GetEnergyList();
            var energyListView = new FrameLayout()
            {
                Y = generalTableView.Bottom + Application.GetRealWidth(8),
                Height = Application.GetRealWidth(116 * energyList.Count),
            };
            contentView.AddChidren(energyListView);
            int index = 0;
            foreach (var energy in energyList)
            {
                EnergyRow(energy, energyListView, index);
                index++;
            }
        }
        FrameLayout diagramView;
        List<Function> queryList = new List<Function>();
        string curQueryType = "hour";
        void d1(FrameLayout contentView)
        {
            diagramView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(420),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
                BorderColor = 0x00000000,
                BorderWidth = 0,
            };
            contentView.AddChidren(diagramView);
            #region 选择数据日期范围
            var showDataTypeView = new FrameLayout()
            {
                X = Application.GetRealWidth(183),
                Y = Application.GetRealHeight(12),
                Width = Application.GetRealWidth(144),
                Height = Application.GetRealHeight(24),
                BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png",
            };
            diagramView.AddChidren(showDataTypeView);
            var btnShowHistroyData_Day = new Button()
            {
                Width = Application.GetRealWidth(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                IsSelected = true,
                TextID = StringId.day,
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Day);
            var btnShowHistroyData_Week = new Button()
            {
                X = Application.GetRealWidth(48),
                Width = Application.GetRealWidth(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextID = StringId.week,
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Week);
            var btnShowHistroyData_Month = new Button()
            {
                X = Application.GetRealWidth(48 * 2),
                Width = Application.GetRealWidth(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = DateTime.Now.Month.ToString() + Language.StringByID(StringId.month),
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Month);
            btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png";
                btnShowHistroyData_Day.IsSelected = true;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Week.IsSelected = false;
                curQueryType = "hour";
                d2();
            };
            btnShowHistroyData_Month.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg3.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = true;
                btnShowHistroyData_Week.IsSelected = false;
                curQueryType = "week";
                d2();
            };
            btnShowHistroyData_Week.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg2.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Week.IsSelected = true;
                curQueryType = "month";
                d2();
            };
            #endregion
            var historyDataView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(52),
                Width = Application.GetRealWidth(343 - 32),
                Height = Application.GetRealHeight(270),
            };
            diagramView.AddChidren(historyDataView);
            var myEchartsView = new MyEchartsViewOn();
            historyDataView.AddChidren(myEchartsView);
        }
        void d2()
        {
            int index = 0;
            var echartRootJson = new EchartsOption_Energy();
            var seriesList = new List<EchartSeriesItem>();
            foreach (var function in queryList)
            {
                var seriesItem = d3(function, index, echartRootJson.xAxis.data);
                seriesList.Add(seriesItem);
            }
        }
        /// <summary>
        /// 查询列表
        /// </summary>
        /// <summary>
        /// 读取传感器历史数据
        /// </summary>
        EchartSeriesItem d3(Function function, int index, List<string> xAxisData)
        {
            EchartSeriesItem sItem = null;
            List<string> data = new List<string>();
            var loadPage = new Loading()
            {
                LodingBackgroundColor = 0x88888888,
            };
            diagramView.AddChidren(loadPage);
            try
            {
                Application.RunOnMainThread(() =>
                {
                    loadPage.Start(Language.StringByID(StringId.PleaseWait));
                });
                var sensorType = function.spk.Split(".")[0];
                var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, function.deviceId, sensorType);
                if (revertObj != null)
                {
                    if (revertObj.Code == StateCode.SUCCESS)
                    {
                        var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
                         sItem = new EchartSeriesItem
                        {
                            data = new List<int>(),
                            lineStyle = new EchartLineStyle()
                            {
                                color = colorList2[index],
#if __IOS__
                                width = 5,
#elif __ANDROID__
                                        width = 2,
#endif
                            },
                        };
                        try
                        {
                            foreach (var d in revertData)
                            {
                                if (xAxisData.Count == 0)
                                {
                                    data.Add(d.fieldName);
                                }
                                sItem.data.Add(Convert.ToInt32(d.fieldValue));
                            }
                            xAxisData.AddRange(data);
                        }
                        catch (Exception ex)
                        {
                            MainPage.Log($"revertData:{ex.Message}");
                        }
                    }
                    else
                    {
                        Application.RunOnMainThread(() =>
                        {
                            IMessageCommon.Current.ShowErrorInfoAlter("", true, 2, Language.StringByID(StringId.GetSensorHistoryFailed), false);
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                MainPage.Log($"sensor history error : {ex.Message}");
            }
            finally
            {
                Application.RunOnMainThread(() =>
                {
                    loadPage.Hide();
                });
            }
            return sItem;
            //var echartRootJsonString = Newtonsoft.Json.JsonConvert.SerializeObject(echartRootJson);
            //myEchartsView.ShowWithOptionJsonString(echartRootJsonString);
        }
        /// <summary>
        ///
        /// </summary>
        public void EnergyRow(Function energy, FrameLayout view, int index)
        {
            var btnLine = new Button()
            {
                Y = Application.GetRealWidth(116 * index),
                Height = Application.GetRealWidth(16),
            };
            view.AddChidren(btnLine);
            var row = new FrameLayout()
            {
                Y = btnLine.Bottom,
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(100),
                Radius = (uint)Application.GetRealWidth(12),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            view.AddChidren(row);
            var btnColorTip = new Button()
            {
                X = Application.GetRealWidth(8),
                Y = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(12),
                Height = Application.GetRealWidth(12),
                BackgroundColor = colorList[index],
            };
            row.AddChidren(btnColorTip);
            var btnName = new Button()
            {
                X = Application.GetRealWidth(8 + 10 + 32),
                Y = Application.GetRealHeight(10),
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealHeight(24),
                Text = energy.name,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
            };
            row.AddChidren(btnName);
            var btnFromFloor = new Button()
            {
                X = Application.GetRealWidth(8 + 10 + 32),
                Y = Application.GetRealHeight(10 + 24),
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealHeight(18),
                Text = energy.GetRoomListName(),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            };
            row.AddChidren(btnFromFloor);
            var btnValue = new Button()
            {
                X = Application.GetRealWidth(28),
                Y = Application.GetRealWidth(57),
                Width = Application.GetRealWidth(226),
                Height = Application.GetRealWidth(43),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.HeadlineFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                Text = "---"
            };
            row.AddChidren(btnValue);
            var btnSetting = new Button()
            {
                X = Application.GetRealWidth(291),
                Y = Application.GetRealWidth(6),
                Width = Application.GetMinRealAverage(32),
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
            };
            row.AddChidren(btnSetting);
            Button btnSeltSensorValue = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealWidth(47),
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealWidth(43),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                IsBold = true,
                TextSize = CSS_FontSize.HeadlineFontSize,
            };
            row.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,
            };
            row.AddChidren(btnShowData);
            btnSetting.MouseUpEventHandler = (sender, e) =>
            {
                Action backAction = () =>
                {
                    btnName.Text = energy.name;
                };
                var infoView = new FunctionBaseInfoSetPage(energy, backAction);
                MainPage.BasePageView.AddChidren(infoView);
                infoView.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }
    }
}
}
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
namespace HDL_ON.Entity
namespace HDL_ON.UI.UI2.EnvironmentalScience
{
    #region 折线图
@@ -301,7 +301,7 @@
        /// <summary>
        /// 
        /// </summary>
        public List<string> data;
        public List<string> data = new List<string>();
        /// <summary>
        /// 坐标轴偏移
        /// </summary>
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -4,6 +4,7 @@
using HDL_ON.UI.CSS;
using System.Collections.Generic;
using HDL_ON.DAL.Server;
using HDL_ON.UI.UI2.EnvironmentalScience;
namespace HDL_ON.UI
{
@@ -944,10 +945,7 @@
        }
        void LoadEvent_SwitchOtherRoomSensorData()
        {
        }
    }
    public class EnvironmentalSensorHistor
HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs
File was deleted
HDL_ON/UI/UI2/FuntionControlView/Video/ObjectClass.cs
New file
@@ -0,0 +1,115 @@
using System;
using System.Collections.Generic;
namespace HDL_ON.UI.UI2.FuntionControlView.Video
{
    public class ObjectClass
    {
    }
    [Serializable]
    public class VideoClouds
    {
        /// <summary>
        /// 丰林绑定id(flBindId)(userKey)
        /// </summary>
        public string id = string.Empty;
        /// <summary>
        /// 住宅id
        /// </summary>
        public string homeId = string.Empty;
        /// <summary>
        /// 虚拟手机号
        /// </summary>
        public string phone = string.Empty;
        /// <summary>
        /// 虚拟身份证号码
        /// </summary>
        public string idCard = string.Empty;
        /// <summary>
        /// 社区主键Id
        /// </summary>
        public string communtiyId = string.Empty;
        /// <summary>
        /// 丰林楼栋号
        /// </summary>
        public string flBuildingId = string.Empty;
        /// <summary>
        /// 丰林楼栋名称
        /// </summary>
        public string flBuildingName = string.Empty;
        /// <summary>
        /// 丰林房间名称
        /// </summary>
        public string flRoomId = string.Empty;
        /// <summary>
        /// 丰林安全密钥
        /// </summary>
        public string flSecretKey = string.Empty;
        /// <summary>
        /// 丰林的小区Id
        /// </summary>
        public string flCmtId = string.Empty;
    }
    [Serializable]
    public class Call
    {
        /// <summary>
        ///记录主键Id
        /// </summary>
        public string id = string.Empty;
        /// <summary>
        /// 住宅id
        /// </summary>
        public string homeId = string.Empty;
        /// <summary>
        /// 呼叫时间
        /// </summary>
        public string callTime = string.Empty;
        /// <summary>
        /// 通话时长
        /// </summary>
        public string callDuration = string.Empty;
        /// <summary>
        /// 呼叫状态(0:未接;1:已接;2:拒接)
        /// </summary>
        public string callStatus = string.Empty;
        /// <summary>
        /// 是否开锁
        /// </summary>
        public bool isUnlock;
        /// <summary>
        /// 截图地址
        /// </summary>
        public string screenshotUrl = string.Empty;
        /// <summary>
        ///丰林绑定主键id(门口机主键Id)
        /// </summary>
        public string flBindId = string.Empty;
    }
    [Serializable]
    public class CallView
    {
        /// <summary>
        ///年
        /// </summary>
        public string year = string.Empty;
        public List<Call> callList = new List<Call>();
    }
    [Serializable]
    public class FlVideo
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        public string aliasName = string.Empty;
        /// <summary>
        /// 设备类型:(1室内机,2室外机,3围墙机,4管理机,5二次确认机)
        /// </summary>
        public string devType = string.Empty;
        public string uuid = string.Empty;
    }
}
HDL_ON/UI/UI2/FuntionControlView/Video/Send.cs
File was deleted
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
New file
@@ -0,0 +1,531 @@
using System;
using HDL_ON.UI.Music;
using System.Collections.Generic;
using Shared;
using HDL_ON.Stan;
using ZXing.QrCode.Internal;
namespace HDL_ON.UI.UI2.FuntionControlView.Video
{
    public class VideoMainView : FrameLayout
    {
        /// <summary>
        /// 加载可视对讲UI
        /// </summary>
        /// <param name="listVideo">门口机列表</param>
        /// <param name="listCall">通话记录列表</param>
        /// <param name="video">当前的可视对讲</param>
        public void Show(List<FlVideo> listVideo, List<CallView> listCall, VideoClouds video)
        {
            #region 布局界面
            this.BackgroundColor = MusicColor.ViewColor;
            var topView = new TopView();
            this.AddChidren(topView.TopFLayoutView());
            topView.topNameBtn.TextID = StringId.keshiduijiang;
            var pageView = new PageLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(667 - 64),
                IsShowPoint = false,
            };
            this.AddChidren(pageView);
            var view1 = new FrameLayout();
            pageView.AddChidren(view1);
            var view2 = new FrameLayout();
            pageView.AddChidren(view2);
            View1(view1, listVideo, video);
            View2(view2, listCall, video);
            Button btn11 = new Button
            {
                X = Application.GetRealWidth(170),
                Y = Application.GetRealHeight(578),
                Width = Application.GetRealWidth(14),
                Height = Application.GetRealHeight(6),
                BackgroundColor = MusicColor.SelectedColor,
                Radius = (uint)Application.GetRealHeight(4),
            };
            view1.AddChidren(btn11);
            Button btn12 = new Button
            {
                X = Application.GetRealWidth(192),
                Y = Application.GetRealHeight(578),
                Width = Application.GetRealWidth(14),
                Height = Application.GetRealHeight(6),
                BackgroundColor = 0x404484F4,
                Radius = (uint)Application.GetRealHeight(4),
            };
            view1.AddChidren(btn12);
            Button btn21 = new Button
            {
                X = Application.GetRealWidth(170),
                Y = Application.GetRealHeight(578),
                Width = Application.GetRealWidth(14),
                Height = Application.GetRealHeight(6),
                BackgroundColor = 0x404484F4,
                Radius = (uint)Application.GetRealHeight(4),
            };
            view2.AddChidren(btn21);
            Button btn22 = new Button
            {
                X = Application.GetRealWidth(192),
                Y = Application.GetRealHeight(578),
                Width = Application.GetRealWidth(14),
                Height = Application.GetRealHeight(6),
                BackgroundColor = MusicColor.SelectedColor,
                Radius = (uint)Application.GetRealHeight(4),
            };
            view2.AddChidren(btn22);
            pageView.PageChange = (sender, e) =>
            {
                if (pageView.PageIndex == 0)
                {
                    topView.topNameBtn.TextID = StringId.keshiduijiang;
                }
                else
                {
                    topView.topNameBtn.TextID = StringId.tonghuajilu;
                }
            };
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
            {
                if (pageView.PageIndex == 1)
                {
                    pageView.PageIndex = 0;
                }
                else
                {
                    RemoveFromParent();
                }
            };
            #endregion
        }
        /// <summary>
        /// 第一个界面
        /// </summary>
        /// <param name="view1">父控件</param>
        /// <param name="list">门口机列表</param>
        /// <param name="videoClouds">当前的可视对讲</param>
        void View1(FrameLayout view1, List<FlVideo> list, VideoClouds videoClouds)
        {
            #region 布局界面
            var bjFl = new FrameLayout
            {
                Y = Application.GetRealHeight(24),
                X = Application.GetRealWidth(24),
                Height = Application.GetRealHeight(526),
                Width = Application.GetRealWidth(327),
                BackgroundImagePath = "MusicIcon/playBj.png",
            };
            view1.AddChidren(bjFl);
            /// <summary>
            ///  汉字
            /// </summary>
            Button nameBtn = new Button
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(16),
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealHeight(33),
                TextColor = MusicColor.MusicTxet14Color,
                TextSize = TextSize.Text24,
                TextAlignment = TextAlignment.CenterLeft,
                //Text = "可视对讲",
                TextID = StringId.keshiduijiang,
            };
            bjFl.AddChidren(nameBtn);
            /// <summary>
            ///  区域名称
            /// </summary>
            Button regionBtn = new Button
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(53),
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(17),
                TextColor = MusicColor.MusicNoTxetColor,
                TextSize = TextSize.Text12,
                TextAlignment = TextAlignment.CenterLeft,
                Text = "123456"
            };
            // bjFl.AddChidren(regionBtn);
            /// <summary>
            ///收藏图标
            /// </summary>
            Button collectIconBtn = new Button
            {
                X = Application.GetRealWidth(273),
                Y = Application.GetRealHeight(14),
                Width = Application.GetRealWidth(40),
                Height = Application.GetRealWidth(40),
                UnSelectedImagePath = "MusicIcon/collect.png",
                SelectedImagePath = "MusicIcon/collectSelected.png",
            };
            // bjFl.AddChidren(collectIconBtn);
            ///可视对讲图标
            Button intercomBtnIcon = new Button
            {
                X = Application.GetRealWidth(84),
                Y = Application.GetRealHeight(118),
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealWidth(160),
                UnSelectedImagePath = "VideoIcon/keshiduijiang.png",
            };
            bjFl.AddChidren(intercomBtnIcon);
            var vv = new VerticalScrolViewLayout
            {
                Y = Application.GetRealHeight(306),
                Height = Application.GetRealHeight(220),
                Width = Application.GetRealWidth(327),
            };
            bjFl.AddChidren(vv);
            if (list.Count > 0)
            {
                //门禁二维码固定有的,虚拟一个出来
                list.Add(new FlVideo { aliasName = Language.StringByID(StringId.menjinerweima), devType = "100" });
            }
            //数组个数
            //int value = 15;
            //先计算数据所需要的很高度;
            int l = 0;
            if (list.Count % 3 == 0)
            {
                l = list.Count / 3;
            }
            else
            {
                l = (list.Count / 3) + 1;
            }
            var fL = new FrameLayout
            {
                Height = Application.GetRealHeight((48 + 24) * l),
            };
            vv.AddChidren(fL);
            int line = 0;
            #endregion
            for (int i = 1, j = 0; i <= list.Count; i++, j++)
            {
                var video = list[i - 1];
                #region
                var fLayout = new FrameLayout
                {
                    Width = Application.GetRealWidth(50),
                    Height = Application.GetRealWidth(48),
                    X = Application.GetRealWidth(31 + (58 + 50) * j),
                    Y = Application.GetRealHeight(20 + (48 + 24) * line),
                };
                fL.AddChidren(fLayout);
                var iconBtn = new Button
                {
                    X = Application.GetRealWidth(11),
                    Width = Application.GetRealWidth(28),
                    Height = Application.GetRealWidth(28),
                    UnSelectedImagePath = "VideoIcon/weiqiangji.png",
                };
                fLayout.AddChidren(iconBtn);
                var deviceNameBtn = new Button
                {
                    Y = iconBtn.Bottom + Application.GetRealHeight(6),
                    Width = Application.GetRealWidth(50),
                    Height = Application.GetRealHeight(14),
                    TextSize = TextSize.Text10,
                    TextColor = CSS.CSS_Color.TextualColor,
                    TextAlignment = TextAlignment.Center,
                    Text = video.aliasName,
                };
                fLayout.AddChidren(deviceNameBtn);
                var clickBtn = new Button { Tag = video };
                fLayout.AddChidren(clickBtn);
                if (i % 3 == 0)
                {
                    //满一行重置j=0值;
                    j = -1;
                    line += 1;
                }
                getIconAndText(video, iconBtn);
                #endregion
                //门口机的点击事件
                clickBtn.MouseUpEventHandler += (sender, e) =>
                {
                    var flVideo = clickBtn.Tag as FlVideo;
                    if (flVideo.devType == "100")
                    {
                        //门禁二维码固定有的
                        VideoSend.GetQRcode(this, videoClouds, (tag, paw) =>
                        {
                            if (tag)
                            {
                                //注意:密码有可能延时1分钟生效
                                View.ShowDialog showDialog = new View.ShowDialog();
                                showDialog.QRcode(paw);
                            }
                        });
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(flVideo.uuid))
                        {
                            new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.peizhicanshuyouyichang));
                            return;
                        }
                        ESVideoInfo eSVideoInfo = new ESVideoInfo
                        {
                            ESVideoUUID = getUuid(flVideo.uuid),
                            DeviceName = flVideo.aliasName,
                            roomno = videoClouds.flRoomId,
                            unitno = videoClouds.flBuildingId,
                        };
                        ESOnVideo.Current.ShowESVideoMonitor(eSVideoInfo);
                    }
                };
            }
        }
        /// <summary>
        /// 第二个界面
        /// </summary>
        /// <param name="view2">父控件</param>
        /// <param name="listCall">通话记录列表</param>
        /// <param name="video">当前的可视对讲</param>
        void View2(FrameLayout view2, List<CallView> listCall, VideoClouds video)
        {
            var bjFl = new FrameLayout
            {
                Y = Application.GetRealHeight(24),
                X = Application.GetRealWidth(24),
                Height = Application.GetRealHeight(526),
                Width = Application.GetRealWidth(327),
                BackgroundImagePath = "MusicIcon/playBj.png",
            };
            view2.AddChidren(bjFl);
            /// <summary>
            ///  汉字
            /// </summary>
            Button nameBtn = new Button
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(16),
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealHeight(33),
                TextColor = MusicColor.MusicTxet14Color,
                TextSize = TextSize.Text24,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.tonghuajilu,
            };
            bjFl.AddChidren(nameBtn);
            /// <summary>
            ///  云端照片只保留30天
            /// </summary>
            Button regionBtn = new Button
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(53),
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(17),
                TextColor = MusicColor.SelectedColor,
                TextSize = TextSize.Text12,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.baolu30,
            };
            //bjFl.AddChidren(regionBtn);
            var vv = new VerticalRefreshLayout
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(58),
                Height = Application.GetRealHeight(458),
                Width = Application.GetRealWidth(295),
            };
            bjFl.AddChidren(vv);
            vv.BeginHeaderRefreshingAction += () =>
            {
                VideoMethod videoMethod = new VideoMethod();
                var list = videoMethod.GetCall(video.id);
                RefreshView(vv, list);
                //关闭刷新View;
                vv.EndHeaderRefreshing();
            };
            RefreshView(vv, listCall);
        }
        /// <summary>
        /// 通话记录刷新界面
        /// </summary>
        /// <param name="vv">上下滑动控件</param>
        /// <param name="listCall">通话记录列表</param>
        public void RefreshView(VerticalRefreshLayout vv, List<CallView> listCall)
        {
            vv.RemoveAll();
            for (int i = 0; i < listCall.Count; i++)
            {
                var year = listCall[i];
                //年文本父控件
                View.FrameLayout50 frameLayout50 = new View.FrameLayout50();
                vv.AddChidren(frameLayout50.FLayoutView());
                frameLayout50.btnText.Text = year.year + Language.StringByID(StringId.nian);//年
                for (int j = 0; j < year.callList.Count; j++)
                {
                    var call = year.callList[j];
                    //门口机状态父控件
                    View.FrameLayout60 frameLayout60 = new View.FrameLayout60();
                    vv.AddChidren(frameLayout60.FLayoutView());
                    ///呼叫时间
                    frameLayout60.btnTime.Text = getTime(call.callTime);
                    ///呼叫状态(0:未接;1:已接;2:拒接);是否开锁;
                    frameLayout60.btnStateText.Text = getStateText(call.callStatus) + "," + getUnlockText(call.isUnlock);
                }
            }
        }
        /// <summary>
        /// 显示图标
        /// </summary>
        /// <param name="flVideo"></param>
        /// <param name="iconBtn">图标</param>
        private void getIconAndText(FlVideo flVideo, Button iconBtn)
        {
            //(1室内机,2室外机,3围墙机,4管理机,5二次确认机)
            string iconstr = "";
            switch (flVideo.devType)
            {
                case "1":
                    {
                        iconstr = "VideoIcon/danyuanji.png";
                    }
                    break;
                case "2":
                    {
                        iconstr = "VideoIcon/danyuanji.png";
                    }
                    break;
                case "3":
                    {
                        iconstr = "VideoIcon/weiqiangji.png";
                    }
                    break;
                case "4":
                    {
                        iconstr = "VideoIcon/weiqiangji.png";
                    }
                    break;
                case "5":
                    {
                        iconstr = "VideoIcon/weiqiangji.png";
                    }
                    break;
                case "100":
                    {
                        iconstr = "VideoIcon/menjin.png";
                    }
                    break;
                default:
                    {
                        iconstr = "VideoIcon/weiqiangji.png";
                    }
                    break;
            }
            iconBtn.UnSelectedImagePath = iconstr;
        }
        /// <summary>
        /// 获取显示时间文本
        /// </summary>
        /// <param name="str">utcTime</param>
        /// <returns></returns>
        private string getTime(string str)
        {
            var utcTime = Convert.ToDateTime(str);
            var dateTime = TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local);
            // var monday = dateTime.ToString("MM") + Language.StringByID(StringId.month) + dateTime.ToString("dd") + Language.StringByID(StringId.day);
            var monday = dateTime.ToString("MM") + "/" + dateTime.ToString("dd");
            var time = dateTime.ToString("HH") + ":" + dateTime.ToString("mm");
            return monday + " " + time;
        }
        /// <summary>
        /// 获取呼叫状态文本
        /// </summary>
        /// <param name="str">状态值0:未接;1:已接;2:拒接</param>
        /// <returns></returns>
        private string getStateText(string str)
        {
            string s = "";
            switch (str)
            {
                case "0":
                    {
                        s = Language.StringByID(StringId.weijieting);
                    }
                    break;
                case "1":
                    {
                        s = Language.StringByID(StringId.yijieting);
                    }
                    break;
                case "2":
                    {
                        s = Language.StringByID(StringId.yijujue);
                    }
                    break;
            }
            return s;
        }
        /// <summary>
        /// 获取开锁状态文本
        /// </summary>
        /// <param name="if_bool"></param>
        /// <returns></returns>
        private string getUnlockText(bool if_bool)
        {
            if (if_bool)
            {
                return Language.StringByID(StringId.yikaisuo);
            }
            else
            {
                return Language.StringByID(StringId.weikaisuo);
            }
        }
        /// <summary>
        /// 获取uuid
        /// </summary>
        /// <param name="uuid"></param>
        /// <returns></returns>
        private string getUuid(string uuid)
        {
            if (uuid.Contains(","))
            {
                var uuid1 = uuid.Split(',');
                return uuid1[0];
            }
            else
            {
                return uuid;
            }
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs
New file
@@ -0,0 +1,224 @@
using System;
using HDL_ON.DAL.Server;
using HDL_ON.UI.UI2.PersonalCenter.PirDevice;
using System.Collections.Generic;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.Video
{
    public class VideoMethod
    {
        /// <summary>
        /// 程序主入口
        /// </summary>
        /// <param name="frameLayout">log父控件</param>
        /// <param name="video">可视对讲对象</param>
        public void MianView(FrameLayout frameLayout, VideoClouds video)
        {
            //加载log
            Loading loading = new Loading();
            frameLayout.AddChidren(loading);
            loading.Start();
            List<FlVideo> listESVideoInfo = new List<FlVideo>();
            List<CallView> listCall = new List<CallView>();
            new System.Threading.Thread(() =>
            {
                try
                {
                    listESVideoInfo = VideoSend.GetVideoInfoList(video);
                    listCall = GetCall(video.id);
                }
                catch
                {
                }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        loading.Hide();
                        var mainView = new VideoMainView();
                        MainPage.BasePageView.AddChidren(mainView);
                        mainView.Show(listESVideoInfo, listCall, video);
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 获取可视对讲
        /// </summary>
        /// <param name="action">回调函数</param>
        /// <param name="frame">log父控件</param>
        /// <param name="tag">是否要显示log(默认显示tag=true)</param>
        public void GetVideo(Action<VideoClouds> action, FrameLayout frame, bool tag)
        {
            VideoClouds videoObj =null;
            ThreadSend(null, (responsePackNew) =>
             {
                 try
                 {
                     var str = responsePackNew.Data.ToString();
                     videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str);
                     action(videoObj);
                 }
                 catch {
                     action(videoObj);
                 }
             }, "获取可视对讲", "fram", frame, null, tag);
        }
        /// <summary>
        /// 获取历史通话记录
        /// </summary>
        /// <param name="id"></param>
        public List<CallView> GetCall(string id)
        {
            List<CallView> callViewList = new List<CallView>();
            try
            {
                List<Call> listCall = new List<Call>();
                var responsePackNew = VideoSend.GetCall(id);
                if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                {
                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(responsePackNew.Data.ToString());
                    string list = jobject["list"].ToString();
                    listCall = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Call>>(list);
                }
                List<string> strYear = new List<string>();
                //查询年份
                for (int i = 0; i < listCall.Count; i++)
                {
                    var call = listCall[i];
                    if (string.IsNullOrEmpty(call.callTime))
                    {
                        continue;
                    }
                    var dd = Convert.ToDateTime(call.callTime);
                    var year = dd.ToString("yyyy");
                    if (null == strYear.Find((c) => c == year))
                    {
                        strYear.Add(year);
                    }
                }
                //重新存储
                for (int j = 0; j < strYear.Count; j++)
                {
                    var year = strYear[j];
                    CallView callView = new CallView();
                    callView.year = year;
                    for (int i = 0; i < listCall.Count; i++)
                    {
                        var call = listCall[i];
                        if (string.IsNullOrEmpty(call.callTime))
                        {
                            continue;
                        }
                        var dd = Convert.ToDateTime(call.callTime);
                        var y = dd.ToString("yyyy");
                        if (y == year)
                        {
                            callView.callList.Add(call);
                        }
                    }
                    callViewList.Add(callView);
                }
            }
            catch { }
            return callViewList;
        }
        /// <summary>
        /// 发送命令线程
        /// </summary>
        /// <param name="videoObj">数据对象</param>
        /// <param name="action">回调函数</param>
        /// <param name="str">判断字符</param>
        /// <param name="view">判断log父控件</param>
        /// <param name="frame">log父控件</param>
        /// <param name="dialog">log父控件</param>
        /// <param name="tag">是否要显示log</param>
        public static void ThreadSend(VideoClouds videoObj, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, bool tag = true)
        {
            //加载log
            Loading loading = new Loading();
            if (view == "dialog")
            {
                dialog.AddChidren(loading);
            }
            else
            {
                frame.AddChidren(loading);
            }
            if (tag)
            {
                loading.Start();
            }
            ResponsePackNew responsePackNew = null;
            new System.Threading.Thread(() =>
            {
                try
                {
                    if (str == "获取可视对讲")
                    {
                        responsePackNew = VideoSend.GetVideo();
                    }
                    else if (str == "获取通话记录")
                    {
                        responsePackNew = VideoSend.GetCall(videoObj.id);
                    }
                }
                catch { }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (tag)
                        {
                            loading.Hide();
                        }
                        if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                        {
                            action(responsePackNew);
                        }
                        else
                        {
                            Method method = new Method();
                            //自定义错误提示文本
                            string eorroText = "";
                            if (str == "获取可视对讲")
                            {
                            }
                            method.ErrorShow(responsePackNew, eorroText);
                        }
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 随机密码6位
        /// </summary>
        /// <returns></returns>         public static string GetCode()         {             Random rand = new Random();             string code = "";             for (int ctr = 0; ctr < 6; ctr++)             {                 code += rand.Next(10).ToString();             }             return code;         }
        /// <summary>         /// 获取当前时间戳         /// </summary>         /// <returns></returns>         public static string GetCurrentTimeStamp()         {             //TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);             //return Convert.ToInt64(ts.TotalSeconds).ToString();             System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区
            return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 相差秒数
                     }
        /// <summary>         /// 获取当前时间戳         /// </summary>         /// <returns></returns>         public static string GetTomorrowTimeStamp()         {             //当前时间的后一天             //TimeSpan ts = DateTime.Now.AddDays(1) - new DateTime(1970, 1, 1, 0, 0, 0, 0);             //return Convert.ToInt64(ts.TotalSeconds).ToString();
            System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区
            return ((long)(DateTime.Now.AddDays(1) - startTime).TotalSeconds).ToString(); // 相差秒数
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
New file
@@ -0,0 +1,223 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using HDL_ON.DAL.Server;
using HDL_ON.UI.UI2.PersonalCenter.PirDevice;
using Newtonsoft.Json.Linq;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.Video
{
    public class VideoSend
    {
        /// <summary>
        /// 检查住宅是否绑定丰林,并获取门口机列表
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew GetVideo()
        {
            var jObject = new JObject { { "homeId", PirSend.HomeId } };
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_Check);
            return responsePackNew;
        }
        /// <summary>
        /// 获取通话记录
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew GetCall(string flBindId)
        {
            var jObject = new JObject { { "homeId", PirSend.HomeId }, { "flBindId", flBindId }, { "pageSize", int.MaxValue } };
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_GetCallList);
            return responsePackNew;
        }
        /// <summary>
        /// 获取门口机列表(1室内机,2室外机,3围墙机,4管理机,5二次确认机)
        /// </summary>
        public static List<FlVideo> GetVideoInfoList(VideoClouds video)
        {
            List<FlVideo> eSVideoInfosList = new List<FlVideo>();
            var jobject = new JObject();
            jobject.Add("cmtID", video.flCmtId);
            jobject.Add("unitno", video.flBuildingId);
            jobject.Add("method", "getUUIDList");
            try
            {
                var str = HttpWebRequest(NewAPI.API_POST_FL_List, jobject.ToString(), "POST");
                if (string.IsNullOrEmpty(str))
                {
                    return eSVideoInfosList;
                }
                var json = JObject.Parse(str);
                if (json == null)
                {
                    return eSVideoInfosList;
                }
                if (json["resCode"].ToString() != "0")
                {
                    return eSVideoInfosList;
                }
                eSVideoInfosList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<FlVideo>>(json["list"].ToString());
            }
            catch { }
            return eSVideoInfosList;
        }
        /// <summary>
        /// 上报动态开锁密码(注意:密码有可能延时1分钟生效)
        /// </summary>
        public static void GetQRcode(FrameLayout frame, VideoClouds video, Action<bool, string> action)
        {
            ///标记是否成功
            bool if_bool = false;
            //临时密码
            string pwd = VideoMethod.GetCode();
            var jobject = new JObject();             jobject.Add("communityID", video.flCmtId);//社区ID
            jobject.Add("fromTime", VideoMethod.GetCurrentTimeStamp());//开始时间
            jobject.Add("validTime", VideoMethod.GetTomorrowTimeStamp());//有效时间
            jobject.Add("unitno", video.flBuildingId);//单元号
            jobject.Add("roomno", video.flRoomId);//房间号
            jobject.Add("code", pwd);             jobject.Add("userKey", video.id);             jobject.Add("timestamp", VideoMethod.GetCurrentTimeStamp());             jobject.Add("secretKey", video.flSecretKey);             jobject.Add("method", "setdynamicpwd");             jobject.Add("numTimes", "5");
            //加载log
            Loading loading = new Loading();
            frame.AddChidren(loading);
            loading.Start();
            new System.Threading.Thread(() =>
            {
                try
                {
                    var str = HttpWebRequest(NewAPI.API_POST_FL_QRcode, jobject.ToString(), "POST");
                    if (!string.IsNullOrEmpty(str))
                    {
                        if (str.Contains("status"))
                        {
                            //var json = JObject.Parse(str);
                            //if (json != null)
                            //{
                            //    var stateCode = json["status"].ToString();
                            //    if (stateCode == "0")
                            //    {
                            //        if_bool = true;
                            //    }
                            //}
                            if_bool = true;
                        }
                        else {
                            var json = JObject.Parse(str);
                            if (json != null)
                            {
                                var stateCode = json["desc"].ToString();
                                Application.RunOnMainThread(() =>
                                {
                                    //错误提示
                                    new Intelligence.Automation.LogicView.TipPopView().FlashingBox(stateCode);
                                });
                            }
                        }
                    }
                }
                catch { }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        loading.Hide();
                        action(if_bool, pwd);
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 下载图片
        /// </summary>
        public static void GetIcon(FrameLayout frame,string url)
        {
            Loading loading = new Loading();
            frame.AddChidren(loading);
            loading.Start();
            new System.Threading.Thread(() =>
            {
                try
                {
                    var responsePackNew = RequestServerhomeId(null, url);
                }
                catch { }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        loading.Hide();
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        ///  请求服务器的方法(支持请求方式为POST/GET)
        /// </summary>
        /// <param name="getUrl">请求的地址</param>
        /// <param name="str">请求数据</param>
        /// <param name="method">请求方式为POST/GET</param>
        /// <param name="second">超时时间</param>
        /// <returns></returns>
        public static string HttpWebRequest(string getUrl, string str, string method, int second = 3)
        {
            try
            {
                HttpWebRequest request = WebRequest.Create(getUrl) as HttpWebRequest; //创建请求
                request.Method = method; //请求方式为POST/GET
                request.ContentType = "application/json";
                request.Timeout = second * 1000;//超时时间
                if (method == "POST")
                {
                    byte[] jsonbyte = System.Text.Encoding.UTF8.GetBytes(str);
                    request.ContentLength = jsonbyte.Length;
                    Stream postStream = request.GetRequestStream();
                    postStream.Write(jsonbyte, 0, jsonbyte.Length);
                    postStream.Close();
                }
                //发送请求并获取相应回应数据
                HttpWebResponse res;
                try
                {
                    res = (HttpWebResponse)request.GetResponse();
                }
                catch (WebException ex)
                {
                    res = (HttpWebResponse)ex.Response;
                }
                StreamReader sr = new StreamReader(res.GetResponseStream(), System.Text.Encoding.UTF8);
                string content = sr.ReadToEnd(); //获得响应字符串
                return content;
            }
            catch
            {
                return null;
            }
        }
        /// <summary>
        ///请求服务器(与住宅有关:例如;homeId)
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 20)
        {
            var requestJson = HttpUtil.GetSignRequestJson(o);
            return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);
        }
    }
    class FlResponsePackNew
    {//
        public string status = string.Empty;
        public string desc = string.Empty;
    }
}
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs
@@ -8,10 +8,10 @@
        /// <summary>
        /// 主控件View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        public RowLayout frameLayout = new RowLayout
        {
            Height = Application.GetRealHeight(50),
            // BackgroundColor = CSS.CSS_Color.view,
            LineColor = CSS.CSS_Color.view,
        };
        /// <summary>
        /// 文本描述
@@ -25,7 +25,7 @@
            TextSize = TextSize.text16,
            TextAlignment = TextAlignment.CenterLeft,
            IsBold = true,
            Text= "2020年",
            Text= "2020"+Language.StringByID(StringId.nian),
        };
        public Button btnClick = new Button
@@ -36,7 +36,7 @@
        /// View的方法
        /// </summary>
        /// <returns></returns>
        public FrameLayout FLayoutView()
        public RowLayout FLayoutView()
        {
            frameLayout.AddChidren(btnText);
            frameLayout.AddChidren(btnClick);
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs
@@ -8,10 +8,10 @@
        /// <summary>
        /// 主控件View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        public RowLayout frameLayout = new RowLayout
        {
            Height = Application.GetRealHeight(60),
            //BackgroundColor = CSS.CSS_Color.view,
            LineColor = CSS.CSS_Color.view,
        };
        /// <summary>
@@ -24,7 +24,8 @@
            Height = Application.GetRealHeight(20),
            TextColor = CSS.CSS_Color.textColor,
            TextSize = TextSize.text14,
            Text= "门口机呼叫",
            //Text= "门口机呼叫",
            TextID=StringId.menkoujihujiao,
            TextAlignment = TextAlignment.CenterLeft,
        };
        /// <summary>
@@ -36,15 +37,15 @@
            Y = Application.GetRealHeight(10),
            Width = Application.GetRealWidth(120),
            Height = Application.GetRealHeight(20),
            TextColor = CSS.CSS_Color.textColor,
            TextColor = CSS.CSS_Color.textCancelColor,
            TextSize = TextSize.text14,
            TextAlignment=TextAlignment.CenterLeft,
            Text = "15:01",
            //Text = "15:01",
        };
        /// <summary>
        /// 编辑文本
        /// 状态文本
        /// </summary>
        public Button btnEditText = new Button
        public Button btnStateText = new Button
        {
            Y = Application.GetRealHeight(32),
            Width = Application.GetRealWidth(260),
@@ -52,7 +53,6 @@
            TextSize = TextSize.text12,
            TextColor = CSS.CSS_Color.textCancelColor,
            TextAlignment = TextAlignment.CenterLeft,
            Text = "已接听, 已开锁",
        };
@@ -87,11 +87,11 @@
        /// View的方法
        /// </summary>
        /// <returns></returns>
        public FrameLayout FLayoutView()
        public RowLayout FLayoutView()
        {
            frameLayout.AddChidren(btnText);
            frameLayout.AddChidren(btnTime);
            frameLayout.AddChidren(btnEditText);
            frameLayout.AddChidren(btnStateText);
            frameLayout.AddChidren(btnNextIcon);
            btnLine.Y = frameLayout.Height - 1;
            frameLayout.AddChidren(btnLine);
HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs
@@ -87,5 +87,96 @@
        }
        /// <summary>
        /// 生成二维码
        /// </summary>
        /// <param name="str1">标题</param>
        public void QRcode(string str1)
        {
            Dialog dialog = new Dialog()
            {
                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
            };
            FrameLayout frameLayout = new FrameLayout { };
            dialog.AddChidren(frameLayout);
            FrameLayout whiteView = new FrameLayout()
            {
                X = Application.GetRealWidth(56),
                Y = Application.GetRealHeight(199),
                Width = Application.GetRealWidth(282),
                Height = Application.GetRealHeight(316),
                BackgroundColor = MusicColor.WhiteColor,
                Radius = (uint)Application.GetRealHeight(16),
            };
            frameLayout.AddChidren(whiteView);
            //临时密码
            Button btnTitle = new Button()
            {
                Y = Application.GetRealHeight(32),
                Height = Application.GetRealHeight(22),
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text16,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
                TextID=StringId.linshimima,
            };
            whiteView.AddChidren(btnTitle);
            //密码
            Button btnpaw = new Button()
            {
                X=Application.GetRealWidth(95),
                Y = Application.GetRealHeight(62),
                Height = Application.GetRealHeight(32),
                Width = Application.GetRealWidth(82+5),
                TextColor = MusicColor.SelectedColor,
                TextSize =20,//24
                TextAlignment = TextAlignment.Center,
                IsBold = true,
                Text = str1,
            };
            whiteView.AddChidren(btnpaw);
            Button iconBtn = new Button
            {
                X = Application.GetRealWidth(194),
                Y = Application.GetRealHeight(68),
                Width = Application.GetRealWidth(20),
                Height = Application.GetRealWidth(20),
                UnSelectedImagePath = "LoginIcon/ShowPasswordIcon.png",
                SelectedImagePath = "LoginIcon/HidePasswordIcon.png",
            };
            whiteView.AddChidren(iconBtn);
            //二维码
            int codeWidth = Application.GetRealWidth(142);
            ImageView codeImage = new ImageView()
            {
                X = Application.GetRealWidth(70),
                Y = Application.GetRealHeight(142),
                Height = codeWidth,
                Width = codeWidth,
                ImageBytes = Scan.BytesFromText(str1, codeWidth, codeWidth),
            };
            whiteView.AddChidren(codeImage);
            dialog.Show();
            iconBtn.MouseUpEventHandler += (sender, e) =>
            {
                iconBtn.IsSelected = !iconBtn.IsSelected;
                if (iconBtn.IsSelected)
                {
                    btnpaw.Text = "******";
                }
                else
                {
                    btnpaw.Text = str1;
                }
            };
            frameLayout.MouseUpEventHandler += (sender, e) =>
            {
                dialog.Close();
            };
        }
    }
}