lss
2020-06-03 6c70a72d6f3d11baa65be466d4023b2f2ca79e39
2020.06.03.1

111
1个文件已添加
5个文件已修改
180 ■■■■■ 已修改文件
.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundListForm.cs 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/SmartSound/SmartSoundInfo.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.DS_Store
Binary files differ
ZigbeeApp/.vs/GateWay/xs/.DS_Store
Binary files differ
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,16 +1,13 @@
<Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default">
  <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.2400788643044815020f" />
  <MonoDevelop.Ide.ItemProperties.GateWay.Ios PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.0F3EFA59-22A1-4A3A-A991-0B8D4D01A5D5" />
  <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" />
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDeviceChange.cs">
    <Files>
      <File FileName="Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDeviceChange.cs" Line="200" Column="18" />
    </Files>
  <MonoDevelop.Ide.Workbench>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="GateWay" expanded="True">
            <Node name="GateWay.Droid" expanded="True" />
            <Node name="GateWay.Droid" expanded="True" selected="True" />
            <Node name="Shared" expanded="True">
              <Node name="Phone" expanded="True">
                <Node name="CommonForm" expanded="True" />
@@ -35,9 +32,7 @@
                  </Node>
                  <Node name="OtherParty" expanded="True" />
                  <Node name="SmartSound" expanded="True">
                    <Node name="Forms" expanded="True">
                      <Node name="SmartSoundContentForDeviceChange.cs" selected="True" />
                    </Node>
                    <Node name="Forms" expanded="True" />
                    <Node name="Widget" expanded="True" />
                  </Node>
                  <Node name="UserMain" expanded="True" />
@@ -53,10 +48,7 @@
  <MonoDevelop.Ide.DebuggingService.PinnedWatches />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore>
      <Breakpoint file="/Users/hdl/Desktop/HDL/HomeApp/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDeviceChange.cs" relfile="Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDeviceChange.cs" line="256" column="1" />
      <Breakpoint file="/Users/hdl/Desktop/HDL/HomeApp/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDeviceChange.cs" relfile="Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDeviceChange.cs" line="323" column="1" />
    </BreakpointStore>
    <BreakpointStore />
  </MonoDevelop.Ide.DebuggingService.Breakpoints>
  <MultiItemStartupConfigurations />
</Properties>
ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
@@ -2,7 +2,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundListForm.cs
@@ -1,8 +1,13 @@
using System;
using System.Collections.Generic;
<<<<<<< HEAD
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
=======
using System.Diagnostics;
using System.Threading.Tasks;
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
using Shared.Common;
using Shared.Phone.UserCenter.Device;
using Shared.Phone.UserCenter.SmartSound.Util;
@@ -17,6 +22,10 @@
        {
        }
<<<<<<< HEAD
=======
        //private List<SmartSoundInfo> smartSoundList = null;
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
        private SmartSoundInfo smartSoundInfo = null;
        /// <summary>
@@ -40,9 +49,22 @@
        {
            // iniData();//先加载模拟数据
<<<<<<< HEAD
            this.ScrollEnabled = false;
            //设置标题信息
=======
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        public void ShowForm()
        {
            // iniData();//先加载模拟数据
            this.ScrollEnabled = false;
            //设置标题信息
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
            base.SetTitleText("智能音箱");
            Dictionary<string, string> floorDictionary = Config.Instance.Home.FloorDics;//楼层列表
@@ -60,6 +82,7 @@
            this.InitMiddleFrame();
            helpBtn.MouseUpEventHandler += (sernder, e) =>
<<<<<<< HEAD
            {
                //这里是加载帮组的界面
            };                       
@@ -70,10 +93,25 @@
        /// </summary>
        /// <param name="i_reGetDeviceOnlineStatu">重新获取设备的在线状态</param>
        public async void InitMiddleFrame()
=======
            {
                //这里是加载帮组的界面
            };
        }
        /// <summary>
        /// 初始化中部控件(外部可以调用)
        /// </summary>
        /// <param name="i_reGetDeviceOnlineStatu">重新获取设备的在线状态</param>
        public async void InitMiddleFrame()
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
        {
            // show出没有设备的图标文字提示
            this.ShowNotDataImage(bodyFrameLayout, new string[] { "还没有音箱哦,", "绑定智能音箱请前往第三方 APP 进行操作" });
            var frame = new FrameLayout();
            this.bodyFrameLayout.AddChidren(frame);
            frame.BackgroundColor = UserCenterColor.Current.White;
@@ -81,6 +119,7 @@
            frame.Height = this.bodyFrameLayout.Height;
            // 初始化 lisetView
<<<<<<< HEAD
            listView = new VerticalListRefreshControl(29);
            listView.Y = 0;
            listView.Height = bodyFrameLayout.Height;
@@ -91,6 +130,18 @@
                {
                    await getData();
                    //下拉刷新
=======
            listView = new VerticalListRefreshControl(29);
            listView.Y = 0;
            listView.Height = bodyFrameLayout.Height;
            frame.AddChidren(listView);
            listView.BeginHeaderRefreshingAction += () =>
            {
                HdlThreadLogic.Current.RunThread(async () =>
                {
                    await getData();
                    //下拉刷新
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
                    iniView();
                    HdlThreadLogic.Current.RunMain(() =>
@@ -106,6 +157,7 @@
            await getData();
<<<<<<< HEAD
            this.CloseProgressBar(ShowReLoadMode.NO);
            iniView();
@@ -115,12 +167,19 @@
        /// 获取音箱列表
        /// </summary>
        /// <returns></returns>
=======
            this.CloseProgressBar( ShowReLoadMode.YES);
            iniView();
        }
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
        private async Task getData()
        {
            SmartSoundInfo.Auth auth = new SmartSoundInfo.Auth();
            auth.HomeID = Common.Config.Instance.Home.Id;
            auth.UserID = Common.Config.Instance.Guid;
            auth.Platform = "";
<<<<<<< HEAD
            string url = string.Format("https://developer.hdlcontrol.com/zigbeespeakerservice/Auth?Platform&PageSetting.PageSize=100&PageSetting.PageIndex=1&UserID={0}&HomeID={1}",
                Common.Config.Instance.Guid,Common.Config.Instance.Home.Id);
            byte[] byteData = Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(auth));
@@ -176,6 +235,29 @@
                listView.AddChidren(row);
                if (smartSound.Platform == "Baidu")
=======
            dataString = await UserCenterLogic.GetResponseDataByRequestHttps("zigbeespeakerservice/Auth", true, auth);
            smartSoundInfo = (SmartSoundInfo)Newtonsoft.Json.JsonConvert.DeserializeObject(dataString);
        }
        private void iniView()
        {
            //
            listView.RemoveAll();
            if (smartSoundInfo==null)
                return;
            for (int i = 0; i < smartSoundInfo.ResponseData.Data.Count; i++)
            {
                //
                var smartSound = smartSoundInfo.ResponseData.Data[i];
                var row = new SoundRowLayout();
                listView.AddChidren(row);
                if (smartSound.Platform == "Xiaodu")
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
                {
                    row.Account = "小度:" + smartSound.UserName;
                    row.ImagePath = "SmartSound/Xiaodu.png";
@@ -190,7 +272,11 @@
                row.btnRename.ButtonClickEvent += (sender, e) =>
                {
                    //
<<<<<<< HEAD
                    int index = (int)(((NormalViewControl)sender).GetTagByKey("index"));
=======
                    int index = (int)(((NormalViewControl)sender).GetTagByKey("index"));
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
                    var smartSound = smartSoundInfo.ResponseData.Data[index];
                    ShowRenameDialog(row, smartSound);
@@ -240,6 +326,7 @@
            //请输入备份名称
            dialogForm.SetTipText(smartSound.Remark);
<<<<<<< HEAD
            //按下确认按钮
            dialogForm.ComfirmClickEvent += (async (textValue) =>
            {
@@ -261,6 +348,33 @@
                }
            });
        }
=======
        /// <summary>
        /// 重命名弹窗
        /// </summary>
        /// <returns></returns>
        private void ShowRenameDialog(SoundRowLayout soundRowLayout, SmartSoundInfo.SoundInfo smartSound)
        {
            //生成一个弹窗画面
            var dialogForm = new DialogInputControl();
            //添加备份
            dialogForm.SetTitleText("重命名");
            //请输入备份名称
            dialogForm.SetTipText(smartSound.Remark);
            //按下确认按钮
            dialogForm.ComfirmClickEvent += ((textValue) =>
            {
                //画面关闭
                dialogForm.CloseDialog();
                //上传备份
                smartSound.Remark = textValue;
                soundRowLayout.btnRemark.Text= textValue;
            });
        }
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
        #endregion
ZigbeeApp/Shared/Phone/UserCenter/SmartSound/SmartSoundInfo.cs
@@ -13,6 +13,7 @@
        {
        }
<<<<<<< HEAD
        public string StateCode { get; set; }
        public string ErrorInfo { get; set; }
        public Info ResponseData { get; set; }
@@ -24,10 +25,24 @@
            public int RowCount { get; set; }
            public int PageTotal { get; set; }
            public List<SoundInfo> Data { get; set; }
=======
        public string StateCode = "";
        public string ErrorInfo = "";
        public Info ResponseData = new Info();
        public class Info
        {
            public int PageSize = 0;
            public int PageIndex = 0;
            public int RowCount = 0;
            public int PageTotal = 0;
            public List<SoundInfo> Data = new List<SoundInfo>();
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
        }
        public class SoundInfo
        {
<<<<<<< HEAD
            public string UserID { get; set; }
            public string AuthCode { get; set; }
            public string Token { get; set; }
@@ -49,13 +64,43 @@
            /// 智能音箱的用户名(小度:123456@qq.com)
            /// </summary>
            public string UserName { get; set; } = "123456@qq.com";
=======
            public string UserID = "";
            public string AuthCode = "";
            public string Token = "";
            public string RefreshToken = "";
            /// <summary>
            /// Baidu
            /// </summary>
            public string Platform = "Baidu";
            public string HomeID = "";
            public string OpenUID = "";
            /// <summary>
            /// 智能音箱备注
            /// </summary>
            public string Remark = "";
            public string Id = "";
            public bool IsDeleted = false;
            public string CreatedOnUtc = "";
            /// <summary>
            /// 智能音箱的用户名(小度:123456@qq.com)
            /// </summary>
            public string UserName;
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
        }
        public class Auth
        {
<<<<<<< HEAD
            public string Platform { get; set; }
            public string UserID { get; set; }
            public string HomeID { get; set; }
=======
            public string Platform = "";
            public string UserID = "";
            public string HomeID = "";
>>>>>>> b5b3f2bf5b04de190acea40790537b9e96649188
            public PageSetting PageSetting { get; set; }
            public Auth()