From df237b08cf97c27a2526b8f523f852f298a8b9b1 Mon Sep 17 00:00:00 2001
From: lss <316519258@qq.com>
Date: 星期一, 01 六月 2020 09:30:47 +0800
Subject: [PATCH] 0000
---
ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundListForm.cs | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 115 insertions(+), 1 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundListForm.cs
index 72703b8..6c897e3 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundListForm.cs
@@ -1,8 +1,13 @@
锘縰sing 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
--
Gitblit v1.8.0