From 8cefc1f93fc2db49465a5dd11ce94ed11267ea53 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 22 八月 2023 17:48:39 +0800
Subject: [PATCH] 2023年08月22日17:48:30
---
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs | 16 +
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs | 4
HDL-ON_Android/Assets/Language.ini | 53 +++++
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 9
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 85 +++++++-
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs | 199 +++++++++++++++----
HDL_ON/Common/R.cs | 37 +++
HDL_ON/UI/MainPage.cs | 1
HDL_ON/HDL_ON.projitems | 1
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 135 +++++++++++-
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs | 58 +++++
11 files changed, 523 insertions(+), 75 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index cbe0410..e68e18a 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1249,6 +1249,17 @@
8720=Channel
8721=Control
+8801=Home page
+8802=Power off
+8803=Volume
+8804=Setting
+8805=Unmute
+8806=Signal source
+8807=Power off
+8808=Power on
+8809=Stripping equipment
+
+
@@ -2622,9 +2633,15 @@
8720=棰戦亾
8721=鎺у埗
-
-
-
+8801=棣栭〉
+8802=鍏虫満
+8803=闊抽噺
+8804=璁剧疆
+8805=瑙i櫎闈欓煶
+8806=淇″彿婧�
+8807=宸插叧鏈�
+8808=寮�鏈�
+8809=瑙g粦璁惧
@@ -3985,6 +4002,16 @@
8720=Channel
8721=Control
+8801=Home page
+8802=Power off
+8803=Volume
+8804=Setting
+8805=Unmute
+8806=Signal source
+8807=Power off
+8808=Power on
+8809=Stripping equipment
+
@@ -5340,6 +5367,16 @@
8719=Conform action
8720=Channel
8721=Control
+
+8801=Home page
+8802=Power off
+8803=Volume
+8804=Setting
+8805=Unmute
+8806=Signal source
+8807=Power off
+8808=Power on
+8809=Stripping equipment
9000=Inicio sesi贸n con un nuevo n煤mero de tel茅fono celular
9001=Inicie sesi贸n con una nueva direcci贸n de correo el茅ctr贸nico
@@ -6701,6 +6738,16 @@
8720=Channel
8721=Control
+8801=Home page
+8802=Power off
+8803=Volume
+8804=Setting
+8805=Unmute
+8806=Signal source
+8807=Power off
+8808=Power on
+8809=Stripping equipment
+
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 8432f28..6ed4d50 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -3632,6 +3632,43 @@
+ /// <summary>
+ /// 棣栭〉
+ /// </summary>
+ public const int shouye = 8801;
+ /// <summary>
+ /// 鍏虫満
+ /// </summary>
+ public const int guanji = 8802;
+ /// <summary>
+ /// 闊抽噺
+ /// </summary>
+ public const int yinliang = 8803;
+ /// <summary>
+ /// 璁剧疆
+ /// </summary>
+ public const int shezhi = 8804;
+ /// <summary>
+ /// 瑙i櫎闈欓煶
+ /// </summary>
+ public const int jiechujingyin = 8805;
+ /// <summary>
+ /// 淇″彿婧�
+ /// </summary>
+ public const int xinhaoyuan = 8806;
+ /// <summary>
+ /// 宸插叧鏈�
+ /// </summary>
+ public const int yiguanji = 8807;
+ /// <summary>
+ /// 寮�鏈�
+ /// </summary>
+ public const int kaiji = 8808;
+ /// <summary>
+ /// 瑙g粦璁惧
+ /// </summary>
+ public const int jiebangshebei = 8809;
+
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 46e0d2e..f5f13f5 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -593,6 +593,7 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\MovieLibraryInfoEntity.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \HisenseTvPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \Send.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \HisenseTVFunctionalAttributeConstant.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 6f43aa2..df9b511 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -622,6 +622,7 @@
if (msg.Contains("鏀跺埌鏁版嵁")
|| msg.Contains("鍙戦��")
|| msg.Contains("鎺ユ敹鍒版帹閫�")
+ || msg.Contains("api")
)
Console.WriteLine(msg);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 1d787cb..e8e8b0f 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -1015,7 +1015,7 @@
//鍖哄埆涓嶅悓璁惧锛屾樉绀轰笉鍚岃澶囩姸鎬�
switch (device.spk)
{
-
+
case SPK.CommonSeries:
targetView.btnIcon.UnSelectedImagePath = "FunctionIcon/Icon/groupControl.png";
stateStr = GetKeyValue("on_off", dicList) == "on" ? Language.StringByID(StringId.onLogic) : Language.StringByID(StringId.offLogic);
@@ -1057,14 +1057,14 @@
}
}
break;
-
-
+
+
case SPK.LightRGB:
case SPK.LightRGBW:
case SPK.LightCCT:
case SPK.LightDimming:
{
-
+
string on_off = GetKeyValue("on_off", dicList);
string brightness = GetKeyValue("brightness", dicList);
if (on_off == "on" && brightness != "")
@@ -1088,7 +1088,7 @@
//鑹叉俯杩欎釜灞炴�ф墠鏈夋晥
if (stateStr != Language.StringByID(StringId.offLogic) && GetKeyValue("cct", dicList) != "")
{
- stateStr += "," +GetKeyValue("cct", dicList) + "k";
+ stateStr += "," + GetKeyValue("cct", dicList) + "k";
}
}
if (device.spk == SPK.LightRGB)
@@ -1264,7 +1264,7 @@
if (set_temp != "")
{
- string unit =GetTemperatureUnit(device);
+ string unit = GetTemperatureUnit(device);
stateStr += set_temp + unit + ",";
}
@@ -1475,14 +1475,41 @@
{
string song_name = GetKeyValue("song_name", dicList);
string volume = GetKeyValue("volume", dicList);
- stateStr = song_name + ";" +Language.StringByID(StringId.volumeMusic)+volume;
+ stateStr = song_name + ";" + Language.StringByID(StringId.volumeMusic) + volume;
if (stateStr.StartsWith(";"))
{
stateStr = stateStr.Substring(1, stateStr.Length - 1);
- }else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic)))
+ } else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic)))
{
stateStr = stateStr.Substring(0, stateStr.Length - 3);
}
+ }
+ break;
+ case SPK.ElectricalTvHisense:
+ {
+ string on_off = GetKeyValue("on_off", dicList);
+ string signal = GetKeyValue("signal", dicList);
+ if (!string.IsNullOrEmpty(on_off))
+ {
+ if (on_off == "1")
+ {
+ stateStr = Language.StringByID(StringId.onLogic);
+ }
+ else
+ {
+ stateStr = Language.StringByID(StringId.offLogic);
+ }
+
+ }
+ if (!string.IsNullOrEmpty(stateStr))
+ {
+ stateStr += ",";
+ }
+ if (!string.IsNullOrEmpty(signal))
+ {
+ stateStr += signal.Replace("_", " ");
+ }
+ stateStr = stateStr.TrimEnd(',');
}
break;
}
@@ -2415,8 +2442,6 @@
button1.Tag = tag;
}
break;
-
-
case SPK.MusicStandard:
case SPK.AvMusic:
{
@@ -2456,6 +2481,46 @@
button2.Tag = tag;
}
break;
+ case SPK.ElectricalTvHisense:
+ {
+ foreach (var dic in dicList)
+ {
+ string value = dic["value"];
+ switch (dic["key"])
+ {
+ case "on_off":
+ {
+ switch (value)
+ {
+ case "1":
+ {
+ button1.Text = Language.StringByID(StringId.onLogic);
+ }
+ break;
+ case "0":
+ {
+ button1.Text = Language.StringByID(StringId.offLogic);
+ }
+ break;
+ }
+ }
+ break;
+ case "signal":
+ {
+ if (button2 == null)
+ {
+ //鎬曡皟璇曡蒋浠朵贡涓婁笢瑗垮鑷存姏寮傚父
+ break;
+ }
+ button2.Text = value.Replace("_", " ");
+ }
+ break;
+ }
+
+ }
+ }
+ break;
+
}
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index 58bd067..5f147c0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -131,7 +131,7 @@
/// <param name="dic">Dictionary绫�</param>
/// <param name="key">鍋�</param>
/// <param name="value">鍊�</param>
- public void dictionary(Dictionary<string, string> dic, string key, string value)
+ public void dictionary(Dictionary<string, string> dic, string key, string value)
{
if (dic.ContainsKey(key)) //鍒ゆ柇鏄惁瀛樺湪閿��
{
@@ -189,7 +189,7 @@
list.AddRange(list2);
list.AddRange(FunctionList.List.groupControls);
#if DEBUG
- //GetTestDevice(ref list, true);
+ GetTestDevice(ref list, true);
#endif
return list;
}
@@ -586,6 +586,7 @@
device.spk == SPK.AirSwitch
|| device.spk == SPK.PanelSocket
|| device.spk == SPK.ElectricSocket
+ || device.spk == SPK.ElectricalTvHisense
);
if (electric != null)
{
@@ -715,6 +716,7 @@
functionTypeList.Add(SPK.AirSwitch);
functionTypeList.Add(SPK.PanelSocket);
functionTypeList.Add(SPK.ElectricSocket);
+ functionTypeList.Add(SPK.ElectricalTvHisense);
}
///闂ㄩ攣绫�
else if (deviceType == Language.StringByID(StringId.DoorLock))
@@ -807,6 +809,7 @@
functionTypeList.Add(SPK.VideoDoorLock);
functionTypeList.Add(SPK.AcIr);
functionTypeList.Add(SPK.SensorPirHold);
+ functionTypeList.Add(SPK.ElectricalTvHisense);
}
@@ -896,6 +899,7 @@
deviceTypeList.Add(SPK.AvMusic);
deviceTypeList.Add(SPK.MechanicalArm);
deviceTypeList.Add(SPK.AcIr);
+ deviceTypeList.Add(SPK.ElectricalTvHisense);
}
break;
}
@@ -1226,6 +1230,7 @@
new Entity.Function { sid = "12345678991234566844", name = "澶у崕鎽勫儚澶�", spk = Entity.SPK.IpCam_Imou },
new Entity.Function { sid = "12345678991234567", name = "RGB", spk = Entity.SPK.LightRGB },
new Entity.Function { sid = "123456789912345678", name = "RGBW", spk = Entity.SPK.LightRGBW },
+ new Function { spk = SPK.ElectricalTvHisense, name = "娴蜂俊鐢佃1",sid="123456789"},
};
foreach (var function in functions)
{
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 5508c06..9c88669 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -804,6 +804,90 @@
#endregion
}
break;
+ //娴蜂俊鐢佃
+ case SPK.ElectricalTvHisense:
+ {
+ #region 鐣岄潰
+ ///寮�鍏�
+ LogicView.FunTypeView switchView = new LogicView.FunTypeView();
+ switchView.btnText.TextID = StringId.switchLogic;
+ fLayout.AddChidren(switchView.FLayoutView());
+ /////闊抽噺
+ //LogicView.FunTypeView volView = new LogicView.FunTypeView();
+ //volView.frameLayout.Y = switchView.frameLayout.Bottom;
+ //volView.btnText.TextID = StringId.yinliang;
+ //fLayout.AddChidren(volView.FLayoutView());
+
+ ///淇″彿婧�
+ LogicView.FunTypeView sourceView = new LogicView.FunTypeView();
+ sourceView.frameLayout.Y = switchView.frameLayout.Bottom;
+ sourceView.btnText.TextID = StringId.xinhaoyuan;
+ fLayout.AddChidren(sourceView.FLayoutView());
+
+ ///璁惧寤舵椂iewv
+ DelayView(fLayout, sourceView.frameLayout.Bottom);
+ #endregion
+ #region 鐐瑰嚮浜嬩欢
+ ///寮�鍏崇偣鍑讳簨浠�
+ switchView.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ SwitchViewMethod(device, switchView.btnState, 2);
+ };
+ /////闊抽噺鐐瑰嚮浜嬩欢
+ //volView.btnClick.MouseUpEventHandler += (sender, e) =>
+ //{
+ // selectedState = device.spk + "_volume";
+ // //new LogicView.TipPopView { }.InputBox(StringId.volumeMusic, volView.btnState.Text, (value) =>
+ // //{
+
+ // // //鐣岄潰鏄剧ず閫変腑鍊�
+ // // volView.btnState.Text = value;
+ // // //鏁版嵁灏佽
+ // // AddDictionary("volume", value);//闊抽噺
+ // //}, 0, 100);
+
+ // BrightnessMethod(device, volView.btnState, volView.btnText.Text);
+
+ //};
+
+ ///淇″彿婧愮偣鍑讳簨浠�
+ sourceView.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ ///涔嬪墠鐨勭姸鎬佹枃鏈�
+ string currText = sourceView.btnState.Text;
+ //璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�;
+ string key = "signal";
+ selectedState = device.spk + "_" + key;
+ PublicInterface pif = new PublicInterface();
+ var sourceList = new List<string>();
+ sourceList.Add("HDML 1");
+ sourceList.Add("HDML 2");
+ sourceList.Add("HDML 3");
+ sourceList.Add("HDML 4");
+ sourceList.Add("Live TV");
+ sourceList.Add("PS");
+ sourceList.Add("AV");
+ pif.SingleSelectionShow(this, sourceList, Language.StringByID(StringId.xinhaoyuan), currText
+ , (valueStr) =>
+ {
+ //鐣岄潰鏄剧ず閫変腑鍊�
+ sourceView.btnState.Text = valueStr;
+ string value = valueStr.Replace(" ", "_");
+ //鏁版嵁灏佽
+ AddDictionary(key, value);
+
+ });
+ };
+
+ if (edit)
+ {
+ //鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬�
+ GetEditDeviceState(device, index, switchView.btnState, sourceView.btnState, null, null);
+ }
+
+ #endregion
+ }
+ break;
}
#endregion
@@ -977,10 +1061,10 @@
FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
this.AddChidren(frame);
LogicView.SwitchView switchView = new LogicView.SwitchView();
- switchView.FLayoutView(frame, len, button.Text, (strValue) =>
+ switchView.FLayoutView(frame, len, button.Text, (value) =>
{
int id = 0;
- switch (strValue)
+ switch (value)
{
case "on":
{
@@ -1000,16 +1084,16 @@
}
//鐣岄潰鏄剧ず閫変腑鍊�
button.TextID = id;
- selectedState = device.spk + "_" + strValue;
+ selectedState = device.spk + "_" + value;
//璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�;
- string keyVlaue = "on_off";
+ string key = "on_off";
switch (device.spk)
{
case SPK.PanelSocket:
{
if (button.Name == "鎬绘帶寮�鍏�")
{
- keyVlaue = "on_off_master";
+ key = "on_off_master";
}
}
break;
@@ -1017,14 +1101,29 @@
{
if (button.Name == "colorful")
{
- keyVlaue = "colorful";
+ key = "colorful";
}
}
break;
+
+ case SPK.ElectricalTvHisense:
+ {
+ if (id == StringId.onLogic)
+ {
+ value = "1";
+ }
+ else
+ {
+ value = "0";
+ }
+ }
+ break;
+
}
+
//鏁版嵁灏佽
- AddDictionary(keyVlaue, strValue);
+ AddDictionary(key, value);
});
#endregion
}
@@ -1150,8 +1249,6 @@
}
-
-
/// <summary>
/// 鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬�
/// </summary>
@@ -1184,29 +1281,29 @@
/// <summary>
/// 娣诲姞閫変腑鏁版嵁
/// </summary>
- /// <param name="KeyValue">璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�</param>
- /// <param name="selectedValue">鐘舵�佸��</param>
- private void AddDictionary(string KeyValue, string selectedValue)
+ /// <param name="key">璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�</param>
+ /// <param name="value">鐘舵�佸��</param>
+ private void AddDictionary(string key, string value)
{
//鏁版嵁灏佽
Dictionary<string, string> dic = new Dictionary<string, string>();
- LogicMethod.Current.dictionary(dic, "key", KeyValue);
- LogicMethod.Current.dictionary(dic, "value", selectedValue);
- AddDictionaryList(KeyValue, dic);
+ LogicMethod.Current.dictionary(dic, "key", key);
+ LogicMethod.Current.dictionary(dic, "value", value);
+ AddDictionaryList(key, dic);
}
/// <summary>
/// 鏇存柊鏁版嵁鍒楄〃
/// </summary>
- /// <param name="keyValue">璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�</param>
+ /// <param name="key">璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�</param>
/// <param name="dictionary">娣诲姞閫変腑鏁版嵁</param>
/// <returns></returns>
- private void AddDictionaryList(string keyValue, Dictionary<string, string> dictionary)
+ private void AddDictionaryList(string key, Dictionary<string, string> dictionary)
{
int indexValue = -1;
for (int i = 0; i < dicSateteList.Count; i++)
{
var dic = dicSateteList[i];
- if (dic.ContainsValue(keyValue))
+ if (dic.ContainsValue(key))
{
//鍒ゆ柇鏄惁瀛樺湪
indexValue = i;
@@ -1227,7 +1324,7 @@
dicSateteList.Add(dictionary);
}
- }
+ }
/// <summary>
/// 娣诲姞鐩爣
/// </summary>
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs
index b736d08..273b751 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs
@@ -24,7 +24,9 @@
public void LoadView()
{
- string url = brand_Iot.authorizationUrl + $"?companyId={brand_Iot.companyId}&openUId={UserInfo.Current.ID}&client_id={brand_Iot.clientId}";
+ //楂樿儨璇翠笉闇�瑕佹嫾鎺rl 2023骞�08鏈�22鏃�10:19:50
+ //string url = brand_Iot.authorizationUrl + $"?companyId={brand_Iot.companyId}&openUId={UserInfo.Current.ID}&client_id={brand_Iot.clientId}";
+ string url = brand_Iot.authorizationUrl;
var dd = new WebViewDialog(()=> {
UnsubscribeAsync3tyIotbind();
});
diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs
new file mode 100644
index 0000000..ae31775
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs
@@ -0,0 +1,58 @@
+锘縰sing System;
+namespace HDL_ON.UI.UI2.FuntionControlView.HisenseTV
+{
+ /// <summary>
+ /// 娴蜂俊鐢佃鍔熻兘灞炴�у父閲�
+ /// </summary>
+ public class HisenseTVFunctionalAttributeConstant
+ {
+ /// <summary>
+ /// 寮�鍏�(value:0-鍏�/1-寮�)
+ /// </summary>
+ public const string on_off = "on_off";
+ /// <summary>
+ /// 闊抽噺澧炲姞(Value榛樿鈥濃��)
+ /// </summary>
+ public const string volume_add = "volume+";
+ /// <summary>
+ /// 闊抽噺鍑忓皯(Value榛樿鈥濃��)
+ /// </summary>
+ public const string volume_subtract = "volume-";
+ /// <summary>
+ /// 闈欓煶(value:0-鍙栨秷闈欓煶,1-闈欓煶)
+ /// </summary>
+ public const string mute = "mute";
+ /// <summary>
+ /// 鎿嶄綔鑿滃崟(value:0-涓�;1-涓�;2-宸�;3-鍙�;4-纭畾;5-杩斿洖;11-鑿滃崟椤�;)
+ /// </summary>
+ public const string operation = "operation";
+ /// <summary>
+ /// 鎾斁(Value榛樿鈥濃��)
+ /// </summary>
+ public const string media_play = "media_play";
+ /// <summary>
+ /// 鏆傚仠(Value榛樿鈥濃��)
+ /// </summary>
+ public const string media_pause = "media_pause";
+ /// <summary>
+ /// 蹇繘(Value榛樿鈥濃��)
+ /// </summary>
+ public const string fast_forward = "fast_forward";
+ /// <summary>
+ /// 蹇��(Value榛樿鈥濃��)
+ /// </summary>
+ public const string fast_back = "fast_back";
+ /// <summary>
+ /// 棣栭〉(Value榛樿鈥濃��)
+ /// </summary>
+ public const string home_page = "home_page";
+ /// <summary>
+ /// 淇″彿婧�(Value:0-LiveTV;2-PS;3-HDMI_1;4-HDMI_2;5-HDMI_3;6-HDMI_4;11-AV;)
+ /// </summary>
+ public const string signal = "signal";
+ /// <summary>
+ /// 绯荤粺璁剧疆(Value榛樿鈥濃��)
+ /// </summary>
+ public const string system_setting = "system_setting";
+ }
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs
index 6b5a1b0..0b3d646 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs
@@ -15,7 +15,7 @@
{
- #region 鈻� 鍙橀噺澹版槑___________________________
+ #region -------鍙橀噺澹版槑---------
/// <summary>
/// 璁惧
/// </summary>
@@ -160,47 +160,129 @@
btnOpenCollectIcon.IsSelected = this.device.collect = !btnOpenCollectIcon.IsSelected;
this.device.CollectFunction();
};
-
+
//棣栭〉
- shouyeFL.SetClickListener((fl, btnImage, btnText) => { });
+ shouyeFL.SetClickListener((fl, btnImage, btnText) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.home_page, "");
+ });
//鍏虫満
kaiguanFL.SetClickListener((fl, btnImage, btnText) =>
{
- vv.Visible = false;
- baseCloseFFL.Visible = true;
+ ControlCommand(HisenseTVFunctionalAttributeConstant.on_off, "0", (isBool) =>
+ {
+ if (isBool)
+ {
+ CommonMethod.Current.MainThread(() =>
+ {
+ vv.Visible = false;
+ baseCloseFFL.Visible = true;
+ });
+ }
+ else
+ {
+ //鎻愮ず:鍏虫満澶辫触;
+ }
+ });
});
//鑿滃崟
- caidanFL.SetClickListener((fl, btnImage, btnText) => { });
+ caidanFL.SetClickListener((fl, btnImage, btnText) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "11");
+
+ });
//闊抽噺+
- btn_jia.MouseDownEventHandler += (sender, e) => { };
+ btn_jia.MouseDownEventHandler += (sender, e) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.volume_add, "");
+
+ };
//闊抽噺-
- btn_jian.MouseDownEventHandler += (sender, e) => { };
+ btn_jian.MouseDownEventHandler += (sender, e) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.volume_subtract, "");
+ };
//鎾斁
- bofangBtn.SetClickListener((btn) => { });
+ bofangBtn.SetClickListener((btn) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.media_play, "");
+
+ });
//鏆傚仠
- zantingBtn.SetClickListener((btn) => { });
+ zantingBtn.SetClickListener((btn) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.media_pause, "");
+ });
//蹇繘
- kuaijinBtn.SetClickListener((btn) => { });
+ kuaijinBtn.SetClickListener((btn) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.fast_forward, "");
+ });
//蹇��
- kauituiBtn.SetClickListener((btn) => { });
+ kauituiBtn.SetClickListener((btn) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.fast_back, "");
+ });
//闈欓煶
- jingyinBtn.SetClickListener((btn) => { });
+ jingyinBtn.SetClickListener((btn) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.mute, "1");
+ });
//璁剧疆
- shezhiBtn.SetClickListener((btn) => { });
+ shezhiBtn.SetClickListener((btn) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.system_setting, "");
+ });
//瑙i櫎闈欓煶
- jiechujingyinBtn.SetClickListener((btn) => { });
+ jiechujingyinBtn.SetClickListener((btn) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.mute, "0");
+ });
//杩斿洖
- fanhuiBtn.SetClickListener((btn) => { });
- //鎺у埗鑿滃崟
+ fanhuiBtn.SetClickListener((btn) =>
+ {
+ ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "5");
+ });
+ //涓�
+ muenFrameLayout.SetTopClickListener((muen) =>
+ {
+
+ ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "0");
+
+ });
+ //涓�
+ muenFrameLayout.SetBottomClickListener((muen) =>
+ {
+
+ ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "1");
+
+ });
+ //宸�
muenFrameLayout.SetLeftClickListener((muen) =>
{
+
+ ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "2");
+
+ });
+ //鍙�
+ muenFrameLayout.SetRightClickListener((muen) =>
+ {
+
+ ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "3");
+
+ });
+ //OK
+ muenFrameLayout.SetOkClickListener((muen) =>
+ {
+
+ ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "4");
});
//淇″彿婧�
sourceFrameLayout.selectAction += (text) =>
{
-
-
+ string value = text.Replace(" ", "_");
+ ControlCommand(HisenseTVFunctionalAttributeConstant.signal, value);
};
@@ -213,10 +295,40 @@
//寮�鏈�
clickBtn.MouseDownEventHandler += (sen, e) =>
{
- vv.Visible = true;
- baseCloseFFL.Visible = false;
+ ControlCommand(HisenseTVFunctionalAttributeConstant.on_off, "1", (isBool) =>
+ {
+ if (isBool)
+ {
+ CommonMethod.Current.MainThread(() =>
+ {
+ vv.Visible = true;
+ baseCloseFFL.Visible = false;
+ });
+ }
+ else
+ {
+ //鎻愮ず:寮�鏈哄け璐�;
+ }
+ });
+
};
+ }
+ /// <summary>
+ /// 鍙戦�佹帶鍒跺睘鎬ф寚浠�
+ /// </summary>
+ /// <param name="key">鍔熻兘灞炴��(璇泙涓婂畾涔夌殑)</param>
+ /// <param name="value">鍊�</param>
+ /// <param name="action">缁撴灉鍥炶皟(榛樿涓嶅洖璋�)</param>
+ private void ControlCommand(string key, string value, Action<bool> action = null)
+ {
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add(key, value);
+ Send.Current.SendControlCommand(this.device, dic, action);
+ }
+ catch { }
}
/// <summary>
/// 鍒濆鏁版嵁
@@ -242,6 +354,8 @@
}
});
}
+
+ #region -------鐣岄潰甯冨眬---------
/// <summary>
/// 鍒濆鍖栥�愬紑鏈恒�戠晫闈�
/// </summary>
@@ -316,7 +430,7 @@
shouyeFL.AddImageView();
shouyeFL.AddTextButtonView();
shouyeFL.GetImageButton().UnSelectedImagePath = "HisenseTv/shouye.png";
- shouyeFL.GetTextButton().Text = "棣栭〉";
+ shouyeFL.GetTextButton().TextID = StringId.shouye;
kaiguanFL = new CustomFrameLayout();
@@ -326,7 +440,7 @@
kaiguanFL.AddImageView();
kaiguanFL.AddTextButtonView();
kaiguanFL.GetImageButton().UnSelectedImagePath = "HisenseTv/kaiguan.png";
- kaiguanFL.GetTextButton().Text = "鍏虫満";
+ kaiguanFL.GetTextButton().TextID = StringId.guanji;
caidanFL = new CustomFrameLayout();
backgroundOpenFl.AddChidren(caidanFL);
@@ -335,7 +449,7 @@
caidanFL.AddImageView();
caidanFL.AddTextButtonView();
caidanFL.GetImageButton().UnSelectedImagePath = "HisenseTv/caidan.png";
- caidanFL.GetTextButton().Text = "鑿滃崟";
+ caidanFL.GetTextButton().TextID = StringId.caidan;
var yinliangFL = new FrameLayout();
backgroundOpenFl.AddChidren(yinliangFL);
@@ -360,7 +474,8 @@
{
Y = Application.GetRealHeight(90),
Height = Application.GetRealHeight(20),
- Text = "闊抽噺",
+ //Text = "闊抽噺",
+ TextID = StringId.yinliang,
TextColor = MusicColor.TextColor,
TextSize = TextSize.Text14,
Gravity = Gravity.CenterHorizontal,
@@ -389,28 +504,28 @@
};
bofangBtn = new CustomButton();
- bofangBtn.Text = "鎾斁";
+ bofangBtn.TextID = StringId.bofang;
bofangBtn.Y = shouyeFL.Bottom + Application.GetRealHeight(24);
bofangBtn.X = yinliangFL.Right + Application.GetRealWidth(37);
backgroundOpenFl.AddChidren(bofangBtn);
zantingBtn = new CustomButton();
- zantingBtn.Text = "鏆傚仠";
+ zantingBtn.TextID = StringId.zanting;
zantingBtn.Y = shouyeFL.Bottom + Application.GetRealHeight(24);
zantingBtn.X = bofangBtn.Right + Application.GetRealWidth(37);
backgroundOpenFl.AddChidren(zantingBtn);
kuaijinBtn = new CustomButton();
- kuaijinBtn.Text = "蹇繘";
+ kuaijinBtn.TextID = StringId.kuaijin;
kuaijinBtn.Y = bofangBtn.Bottom + Application.GetRealHeight(16);
kuaijinBtn.X = yinliangFL.Right + Application.GetRealWidth(37);
backgroundOpenFl.AddChidren(kuaijinBtn);
kauituiBtn = new CustomButton();
- kauituiBtn.Text = "蹇��";
+ kauituiBtn.TextID = StringId.kuaitui;
kauituiBtn.Y = bofangBtn.Bottom + Application.GetRealHeight(16);
kauituiBtn.X = kuaijinBtn.Right + Application.GetRealWidth(37);
backgroundOpenFl.AddChidren(kauituiBtn);
@@ -419,14 +534,14 @@
jingyinBtn = new CustomButton();
- jingyinBtn.Text = "闈欓煶";
+ jingyinBtn.TextID = StringId.jingyin;
jingyinBtn.Y = kuaijinBtn.Bottom + Application.GetRealHeight(16);
jingyinBtn.X = yinliangFL.Right + Application.GetRealWidth(37);
backgroundOpenFl.AddChidren(jingyinBtn);
shezhiBtn = new CustomButton();
- shezhiBtn.Text = "璁剧疆";
+ shezhiBtn.TextID = StringId.shezhi;
shezhiBtn.Y = kuaijinBtn.Bottom + Application.GetRealHeight(16);
shezhiBtn.X = jingyinBtn.Right + Application.GetRealWidth(37);
backgroundOpenFl.AddChidren(shezhiBtn);
@@ -434,14 +549,14 @@
jiechujingyinBtn = new CustomButton();
- jiechujingyinBtn.Text = "瑙i櫎闈欓煶";
+ jiechujingyinBtn.TextID = StringId.jiechujingyin;
jiechujingyinBtn.Y = jingyinBtn.Bottom + Application.GetRealHeight(16);
jiechujingyinBtn.X = yinliangFL.Right + Application.GetRealWidth(37);
backgroundOpenFl.AddChidren(jiechujingyinBtn);
fanhuiBtn = new CustomButton();
- fanhuiBtn.Text = "杩斿洖";
+ fanhuiBtn.TextID = StringId.fanhui;
fanhuiBtn.Y = jingyinBtn.Bottom + Application.GetRealHeight(16);
fanhuiBtn.X = jiechujingyinBtn.Right + Application.GetRealWidth(37);
backgroundOpenFl.AddChidren(fanhuiBtn);
@@ -566,7 +681,8 @@
Height = Application.GetRealHeight(22),
TextSize = TextSize.Text16,
TextColor = MusicColor.TextColor,
- Text = "宸插叧鏈�",
+ //Text = "宸插叧鏈�",
+ TextID = StringId.yiguanji,
TextAlignment = TextAlignment.Center,
Gravity = Gravity.CenterHorizontal,
Padding = new Padding(0, 16, 0, 16),
@@ -599,7 +715,7 @@
Height = Application.GetRealHeight(16),
TextSize = TextSize.Text12,
TextColor = MusicColor.TextCancelColor,
- Text = "寮�鏈�",
+ TextID = StringId.kaiji,
TextAlignment = TextAlignment.Center,
Gravity = Gravity.CenterHorizontal,
Padding = new Padding(0, 2, 0, 2),
@@ -618,7 +734,7 @@
/// <summary>
/// 鍒濆鍖栧ご閮�
/// </summary>
- private void InitTopUI()
+ private void InitTopUI()
{
this.BackgroundColor = MusicColor.ViewColor;
this.topView = new TopView();
@@ -692,9 +808,11 @@
}
//this.cellFrame.X = this.btnCurrDeviceRoom.Right + Application.GetRealWidth(20);
}
-
- }
+ #endregion
+
+ }
+ #region -------鑷畾涔夊綋鍓嶇晫闈㈢殑瀹瑰櫒---------
/// <summary>
/// 鑷畾涔夛紙棣栭〉锛屽叧鏈猴紝鑿滃崟锛夊鍣�
/// </summary>
@@ -1052,6 +1170,7 @@
button.SetClickListener((btn) =>
{
// MovieLibrary movieLibrary = new MovieLibrary();
+
selectAction?.Invoke(button.Text);
});
//if (CurrnetSelectIndex != -1 && CurrnetSelectIndex == i)
@@ -1065,7 +1184,7 @@
{
return new List<string>
{
- "HDML 1",
+ "HDML 1",//" "
"HDML 2",
"HDML 3",
"HDML 4",
@@ -1078,6 +1197,6 @@
}
-
+ #endregion
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
index 0e5cd5a..28343de 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
@@ -48,6 +48,22 @@
return true;
}
+ /// <summary>
+ /// 鍙戦�佹帶鍒跺懡浠�
+ /// </summary>
+ /// <param name="function">褰撳墠璁惧</param>
+ /// <param name="dic">鍙戦�佹帶鍒舵暟鎹�</param>
+ public void SendControlCommand(Function function, Dictionary<string, string> dic,Action<bool> action)
+ {
+ new System.Threading.Thread(() =>
+ {
+ var result = DriverLayer.Control.Ins.SendWriteCommand(function, dic, false, 0);
+ action?.Invoke(result);
+
+ })
+ { IsBackground = true }.Start();
+ }
+
/// <summary>
///璇锋眰鏈嶅姟鍣紙涓庝綇瀹呮湁鍏�:渚嬪锛沨omeId锛�
--
Gitblit v1.8.0