From 884a8ce78b6d198a5878e85fc30cb85177e59826 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 08 八月 2023 10:04:36 +0800
Subject: [PATCH] 三相空开验收
---
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs | 6
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs | 2
HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 2
HDL-ON_iOS/HDL-ON_iOS.csproj | 4
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 4
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs | 2
HDL_ON/Entity/Function/FloorHeating.cs | 21 +
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 52 +-
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs | 8
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs | 6
HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs | 152 +++++-----
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs | 4
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs | 8
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3Page.cs | 4
HDL-ON_Android/Resources/Resource.designer.cs | 3
HDL_ON/Entity/Function/AC.cs | 14
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs | 58 +++
HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs | 8
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs | 8
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs | 2
HDL_ON/DAL/DriverLayer/Control.cs | 8
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs | 8
HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs | 8
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs | 6
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs | 40 ++
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs | 8
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs | 244 ++++++++--------
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs | 8
HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs | 4
HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs | 6
HDL_ON/Entity/Function/Function.cs | 97 +++++-
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 2
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs | 2
HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs | 6
41 files changed, 503 insertions(+), 326 deletions(-)
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index e213b08..ebae154 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.1.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202308041">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.1.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202308071">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<!--鍙嬬洘-->
diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs
index 70f633f..6536465 100644
--- a/HDL-ON_Android/Resources/Resource.designer.cs
+++ b/HDL-ON_Android/Resources/Resource.designer.cs
@@ -2,6 +2,7 @@
//------------------------------------------------------------------------------
// <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.
@@ -14,7 +15,7 @@
{
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.2.8.165")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.0.99")]
public partial class Resource
{
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index fee4c27..93c9a01 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -27,7 +27,7 @@
<MtouchDebug>true</MtouchDebug>
<CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
<MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
- <CodesignProvision>OnPro230605-1-Dev</CodesignProvision>
+ <CodesignProvision>OnPro2307291-Dev</CodesignProvision>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
@@ -59,7 +59,7 @@
<MtouchEnableSGenConc>false</MtouchEnableSGenConc>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-<CodesignProvision>OnPro230630-1-Dev</CodesignProvision>
+<CodesignProvision>OnPro2307291-Dev</CodesignProvision>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 87b720f..e4cebab 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -1271,7 +1271,7 @@
// return;
//}
- var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<AlinkFunctionStatusObj>(revString);
+ var temp = JsonConvert.DeserializeObject<AlinkFunctionStatusObj>(revString);
if (temp != null)
{
Control_Udp.ReceiveRepeatManager(temp.id, usefulBytes);
@@ -1328,7 +1328,11 @@
{
localFunction.time_stamp = temp.time_stamp;
localFunction.SetAttrState(attr.key, attr.value);
-
+
+ }
+ if(localFunction.spk == SPK.AirSwitchP3)
+ {
+ localFunction.online = updateTemp.online;
}
//鏇存柊鐣岄潰鐘舵��
diff --git a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
index aebb3a8..50bd1a2 100644
--- a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -124,8 +124,8 @@
+ //鐧诲綍sip鏈嶅姟鍣�
#if __IOS__
-
Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm);
#else
if (mInterphoneType == InterphoneType.FREEVIEW.ToString())
diff --git a/HDL_ON/Entity/Function/AC.cs b/HDL_ON/Entity/Function/AC.cs
index bc31208..8a8db35 100644
--- a/HDL_ON/Entity/Function/AC.cs
+++ b/HDL_ON/Entity/Function/AC.cs
@@ -12,24 +12,28 @@
public string GetTempUnitString(Function function)
{
//var attr = function.GetAttribute(FunctionAttributeKey.TempType)
- var tt = function.GetAttrState(FunctionAttributeKey.TempType);
- if (tt == "0")
+ var tt = function.GetAttribute(FunctionAttributeKey.TempType);
+ if(tt == null)
+ {
+ return "掳C";
+ }
+ if (tt.unit == string.Empty)
{
return "掳C";
}
else
{
- if (tt == "C")
+ if (tt.unit == "C")
{
return "掳C";
}
- else if (tt == "F")
+ else if (tt.unit == "F")
{
return "掳F";
}
else
{
- return tt;
+ return tt.unit;
}
}
}
diff --git a/HDL_ON/Entity/Function/FloorHeating.cs b/HDL_ON/Entity/Function/FloorHeating.cs
index 1eb0352..dfc2539 100644
--- a/HDL_ON/Entity/Function/FloorHeating.cs
+++ b/HDL_ON/Entity/Function/FloorHeating.cs
@@ -71,14 +71,29 @@
/// </summary>
public string GetTempUnitString(Function function)
{
- var tt = function.GetAttrState(FunctionAttributeKey.TempType);
- if (tt == "0")
+ var tt = function.GetAttribute(FunctionAttributeKey.TempType);
+ if (tt == null)
+ {
+ return "掳C";
+ }
+ if (tt.unit == string.Empty)
{
return "掳C";
}
else
{
- return tt;
+ if (tt.unit == "C")
+ {
+ return "掳C";
+ }
+ else if (tt.unit == "F")
+ {
+ return "掳F";
+ }
+ else
+ {
+ return tt.unit;
+ }
}
}
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index a5ec58e..105de09 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -445,20 +445,52 @@
/// </summary>
public bool collect = false;
- private bool _online = false;
- /// <summary>
- /// 鏄惁鍦ㄧ嚎
- /// </summary>
- public bool online
- {
+ private bool _online;
+ public bool online {
get
{
+ if (spk == SPK.AirSwitchP3)
+ {
+ return _online;
+ }
return true;
}
set
{
_online = value;
}
+ }
+ ///// <summary>
+ ///// 鏄惁鍦ㄧ嚎
+ ///// </summary>
+ //public bool online
+ //{
+ // get
+ // {
+ // if(spk == SPK.AirSwitchP3)
+ // {
+ // return _online;
+ // }
+ // return true;
+ // }
+ // set
+ // {
+ // _online = value;
+ // }
+ //}
+
+ public bool isOnline()
+ {
+ if (spk == SPK.AirSwitchP3)
+ {
+ return online;
+ }
+ return true;
+ }
+
+ public void setOnine(bool isOnline)
+ {
+ online = isOnline;
}
/// <summary>
@@ -813,10 +845,10 @@
{
foreach (var temp in gc.sids)
{
- var light = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid);
- if (light != null)
+ var tempDevice = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid);
+ if (tempDevice != null)
{
- foreach (var attr in light.attributes)
+ foreach (var attr in tempDevice.attributes)
{
if (list.Find((obj) => obj.key == attr.key) == null)
{
@@ -850,27 +882,54 @@
sFunc.type = "5";
}
- string us = "";
switch (attr.key)
{
case FunctionAttributeKey.SetTemp:
+ var tt = GetAttribute(FunctionAttributeKey.TempType);
+ if (tt == null)
+ {
+ attr.unit = "掳C";
+ }
+ else
+ {
+ if (tt.unit == string.Empty)
+ {
+ attr.unit = "掳C";
+ }
+ else
+ {
+ if (tt.unit == "C")
+ {
+ attr.unit = "掳C";
+ }
+ else if (tt.unit == "F")
+ {
+ attr.unit = "掳F";
+ }
+ else
+ {
+ attr.unit = tt.unit;
+ }
+ }
+ }
+ break;
case FunctionAttributeKey.RoomTemp:
- us = "掳C";
+ attr.unit = "掳C";
var tempType = attributes.Find((obj) => obj.key == FunctionAttributeKey.TempType);
if (tempType != null)
{
- us = tempType.curValue.ToString();
+ attr.unit = tempType.curValue.ToString();
}
break;
case FunctionAttributeKey.Percent:
case FunctionAttributeKey.Brightness:
- us = "%";
+ attr.unit = "%";
break;
case FunctionAttributeKey.CCT:
- us = "K";
+ attr.unit = "K";
break;
case FunctionAttributeKey.Angle:
- us = "掳";
+ attr.unit = "掳";
break;
}
@@ -934,13 +993,13 @@
vv = 26;
}
sFunc.status.Add(new SceneFunctionStatus() {
- UintString = us,
+ UintString = attr.unit,
key = attr.key, value = Convert.ToInt32(vv).ToString(), max = attr.max, min = attr.min }) ;
}
else
{
sFunc.status.Add(new SceneFunctionStatus() {
- UintString = us,
+ UintString = attr.unit,
key = attr.key, value = attr.curValue.ToString(), max = attr.max, min = attr.min });
}
break;
@@ -1088,6 +1147,10 @@
/// 浜戠璐熻矗鐢熸垚
/// </summary>
public string deviceId = "0";
+ /// <summary>
+ /// 鍦ㄧ嚎鐘舵��
+ /// </summary>
+ public bool online = true;
public List<AttributesStatus> status = new List<AttributesStatus>();
}
/// <summary>
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 255f9f7..f350396 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1618,7 +1618,7 @@
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
TextAlignment = TextAlignment.CenterLeft,
Tag = "OnlineTag",
- Visible = !function.online
+ Visible = !function.isOnline()
};
view.AddChidren(btnOffline);
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 649b4c8..1c14381 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -33,7 +33,7 @@
}
if (btn.Tag.ToString() == function.sid)
{
- if (function.online)
+ if (function.isOnline())
{
btn.UnSelectedImagePath = "Collection/Functionbg.png";
btn.IsSelected = false;
@@ -46,7 +46,7 @@
}
else if (btn.Tag.ToString() == "OnlineTag")
{
- btn.Visible = !function.online;
+ btn.Visible = !function.isOnline();
}
}
}
@@ -546,7 +546,7 @@
{
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
{
new Tip()
{
@@ -614,7 +614,7 @@
{
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
{
new Tip()
{
@@ -658,16 +658,16 @@
{
btnClose.MouseUpEventHandler = (sender, e) =>
{
- if (!curtain.online)//绂荤嚎涓嶅厑璁告搷浣�
- {
- new Tip()
- {
- CloseTime = 1,
- Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
- Direction = AMPopTipDirection.None,
- }.Show(MainPage.BaseView);
- return;
- }
+ //if (!curtain.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
+ //{
+ // new Tip()
+ // {
+ // CloseTime = 1,
+ // Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ // Direction = AMPopTipDirection.None,
+ // }.Show(MainPage.BaseView);
+ // return;
+ //}
btnClose.IsSelected = true;
curtain.trait_on_off.curValue = "off";
curtain.SetAttrState(FunctionAttributeKey.Percent, 0);
@@ -678,16 +678,16 @@
btnOpen.MouseUpEventHandler = (sender, e) =>
{
- if (!curtain.online)//绂荤嚎涓嶅厑璁告搷浣�
- {
- new Tip()
- {
- CloseTime = 1,
- Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
- Direction = AMPopTipDirection.None,
- }.Show(MainPage.BaseView);
- return;
- }
+ //if (!curtain.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
+ //{
+ // new Tip()
+ // {
+ // CloseTime = 1,
+ // Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ // Direction = AMPopTipDirection.None,
+ // }.Show(MainPage.BaseView);
+ // return;
+ //}
btnOpen.IsSelected = true;
curtain.trait_on_off.curValue = "on";
curtain.SetAttrState(FunctionAttributeKey.Percent, 100);
@@ -708,7 +708,7 @@
};
btnUp.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
{
new Tip()
{
@@ -739,7 +739,7 @@
};
btnDown.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
index ffd324b..934f962 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -304,7 +304,7 @@
{
if (scrolView.GetChildren(i).GetType() == typeof(FunctionControlZone)) {
var fcView = scrolView.GetChildren(i) as FunctionControlZone;
- fcView.UpdataOnline(updataFunction.online);
+ fcView.UpdataOnline(updataFunction.isOnline());
}
}
}
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 9d95285..1007679 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -1290,7 +1290,7 @@
int count = 0;
foreach (var temp in FunctionList.List.InverterList())
{
- if (temp.online)
+ if (temp.isOnline())
{
if (temp.trait_on_off.state.ToString() == "on")
{
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index 69d2160..88a7bf4 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -457,7 +457,7 @@
bodyDiv.AddChidren(btnCollectionIcon);
}
- if (!function.online)
+ if (!function.isOnline())
{
bodyDiv.BackgroundColor = CSS_Color.PromptingColor2;
btnOffline = new Button()
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
index dc454e8..e75b636 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -86,7 +86,7 @@
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
{
new Tip()
{
@@ -133,7 +133,7 @@
/// </summary>
void LoadEvent_LightDimming(DiyImageSeekBar dimmerControlBar)
{
- if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
{
//new Tip()
//{
@@ -280,7 +280,7 @@
};
btnUp.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
{
new Tip()
{
@@ -311,7 +311,7 @@
};
btnDown.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣�
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index 5d331cd..9496297 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -206,7 +206,7 @@
function.spk = videoDevice.spk;
function.name = videoDevice.deviceName;
function.deviceId = videoDevice.deviceId;
- function.online = videoDevice.status == "online";
+ function.setOnine( videoDevice.status == "online");
function.sid = videoDevice.sid;
var video = functionList.Find((o) => o.deviceId == function.deviceId);
if (video == null)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs
index dc80600..c0f6581 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs
@@ -200,9 +200,8 @@
/// <summary>
/// 鏄剧ず鍔熻兘Row
/// </summary>
- void LoadFunctionListRow(List<Function> functions)
+ void LoadFunctionListRow(List<Function> functions, bool isAppend = false)
{
- functionListView.RemoveAll();
if (functions == null)
{
//鍒濆鍊�
@@ -210,8 +209,20 @@
functions.AddRange(unallocatedList);
functions.AddRange(allocatedList);
}
- foreach (var function in functions)
+ if (!isAppend)
{
+ showCount = -1;
+ functionListView.RemoveAll();
+ }
+ for (var i = 0; i < 100; i++)
+ //foreach (var function in functions)
+ {
+ showCount++;
+ if (showCount >= functions.Count)
+ {
+ break;
+ }
+ var function = functions[showCount];
if (!MainPage.SceneSupportFunctionList.Contains(function.spk))
{
continue;
@@ -290,10 +301,33 @@
};
functionRow.AddChidren(btnChooseIcon);
LoadEvent_SkipEditFunctionInfo(functionRow, btnFunctionFloorName, btnChooseIcon, btnFunctionName, function);
+
+ }
+ if (functions.Count > showCount)
+ {
+ var btnAppend = new Button()
+ {
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.Center,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextID = StringId.LoadMore,
+ };
+ functionListView.AddChidren(btnAppend);
+ btnAppend.MouseUpEventHandler = (sender, e) =>
+ {
+ btnAppend.RemoveFromParent();
+ LoadFunctionListRow(functions, true);
+ };
}
}
+ /// <summary>
+ /// 鏄剧ず鐨勮澶囩殑鎬绘暟
+ /// </summary>
+ int showCount = -1;
+
/// <summary>
/// 浣忓畢鍒楄〃鐐瑰嚮浜嬩欢
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
index 7a80226..af48a2b 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -169,7 +169,7 @@
//绾㈠瀹濆綋鍓嶆湁澶氬皯涓仴鎺у櫒
pirView.geBtn.Text = Pir.currPir.FunctioList.Count.ToString();
//绾㈠瀹濇槸鍚﹀湪绾�-绂荤嚎
- if (Pir.currPir.online)
+ if (Pir.currPir.isOnline())
{
pirView.stateIconBtn.IsSelected = true;
pirView.stateTextBtn.IsSelected = true;
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
index 4e1a37e..84258f9 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
@@ -21,7 +21,7 @@
pirDevice.name = function.name;
pirDevice.deviceId = function.deviceId;
pirDevice.sid = function.sid;
- pirDevice.online = function.online;
+ //pirDevice.setOnine = function.isOnline();
pirDevice.versions = function.versions;
}
Pir.currPir = pirDevice;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
index ec6fda3..56137f3 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
@@ -458,7 +458,7 @@
};
EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
{
- if (!device.online)
+ if (!device.isOnline())
{
new Tip()
{
@@ -524,7 +524,7 @@
{
btnMinus.MouseUpEventHandler = (sender, e) =>
{
- if (!device.online)
+ if (!device.isOnline())
{
new Tip()
{
@@ -552,7 +552,7 @@
};
btnPlus.MouseUpEventHandler = (sender, e) =>
{
- if (!device.online)
+ if (!device.isOnline())
{
new Tip()
{
@@ -579,7 +579,7 @@
Control.Ins.SendWriteCommand(device, d);
};
- if (!device.online)
+ if (!device.isOnline())
{
arcBar.OnStopTrackingTouchEvent = (sender, e) =>
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs
index ee198c9..f294bd6 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs
@@ -424,7 +424,7 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -453,7 +453,7 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -481,7 +481,7 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -508,7 +508,7 @@
CurtainAnimation(100);
};
- if (function.online)
+ if (function.isOnline())
{
btnCurtainStop.MouseDownEventHandler = (sender, e) =>
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
index 4572af5..11f09af 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
@@ -72,7 +72,7 @@
void LoadEvent_ControlEvent()
{
btnCurtainClose.MouseUpEventHandler = (sender, e) => {
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -117,7 +117,7 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -141,7 +141,7 @@
};
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
index 9600527..39f76e8 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -139,7 +139,7 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -168,7 +168,7 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -196,7 +196,7 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -223,7 +223,7 @@
CurtainAnimation(100);
};
- if (function.online)
+ if (function.isOnline())
{
btnCurtainStop.MouseDownEventHandler = (sender, e) =>
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
index 8dd444b..373ccd5 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -138,7 +138,7 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -167,7 +167,7 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -193,7 +193,7 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -238,7 +238,7 @@
// DriverLayer.Control.Ins.SendWriteCommand(function, d);
//};
- if (function.online)
+ if (function.isOnline())
{
btnCurtainStop.MouseDownEventHandler = (sender, e) =>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs
index a15c51c..1c3653b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs
@@ -149,7 +149,7 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -178,7 +178,7 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -204,7 +204,7 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -249,7 +249,7 @@
// DriverLayer.Control.Ins.SendWriteCommand(function, d);
//};
- if (function.online)
+ if (function.isOnline())
{
btnCurtainStop.MouseDownEventHandler = (sender, e) =>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
index 4ee6402..d638b04 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
@@ -1118,7 +1118,7 @@
/// </summary>
private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
{
- this.doorLockData.IsOnline = i_LocalDevice.online;
+ this.doorLockData.IsOnline = i_LocalDevice.isOnline();
for (int i = 0; i < i_LocalDevice.attributes.Count; i++)
{
var data = i_LocalDevice.attributes[i];
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3Page.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3Page.cs
index 88ad3f0..2f801c5 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3Page.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3Page.cs
@@ -422,7 +422,7 @@
{
btnSwitchIcon.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -444,7 +444,7 @@
};
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs
index 0fce218..c7b7676 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs
@@ -1,8 +1,13 @@
锘縰sing System;
using System.Collections.Generic;
+using System.Net;
+using HDL_ON.Common;
using HDL_ON.DAL.Server;
+using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
+using Newtonsoft.Json;
+//using OpenTK;
using Shared;
namespace HDL_ON.UI
@@ -573,11 +578,52 @@
#endregion
- new System.Threading.Thread(() =>
+ if (Control.Ins.GatewayOnline_Local == true)
{
- DriverLayer.Control.Ins.SendReadCommand(device);
- })
- { IsBackground = true }.Start();
+ new System.Threading.Thread(() =>
+ {
+ Control.Ins.SendReadCommand(device);
+ })
+ { IsBackground = true }.Start();
+ }
+ else
+ {
+ if (Control.Ins.GatewayOnline_Cloud)
+ {
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ var deviceResult = ApiUtlis.Ins.HttpRequest.GetDeviceInfo(device.deviceId);
+
+ if (deviceResult != null)
+ {
+ if (deviceResult.Code == StateCode.SUCCESS)
+ {
+ if (deviceResult.Data != null)
+ {
+ var packList = JsonConvert.DeserializeObject<List<Function>>(deviceResult.Data.ToString());
+ if (packList != null)
+ {
+ if (packList.Count > 0)
+ {
+ if (packList[0].isOnline())
+ {
+ Control.Ins.SendReadCommand(device);
+ }
+ }
+ }
+ }
+ }
+ }
+ }catch(Exception ex)
+ {
+
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+ }
@@ -715,6 +761,10 @@
/// </summary>
public static void UpdataStatus(Function updataTemp)
{
+ if (!updataTemp.online)//璁惧涓嶅湪绾夸笉鏇存柊鐘舵��
+ {
+ return;
+ }
Application.RunOnMainThread(() =>
{
try
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
index 7021c55..bd0a8ba 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
@@ -153,7 +153,7 @@
TextAlignment = TextAlignment.Center,
TextSize = CSS_FontSize.TextFontSize,
};
- //controlView.AddChidren(btnRunStatus); //鐘舵�佹棤娉曟祴璇曪紝鏆傛椂闅愯棌--2021-10-14 13:58:48 钁f辰鏂�
+ controlView.AddChidren(btnRunStatus);
UpdataRunStatus();
}
@@ -417,7 +417,7 @@
{
btnSwitchIcon.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -439,7 +439,7 @@
};
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs
index ef576c6..9846580 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs
@@ -62,7 +62,7 @@
{
btnSwitchIcon.MouseUpEventHandler += (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -86,7 +86,7 @@
};
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -108,7 +108,7 @@
{ IsBackground = true }.Start();
};
- if (function.online)
+ if (function.isOnline())
{
barGradualChange.OnStopTrackingTouchEvent = (sender, e) =>
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs
index c8041d3..43ed400 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs
@@ -90,7 +90,7 @@
btn.MouseUpEventHandler = (sender, e) => {
- if (!device.online)
+ if (!device.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs
index c5c93da..6e5f982 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs
@@ -290,7 +290,7 @@
{
btnSwitchIcon.MouseUpEventHandler += (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -316,7 +316,7 @@
};
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs
index ff71d51..950920d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs
@@ -40,7 +40,7 @@
/// </summary>
void LoadControlEvent()
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
index 0aa879c..15d5264 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
@@ -147,7 +147,7 @@
/// </summary>
void LoadEvent_TempChange()
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
index 3aff8a7..113b140 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
@@ -92,7 +92,7 @@
/// </summary>
void LoadEvet_ChangeColorTemplatrue()
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -148,7 +148,7 @@
{
dimmerBar.OnStopTrackingTouchEvent = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -226,7 +226,7 @@
{
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
index 5e700b2..4df1a68 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -93,7 +93,7 @@
/// </summary>
void LoadEvent_DimmerBar()
{
- if (function.online)
+ if (function.isOnline())
{
dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
{
@@ -158,7 +158,7 @@
{
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
index a0aef90..746471b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
@@ -372,85 +372,91 @@
/// </summary>
public void LoadDiv(List<Function> functions,Action action)
{
- btnIcon = new Button()
+ try
{
- X = Application.GetRealWidth(10),
- Y = Application.GetRealHeight(15),
- Width = Application.GetRealWidth(32),
- Height = Application.GetRealWidth(32),
- UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"
- };
- bodyDiv.AddChidren(btnIcon);
-
- btnName = new Button()
- {
- X = Application.GetRealWidth(8 + 10 + 32),
- Y = Application.GetRealHeight(10),
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealHeight(24),
- Text = function.name,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- };
- bodyDiv.AddChidren(btnName);
-
- btnFromFloor = new Button()
- {
- X = Application.GetRealWidth(8 + 10 + 32),
- Y = Application.GetRealHeight(10 + 24),
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealHeight(18),
- Text = function.GetRoomListName(),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.PromptingColor1,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- };
- bodyDiv.AddChidren(btnFromFloor);
-
- btnSelect = new Button()
- {
- X = Application.GetRealWidth(303),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(32),
- Height = Application.GetRealWidth(32),
- UnSelectedImagePath = "FunctionIcon/Light/LightScene/CheckIcon.png",
- SelectedImagePath = "FunctionIcon/Light/LightScene/CheckOnIcon.png",
- IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null,
- Tag = "ChooseIcon"
- };
- if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
- {
- btnSelect.X = Application.GetRealWidth(323);
- }
- bodyDiv.AddChidren(btnSelect);
-
- btnSelect.MouseUpEventHandler = (sender, e) => {
- Application.HideSoftInput();
- btnSelect.IsSelected = !btnSelect.IsSelected;
- if(btnSelect.IsSelected)
+ btnIcon = new Button()
{
- var addTemp = functions.Find((obj) => obj.deviceId == function.deviceId);
- if (addTemp == null)
- {
- functions.Add(function);
- }
- }
- else
+ X = Application.GetRealWidth(10),
+ Y = Application.GetRealHeight(15),
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
+ UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"
+ };
+ bodyDiv.AddChidren(btnIcon);
+
+ btnName = new Button()
{
- var removeTemp = functions.Find((obj) => obj.sid == function.sid);
- if (removeTemp != null)
- {
- functions.Remove(removeTemp);
- }
+ X = Application.GetRealWidth(8 + 10 + 32),
+ Y = Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(200),
+ Height = Application.GetRealHeight(24),
+ Text = function.name,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ };
+ bodyDiv.AddChidren(btnName);
+
+ btnFromFloor = new Button()
+ {
+ X = Application.GetRealWidth(8 + 10 + 32),
+ Y = Application.GetRealHeight(10 + 24),
+ Width = Application.GetRealWidth(200),
+ Height = Application.GetRealHeight(18),
+ Text = function.GetRoomListName(),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ };
+ bodyDiv.AddChidren(btnFromFloor);
+
+ btnSelect = new Button()
+ {
+ X = Application.GetRealWidth(303),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
+ UnSelectedImagePath = "FunctionIcon/Light/LightScene/CheckIcon.png",
+ SelectedImagePath = "FunctionIcon/Light/LightScene/CheckOnIcon.png",
+ IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null,
+ Tag = "ChooseIcon"
+ };
+ if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
+ {
+ btnSelect.X = Application.GetRealWidth(323);
}
- ///鍒锋柊鐣岄潰
- //if (functions.Count == 0 || functions.Count == 1)
- //{
+ bodyDiv.AddChidren(btnSelect);
+
+ btnSelect.MouseUpEventHandler = (sender, e) =>
+ {
+ Application.HideSoftInput();
+ btnSelect.IsSelected = !btnSelect.IsSelected;
+ if (btnSelect.IsSelected)
+ {
+ var addTemp = functions.Find((obj) => obj.deviceId == function.deviceId);
+ if (addTemp == null)
+ {
+ functions.Add(function);
+ }
+ }
+ else
+ {
+ var removeTemp = functions.Find((obj) => obj.sid == function.sid);
+ if (removeTemp != null)
+ {
+ functions.Remove(removeTemp);
+ }
+ }
+ ///鍒锋柊鐣岄潰
+ //if (functions.Count == 0 || functions.Count == 1)
+ //{
action();
- //}
- };
+ //}
+ };
+ }catch (Exception ex)
+ {
+ }
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
index 2654e0b..224371b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
@@ -102,7 +102,7 @@
/// </summary>
void LoadColorChangeEvent()
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -214,7 +214,7 @@
dimmerBar.OnStopTrackingTouchEvent = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -231,7 +231,7 @@
Control.Ins.SendWriteCommand(function, d);
};
- if (function.online)
+ if (function.isOnline())
{
dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
{
@@ -335,7 +335,7 @@
{
btnRestoredPoint.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
return;
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs
index 4d0bc00..c2bd28a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs
@@ -88,7 +88,7 @@
/// </summary>
void LoadColorChangeEvent()
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -218,7 +218,7 @@
dimmerBar.OnStopTrackingTouchEvent = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -235,7 +235,7 @@
Control.Ins.SendWriteCommand(function, d);
};
- if (function.online)
+ if (function.isOnline())
{
dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
{
@@ -339,7 +339,7 @@
{
btnRestoredPoint.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
return;
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs
index 2af8248..e796916 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs
@@ -63,7 +63,7 @@
{
btnSwitchIcon.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
@@ -85,7 +85,7 @@
};
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
- if (!function.online)
+ if (!function.isOnline())
{
new Tip()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
index e0a89ae..9cf4210 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -142,7 +142,7 @@
{
var a31player = A31MusicModel.A31MusicModelList[i];
- //if (a31player.functionMusic.online == false)
+ //if (a31player.functionMusic.isOnline() == false)
//{
// //涓嶅湪绾夸笉鏄剧ず
// continue;
@@ -158,7 +158,7 @@
{
var a31player = A31MusicModel.A31MusicModelList[i];
- if (a31player.functionMusic.online == false)
+ if (a31player.functionMusic.isOnline() == false)
{
//涓嶅湪绾夸笉璇诲彇
continue;
@@ -278,7 +278,7 @@
{
while (true)
{
- if (!player.functionMusic.online)
+ if (!player.functionMusic.isOnline())
{
///涓嶅湪绾夸笉璇荤姸鎬�
continue;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs
index 385e4d9..5099251 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs
@@ -72,17 +72,17 @@
};
faceUnlockView.AddChidren(btnFaceUnlockTipText);
- var btnFaceUnlockSwitchIcon = new Button()
- {
- X = Application.GetRealWidth(322),
- Y = Application.GetRealHeight(8),
- Width = Application.GetMinRealAverage(36),
- Height = Application.GetMinRealAverage(36),
- UnSelectedImagePath = "Public/Switch_2.png",
- SelectedImagePath = "Public/SwitchOn_2.png",
- IsSelected = faceUnlockSwitch,
- };
- faceUnlockView.AddChidren(btnFaceUnlockSwitchIcon);
+ //var btnFaceUnlockSwitchIcon = new Button()
+ //{
+ // X = Application.GetRealWidth(322),
+ // Y = Application.GetRealHeight(8),
+ // Width = Application.GetMinRealAverage(36),
+ // Height = Application.GetMinRealAverage(36),
+ // UnSelectedImagePath = "Public/Switch_2.png",
+ // SelectedImagePath = "Public/SwitchOn_2.png",
+ // IsSelected = faceUnlockSwitch,
+ //};
+ //faceUnlockView.AddChidren(btnFaceUnlockSwitchIcon);
@@ -105,119 +105,119 @@
contentView.AddChidren(view);
- btnFaceUnlockSwitchIcon.MouseUpEventHandler = (sender, e) =>
- {
- waitPage.Start("");
- bool changeState = false;
- if (!btnFaceUnlockSwitchIcon.IsSelected)
- {
- btnFaceUnlockSwitchIcon.IsSelected = true;
- changeState = true;
- }
- new System.Threading.Thread(() =>
- {
- try
- {
- var pack = ApiUtlis.Ins.HttpRequest.SetFaceUnlockCfg(device.deviceId, changeState, faceUnlockSetup.mode);
- if (pack != null && pack.Code == StateCode.SUCCESS)
- {
- Application.RunOnMainThread(() =>
- {
- //鏇存柊鐣岄潰
- faceUnlockSetup.enabled = btnFaceUnlockSwitchIcon.IsSelected = changeState;
- loadSubView(view, faceUnlockSetup);
- });
- }
- else
- {
- //澶辫触鎻愮ず
- Application.RunOnMainThread(() =>
- {
- if (!string.IsNullOrEmpty(pack.message))
- {
- if (string.IsNullOrEmpty(pack.message))
- {
- pack.message = Language.StringByID(StringId.OperationFailed);
- }
- var tip = new Tip()
- {
- MaxWidth = Application.GetRealWidth(300),
- Text = $"{pack.message}({pack.Code})",
- CloseTime = 3,
- Direction = AMPopTipDirection.None
- };
- tip.Show(MainPage.BaseView);
- }
- });
- }
- }
- catch (Exception ex)
- {
- MainPage.Log($"btnFaceUnlockSwitchIcon error : {ex.Message}");
- }
- finally
- {
- Application.RunOnMainThread(() =>
- {
- waitPage.Hide();
- });
- }
- })
- { IsBackground = true }.Start();
- };
+ //btnFaceUnlockSwitchIcon.MouseUpEventHandler = (sender, e) =>
+ //{
+ // waitPage.Start("");
+ // bool changeState = false;
+ // if (!btnFaceUnlockSwitchIcon.IsSelected)
+ // {
+ // btnFaceUnlockSwitchIcon.IsSelected = true;
+ // changeState = true;
+ // }
+ // new System.Threading.Thread(() =>
+ // {
+ // try
+ // {
+ // var pack = ApiUtlis.Ins.HttpRequest.SetFaceUnlockCfg(device.deviceId, changeState, faceUnlockSetup.mode);
+ // if (pack != null && pack.Code == StateCode.SUCCESS)
+ // {
+ // Application.RunOnMainThread(() =>
+ // {
+ // //鏇存柊鐣岄潰
+ // faceUnlockSetup.enabled = btnFaceUnlockSwitchIcon.IsSelected = changeState;
+ // loadSubView(view, faceUnlockSetup);
+ // });
+ // }
+ // else
+ // {
+ // //澶辫触鎻愮ず
+ // Application.RunOnMainThread(() =>
+ // {
+ // if (!string.IsNullOrEmpty(pack.message))
+ // {
+ // if (string.IsNullOrEmpty(pack.message))
+ // {
+ // pack.message = Language.StringByID(StringId.OperationFailed);
+ // }
+ // var tip = new Tip()
+ // {
+ // MaxWidth = Application.GetRealWidth(300),
+ // Text = $"{pack.message}({pack.Code})",
+ // CloseTime = 3,
+ // Direction = AMPopTipDirection.None
+ // };
+ // tip.Show(MainPage.BaseView);
+ // }
+ // });
+ // }
+ // }
+ // catch (Exception ex)
+ // {
+ // MainPage.Log($"btnFaceUnlockSwitchIcon error : {ex.Message}");
+ // }
+ // finally
+ // {
+ // Application.RunOnMainThread(() =>
+ // {
+ // waitPage.Hide();
+ // });
+ // }
+ // })
+ // { IsBackground = true }.Start();
+ //};
- new System.Threading.Thread(() => {
- try
- {
- var pack = ApiUtlis.Ins.HttpRequest.GetFaceUnlockCfg(device.deviceId);
- if (pack != null && pack.Code == StateCode.SUCCESS)
- {
- Application.RunOnMainThread(() =>
- {
- //鏇存柊鐣岄潰
- faceUnlockSetup = Newtonsoft.Json.JsonConvert.DeserializeObject<FaceUnlockSetupObj>(pack.Data.ToString());
- btnFaceUnlockSwitchIcon.IsSelected = faceUnlockSetup.enabled;
- loadSubView(view, faceUnlockSetup);
- });
- }
- else
- {
- //澶辫触鎻愮ず
- Application.RunOnMainThread(() =>
- {
- if (!string.IsNullOrEmpty(pack.message))
- {
- if (string.IsNullOrEmpty(pack.message))
- {
- pack.message = Language.StringByID(StringId.OperationFailed);
- }
- var tip = new Tip()
- {
- MaxWidth = Application.GetRealWidth(300),
- Text = $"{pack.message}({pack.Code})",
- CloseTime = 3,
- Direction = AMPopTipDirection.None
- };
- tip.Show(MainPage.BaseView);
- }
- });
- }
- }
- catch (Exception ex)
- {
- MainPage.Log($"UnlockSettingPage error : {ex.Message}");
- }
- finally
- {
- Application.RunOnMainThread(() =>
- {
- waitPage.Hide();
- });
- }
+ //new System.Threading.Thread(() => {
+ // try
+ // {
+ // var pack = ApiUtlis.Ins.HttpRequest.GetFaceUnlockCfg(device.deviceId);
+ // if (pack != null && pack.Code == StateCode.SUCCESS)
+ // {
+ // Application.RunOnMainThread(() =>
+ // {
+ // //鏇存柊鐣岄潰
+ // faceUnlockSetup = Newtonsoft.Json.JsonConvert.DeserializeObject<FaceUnlockSetupObj>(pack.Data.ToString());
+ // btnFaceUnlockSwitchIcon.IsSelected = faceUnlockSetup.enabled;
+ // loadSubView(view, faceUnlockSetup);
+ // });
+ // }
+ // else
+ // {
+ // //澶辫触鎻愮ず
+ // Application.RunOnMainThread(() =>
+ // {
+ // if (!string.IsNullOrEmpty(pack.message))
+ // {
+ // if (string.IsNullOrEmpty(pack.message))
+ // {
+ // pack.message = Language.StringByID(StringId.OperationFailed);
+ // }
+ // var tip = new Tip()
+ // {
+ // MaxWidth = Application.GetRealWidth(300),
+ // Text = $"{pack.message}({pack.Code})",
+ // CloseTime = 3,
+ // Direction = AMPopTipDirection.None
+ // };
+ // tip.Show(MainPage.BaseView);
+ // }
+ // });
+ // }
+ // }
+ // catch (Exception ex)
+ // {
+ // MainPage.Log($"UnlockSettingPage error : {ex.Message}");
+ // }
+ // finally
+ // {
+ // Application.RunOnMainThread(() =>
+ // {
+ // waitPage.Hide();
+ // });
+ // }
- })
- { IsBackground = true }.Start();
+ //})
+ //{ IsBackground = true }.Start();
}
@@ -330,7 +330,7 @@
/// <summary>
/// 寮�鍏�
/// </summary>
- public bool enabled = false;
+ public bool enabled = true;
/// <summary>
/// 瑙i攣鏂瑰紡 0-鑷姩 1-鎵嬪姩
/// </summary>
--
Gitblit v1.8.0