From e6156ab41aea16796798eb32fd7ce664345a8220 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期日, 23 一月 2022 11:33:18 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wjc' into release0123
---
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SingleLogicView.cs | 14 ++++
HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs | 6 +-
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs | 7 ++
HDL_ON/DAL/Server/HttpUtil.cs | 4
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs | 81 ++++++++++++++++-----------
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs | 8 ++
HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs | 2
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 2
HDL_ON/DAL/DriverLayer/Control.cs | 9 +-
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs | 3
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs | 2
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 12 ++++
12 files changed, 101 insertions(+), 49 deletions(-)
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 051b41d..98bc02e 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -26,7 +26,7 @@
public class Control
{
-
+
static Control _control;
public static Control Ins
{
@@ -866,7 +866,7 @@
if (receiveObj.Topic == CommunicationTopic.SearchLoaclGatewayReply || receiveObj.Topic == CommunicationTopic.GatewayBroadcast)
{
-
+
var bodyJObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack>(res[1]);
if (bodyJObj == null)
{
@@ -980,7 +980,6 @@
var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid);
if (localFunction == null)
{
- MainPage.Log("鎵句笉鍒伴煶涔愭挱鏀惧櫒娣�=======" + revString);
continue;
}
MainPage.Log(localFunction.name);
@@ -1195,7 +1194,7 @@
case SPK.AvMusic:
case SPK.MusicStandard:
//UI.Music.MusicMain.mMusicMain.RefreshView(updateTemp);
- Console.WriteLine("闊充箰鎾斁鍣ㄦ樉绀虹姸鎬�======="+ revString);
+ //Console.WriteLine("闊充箰鎾斁鍣ㄦ樉绀虹姸鎬�======="+ revString);
//wjc
break;
}
@@ -1245,4 +1244,4 @@
#endregion
}
-}
\ No newline at end of file
+}
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 315e9a2..6c692b6 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
/// 鍥哄畾鍩熷悕,姝e紡鐜
/// 鍏叡鍩熷悕灏辫繎瑙f瀽
/// </summary>
- public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
- //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+ //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+ public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
/// <summary>
/// RegionMark
/// </summary>
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
index bbbea86..6f70600 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -26,9 +26,13 @@
/// </summary>
public string sid = "";
/// <summary>
+ /// 鏄惁鍏佽鍒犻櫎(false=鍙互鍒犻櫎)
+ /// </summary>
+ public bool tag = false;
+ /// <summary>
/// 閫昏緫鍚嶇О
/// </summary>
- public string name = "鑷姩鍖�";
+ public string name = "";
/// <summary>
/// 閫昏緫鏉′欢鍏崇郴锛堜笌and:锛屾垨:or锛�
/// </summary>
@@ -159,7 +163,7 @@
/// <summary>
/// 閫氱煡鍐呭
/// </summary>
- public string noticeContent = "鑷姩鍖栧凡缁忔墽琛�";//string.Empty;
+ public string noticeContent = Shared.Language.StringByID(StringId.Automation)+ Shared.Language.StringByID(StringId.yizhixing); //string.Empty;
}
/// <summary>
/// 鎺ㄩ�侀厤缃�
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SingleLogicView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SingleLogicView.cs
index 2a67225..3ee8fd6 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SingleLogicView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SingleLogicView.cs
@@ -81,6 +81,19 @@
};
/// <summary>
+ /// 鏄剧ず鏄惁鍒犻櫎鏍囧織
+ /// </summary>
+ public Button btnIsDelTag = new Button
+ {
+ Width = Application.GetRealWidth(10),
+ Height = Application.GetRealWidth(10),
+ Y = Application.GetRealHeight(12),
+ X = Application.GetRealWidth(295 + 36 - 10),
+ Radius = (uint)Application.GetRealHeight(5),
+ BackgroundColor = 0xFFFF0000,
+ Visible = false,
+ };
+ /// <summary>
/// 鐐瑰嚮浜嬩欢
/// </summary>
public Button btnclick= new Button
@@ -101,6 +114,7 @@
frameLayout.AddChidren(btnLienIcon);
frameLayout.AddChidren(btnclick);
frameLayout.AddChidren(btnSwitchIcon);
+ frameLayout.AddChidren(btnIsDelTag);
return frameLayout;
}
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
index f38003b..66fe538 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -81,6 +81,8 @@
})
{ IsBackground = true }.Start();
};
+
+
GetSelectIcon(logicView.frameLayout, currLogic);
if (i == 0)//闄嶅簭鎺掑垪
//if (Logic.LogicList.Count - 1 == i)
@@ -95,6 +97,15 @@
else
{
logicView.btnSwitchIcon.IsSelected = false;
+ }
+ ///鏄剧ず鐗规畩鑷姩鍖栨爣蹇�
+ if (currLogic.tag == true)
+ {
+ logicView.btnIsDelTag.Visible = true;
+ }
+ else
+ {
+ logicView.btnIsDelTag.Visible = false;
}
}
@@ -288,6 +299,7 @@
{
Logic newlogic = new Logic();
+ newlogic.tag = logic.tag;
newlogic.name = logic.name;
newlogic.userLogicId = logic.userLogicId;
newlogic.sid = logic.sid;
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
index e52e8e3..8cae2d3 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -163,6 +163,7 @@
var logicIfon = new JObject { };
logicIfon.Add("sid", logic.sid);
logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
+ logicIfon.Add("tag", logic.tag);
logicIfon.Add("name", logic.name);
logicIfon.Add("relation", logic.relation);
logicIfon.Add("enable", logic.enable);
@@ -287,6 +288,7 @@
logicIfon.Add("userLogicId", logic.userLogicId);
logicIfon.Add("sid", logic.sid);
logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
+ logicIfon.Add("tag", logic.tag);
logicIfon.Add("name", logic.name);
logicIfon.Add("relation", logic.relation);
logicIfon.Add("enable", logic.enable);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
index 7113132..06795e1 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
@@ -81,7 +81,11 @@
BackgroundColor = CSS.CSS_Color.view,
Gravity = Gravity.BottomCenter,//缃簳鐨勫睘鎬�
};
- this.AddChidren(frameLayout);
+ ///鍙互鏄剧ず鍒犻櫎鎺т欢
+ if (Logic.currlogic.tag == false)
+ {
+ this.AddChidren(frameLayout);
+ }
Button btnDel = new Button
{
TextSize = LogicView.TextSize.text16,
@@ -94,6 +98,7 @@
frameLayout.AddChidren(btnDel);
+
EventHandler<MouseEventArgs> delClick = (sender, e) =>
{
Loading loading = new Loading();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
index 90a7991..39f941d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -70,7 +70,8 @@
///鍔犺浇鎾斁闊充箰鐣岄潰鐨勬帶浠舵柟娉�
playView.viewFrameLayout(middLayout);
#endregion
- #region ---鎺т欢鐨勭偣鍑讳簨浠�---
+
+ #region ---鐣岄潰鐐瑰嚮浜嬩欢---
//鏀惰棌鍥炬爣浜嬩欢
playView.collectIconBtn.MouseUpEventHandler += (sender, e) =>
{
@@ -98,7 +99,6 @@
playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single.png";
msg += Language.StringByID(StringId.singleMode);
break;
-
case ValueProperty.single_cycle:
modeValueString =ValueProperty.random;
playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/random.png";
@@ -154,8 +154,34 @@
///涓嬫媺鍒锋柊
myListView.verticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
{
+ System.Threading.Tasks.Task.Run(() =>
+ {
+ try
+ {
+ A31MusicModel.Current.palyLists.Clear();
+ if (A31MusicModel.Current.palyLists.Count == 0)
+ {
+ SendMethod.mMethod.GetPalyList(A31MusicModel.Current.functionMusic);
+
+ }
+ }
+ catch
+ {
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ myListView.verticalScrolViewLayout.EndHeaderRefreshing();
+ myListView.verticalScrolViewLayout.RemoveAll();
+ var listName = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playlist_name);
+ var musicList = A31MusicModel.Current.GetSongList(listName);
+ A31SongPlay.SongListView(myListView.verticalScrolViewLayout, musicList, listName, myListView.popFra);
+ });
+ }
+ });
//缁撴潫鍒锋柊
- myListView.verticalScrolViewLayout.EndHeaderRefreshing();
+
};
///绉婚櫎鐣岄潰
EventHandler<MouseEventArgs> removeFromParentView = (sen, e1) =>
@@ -243,25 +269,23 @@
{
playView.nextBtn.IsSelected = false;
};
- ///鐗╃悊鎸夐敭鐨勭偣鍑讳簨浠�
- Volume.VolumeChange = (volume) =>
- {
- if (Application.DeviceType == Device.Ios && A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source) == "bluetooth")
- {
- return;
- }
- playView.volSeekBar.Progress = volume;
-
- if (startVolume != volume)
- {
- startVolume = volume;
- A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.volume, startVolume);
- Dictionary<string, string> dic = new Dictionary<string, string>();
- dic.Add(KeyProperty.volume, startVolume.ToString());
- SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
- }
-
- };
+ /////鐗╃悊鎸夐敭鐨勭偣鍑讳簨浠�
+ //Volume.VolumeChange = (volume) =>
+ //{
+ // if (Application.DeviceType == Device.Ios && A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source) == "bluetooth")
+ // {
+ // return;
+ // }
+ // playView.volSeekBar.Progress = volume;
+ // if (startVolume != volume)
+ // {
+ // startVolume = volume;
+ // A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.volume, startVolume);
+ // Dictionary<string, string> dic = new Dictionary<string, string>();
+ // dic.Add(KeyProperty.volume, startVolume.ToString());
+ // SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
+ // }
+ //};
#endregion
}
/// <summary>
@@ -283,7 +307,7 @@
{
//鏇存柊鎬绘椂闂�
//鎬诲叡鏈夊灏戠
- int totalSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_time))/1000;
+ int totalSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_time));
//鍒嗛挓
int totalMusicMinute = totalSecond / 60;
//绉掗挓
@@ -448,16 +472,7 @@
switch (A31MusicModel.Current.functionMusic.GetAttrState("source"))
{
-
- case "QPLAY"://QQ闊充箰
- playView.loveBtn.Alpha = 0.5f;
- playView.loveBtn.Enable = false;
- break;
- case "AIRPLAY"://閰风嫍闊充箰
- playView.loveBtn.Alpha = 0.5f;
- playView.loveBtn.Enable = false;
- playView.diyArcSeekBar.IsClickable = false;
- break;
+ //sdcard/audio_in/ftp/radio/bluetooth
case "SONGLIST-NETWORK"://鏈湴闊充箰
break;
case "SONGLIST-LOCAL"://USB
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
index 2d2a565..07c2fdc 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -102,9 +102,10 @@
verticalRefresh.BeginHeaderRefreshingAction += () =>
{
- verticalRefresh.EndHeaderRefreshing();
+
////鍙戦�佽鍙栭煶涔愭挱鏀惧櫒鐘舵�佺嚎绋�
SeachMusic();
+ verticalRefresh.EndHeaderRefreshing();
};
this.AddChidren(loading);
SeachMusic();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
index 70026c6..fda2963 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -57,7 +57,7 @@
{
try
{
- // RefreshDeviceStatus(functionIds);
+ //RefreshDeviceStatus(functionIds);
a31Music.LastDateTime = DateTime.Now;
///浠庣紦瀛橀噷闈㈡煡鎵鹃煶涔愭挱鏀惧櫒瀵硅薄<缂撳瓨鏁版嵁鏀跺埌鎺ㄩ�佽繃鏉ョ殑鐘舵�佷細鏇存柊缂撳瓨鏁版嵁>
var allLocalFuntion = FunctionList.List.GetDeviceFunctionList();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs
index 86bf14f..f6ec20b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs
@@ -95,17 +95,17 @@
switch (mode)
{
//0鍒楄〃寰幆锛�1鍗曟洸寰幆锛�2闅忔満鎾斁;
- case "list_cycle":
+ case ValueProperty.list_cycle:
orderIconBtn.UnSelectedImagePath = "MusicIcon/list.png";
orderTxetBtn.Text = Language.StringByID(StringId.listMode);
break;
- case "single_cycle/order":
+ case ValueProperty.single_cycle:
orderIconBtn.UnSelectedImagePath = "MusicIcon/single.png";
orderTxetBtn.Text = Language.StringByID(StringId.singleMode);
break;
- case "random":
+ case ValueProperty.random:
orderIconBtn.UnSelectedImagePath = "MusicIcon/random.png";
orderTxetBtn.Text = Language.StringByID(StringId.randomMode);
break;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs
index 9c9b11a..5335d37 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs
@@ -285,7 +285,7 @@
musicBjFl.AddChidren(songNameTextView);
musicBjFl.AddChidren(singerBtn);
musicBjFl.AddChidren(playOrderBtn);
- musicBjFl.AddChidren(loveBtn);
+ //musicBjFl.AddChidren(loveBtn);
musicBjFl.AddChidren(playlistBtn);
musicBjFl.AddChidren(volIconBtn);
musicBjFl.AddChidren(volSeekBar);
--
Gitblit v1.8.0