From 4564687f2ada89760eda21568baa9cfdc3ff3fa4 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期五, 11 三月 2022 15:06:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/release0123' into wjc
---
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs | 20
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL-ON_Android/Assets/Language.ini | 17
HDL-ON_iOS/HDL-ON_iOS.csproj | 4
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs | 18
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs | 40
HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs | 10
HDL_ON/HDL_ON.projitems | 1
HDL-ON_Android/HDL-ON_Android.csproj | 1
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 65 +
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs | 7
HDL-ON_iOS/Info.plist | 4
HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs | 12
HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs | 20
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 4
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs | 157 ++-
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs | 118 ++
HDL_ON/UI/UI1-Login/LoginPage.cs | 7
SiriIntents/Server/HttpUtil.cs | 4
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/FunAllAreaView.cs | 1
HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs | 4
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs | 115 +-
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs | 216 ++--
HDL_ON/UI/UI2/FuntionControlView/Electrical/StbPage.cs | 223 +++++
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs | 36
HDL_ON/Entity/Function/Function.cs | 6
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 36
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs | 4
HDL_ON/Common/UserInfo.cs | 23
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs | 4
HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs | 135 +++
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs | 4
HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 37
HDL-ON_iOS/Resources/Phone/Collection/FunctionOfflineBg.png | 0
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs | 94 ++
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 48
HDL-ON_iOS/AppDelegate.cs | 8
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs | 127 +-
HDL-ON_Android/SplashActivity.cs | 2
HDL-ON_iOS/Resources/Language.ini | 17
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs | 20
HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs | 10
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs | 59 +
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs | 4
HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs | 10
HDL-ON_Android/Assets/Phone/Collection/FunctionOfflineBg.png | 0
HDL_ON/DAL/DriverLayer/Control.cs | 84 +
HDL_ON/UI/MainPage.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs | 27
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs | 193 ++++
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshControlPage.cs | 18
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs | 123 ++
HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaFanPage.cs | 49
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs | 18
HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs | 20
HDL-ON_iOS/Main.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs | 45
HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs | 6
HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs | 11
HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs | 60 +
HDL_ON/Common/R.cs | 18
HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs | 20
62 files changed, 1,981 insertions(+), 469 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 80c64ae..ddab725 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -514,7 +514,12 @@
526=Cancel account
527=Homekit support notes
528=Firmware update
-
+529=
+530=In order to prevent the wrong touch and click of opening and closing the door and ensure family safety, please enter your door lock password.
+531=Password free unlocking within five minutes
+532=The device is offline and cannot be operated temporarily
+
+
1000=Room Humidity
1001=V-chip
1002=Anion
@@ -1650,6 +1655,10 @@
526=娉ㄩ攢璐﹀彿
527=鏀寔HomeKit璇存槑
528=鍥轰欢鏇存柊
+529=
+530=涓洪槻姝㈠紑鍏抽棬鐨勮瑙︾偣鍑伙紝淇濊瘉瀹跺涵瀹夊叏锛岃杈撳叆鎮ㄧ殑闂ㄩ攣寮�闂ㄥ瘑鐮併��
+531=浜斿垎閽熷唴鍏嶅瘑鐮佸紑閿�
+532=璁惧绂荤嚎涓紝鏆傛椂鏃犳硶鎿嶄綔
1000=瀹ゅ唴婀垮害
1001=绔ラ攣
@@ -2768,6 +2777,12 @@
526=邪薪薪褍谢懈褉芯胁邪褌褜 褋褔褢褌
527=懈薪褋褌褉褍泻褑懈褟 锌芯 锌芯写写械褉卸泻械 薪邪斜芯褉邪 懈薪褋褌褉褍屑械薪褌邪谢褜薪褘褏 褋褉械写褋褌胁 写谢褟 褋械屑械泄
528=芯斜薪芯胁谢械薪懈械 锌褉芯褕懈胁泻懈
+529=
+530=In order to prevent the wrong touch and click of opening and closing the door and ensure family safety, please enter your door lock password.
+531=Password free unlocking within five minutes
+532=The device is offline and cannot be operated temporarily
+
+
1000=袙谢邪卸薪芯褋褌褜 胁 袩芯屑械褖械薪懈懈
1001=V-芯斜褉邪蟹薪褘泄 褔懈锌
diff --git a/HDL-ON_Android/Assets/Phone/Collection/FunctionOfflineBg.png b/HDL-ON_Android/Assets/Phone/Collection/FunctionOfflineBg.png
new file mode 100644
index 0000000..bc09c9b
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/Collection/FunctionOfflineBg.png
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 612b27f..cbc8b17 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -226,6 +226,7 @@
<AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg2.png" />
<AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg3.png" />
<AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg4.png" />
+ <AndroidAsset Include="Assets\Phone\Collection\FunctionOfflineBg.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\colors.xml" />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index fcb1399..bdc6cdf 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:versionCode="202202281" android:versionName="1.5.4" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202203111" android:versionName="1.5.5" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools">
<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="30" />
<!--鍙嬬洘-->
<!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs
index b12d59a..afcbe50 100644
--- a/HDL-ON_Android/SplashActivity.cs
+++ b/HDL-ON_Android/SplashActivity.cs
@@ -199,7 +199,7 @@
{
//鍙Е鍙戜竴娆�
//Shared.Application.LocationAction = null;
- new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString(), lat.ToString());
+ new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString().Replace(",", "."), lat.ToString().Replace(",", "."));
}
isfirst = false;
///鐩戝惉缁忕含搴�
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index 0c0bd64..52a4be6 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -233,10 +233,10 @@
{
Language.CurrentLanguage = "Czech";
}
- else if (NSLocale.PreferredLanguages[0].Contains("ru-"))
- {
- Language.CurrentLanguage = "russian";
- }
+ //else if (NSLocale.PreferredLanguages[0].Contains("ru-"))
+ //{
+ // Language.CurrentLanguage = "russian";
+ //}
else
{
Language.CurrentLanguage = "English";
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index b80dc0f..3f3bce7 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -68,12 +68,11 @@
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARM64</MtouchArch>
- <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey>
+ <CodesignKey>iPhone Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey>
<MtouchLink>SdkOnly</MtouchLink>
<MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
<MtouchI18n>cjk</MtouchI18n>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CodesignProvision>ComHdlOnProAdHoc20220117-1</CodesignProvision>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -1385,6 +1384,7 @@
<BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg2.png" />
<BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg3.png" />
<BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg4.png" />
+ <BundleResource Include="Resources\Phone\Collection\FunctionOfflineBg.png" />
</ItemGroup>
<ItemGroup>
<ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index 312150f..fa24946 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>CFBundleShortVersionString</key>
- <string>1.5.402203011</string>
+ <string>1.5.502203111</string>
<key>CFBundleVersion</key>
- <string>1.5.403011</string>
+ <string>1.5.503111</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Use geographic location to provide services such as weather</string>
<key>NSAppleMusicUsageDescription</key>
diff --git a/HDL-ON_iOS/Main.cs b/HDL-ON_iOS/Main.cs
index 1c6b56e..09293dc 100644
--- a/HDL-ON_iOS/Main.cs
+++ b/HDL-ON_iOS/Main.cs
@@ -16,7 +16,7 @@
try
{
Shared.Application.LocationAction = null;
- new HttpServerRequest().GetCityWeatherInfo(lon.ToString(), lat.ToString());
+ new HttpServerRequest().GetCityWeatherInfo(lon.ToString().Replace(",", "."), lat.ToString().Replace(",", "."));
}
catch(Exception ex)
{
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 80c64ae..ddab725 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -514,7 +514,12 @@
526=Cancel account
527=Homekit support notes
528=Firmware update
-
+529=
+530=In order to prevent the wrong touch and click of opening and closing the door and ensure family safety, please enter your door lock password.
+531=Password free unlocking within five minutes
+532=The device is offline and cannot be operated temporarily
+
+
1000=Room Humidity
1001=V-chip
1002=Anion
@@ -1650,6 +1655,10 @@
526=娉ㄩ攢璐﹀彿
527=鏀寔HomeKit璇存槑
528=鍥轰欢鏇存柊
+529=
+530=涓洪槻姝㈠紑鍏抽棬鐨勮瑙︾偣鍑伙紝淇濊瘉瀹跺涵瀹夊叏锛岃杈撳叆鎮ㄧ殑闂ㄩ攣寮�闂ㄥ瘑鐮併��
+531=浜斿垎閽熷唴鍏嶅瘑鐮佸紑閿�
+532=璁惧绂荤嚎涓紝鏆傛椂鏃犳硶鎿嶄綔
1000=瀹ゅ唴婀垮害
1001=绔ラ攣
@@ -2768,6 +2777,12 @@
526=邪薪薪褍谢懈褉芯胁邪褌褜 褋褔褢褌
527=懈薪褋褌褉褍泻褑懈褟 锌芯 锌芯写写械褉卸泻械 薪邪斜芯褉邪 懈薪褋褌褉褍屑械薪褌邪谢褜薪褘褏 褋褉械写褋褌胁 写谢褟 褋械屑械泄
528=芯斜薪芯胁谢械薪懈械 锌褉芯褕懈胁泻懈
+529=
+530=In order to prevent the wrong touch and click of opening and closing the door and ensure family safety, please enter your door lock password.
+531=Password free unlocking within five minutes
+532=The device is offline and cannot be operated temporarily
+
+
1000=袙谢邪卸薪芯褋褌褜 胁 袩芯屑械褖械薪懈懈
1001=V-芯斜褉邪蟹薪褘泄 褔懈锌
diff --git a/HDL-ON_iOS/Resources/Phone/Collection/FunctionOfflineBg.png b/HDL-ON_iOS/Resources/Phone/Collection/FunctionOfflineBg.png
new file mode 100644
index 0000000..bc09c9b
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/Collection/FunctionOfflineBg.png
Binary files differ
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index a645c6e..4d9b039 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -4,6 +4,24 @@
{
public static class StringId
{
+
+
+ /// <summary>
+ /// 璁惧绂荤嚎涓紝鏆傛椂鏃犳硶鎿嶄綔
+ /// </summary>
+ public const int DeviceOfflineCannotOption = 532;
+ /// <summary>
+ /// 浜斿垎閽熷唴鍏嶅瘑鐮佸紑閿�
+ /// </summary>
+ public const int DoorLock5minTip = 531;
+ /// <summary>
+ /// 涓洪槻姝㈠紑鍏抽棬鐨勮瑙︾偣鍑伙紝淇濊瘉瀹跺涵瀹夊叏锛岃杈撳叆鎮ㄧ殑闂ㄩ攣寮�闂ㄥ瘑鐮併��
+ /// </summary>
+ public const int DoorLockEntryPasswordTip = 530;
+ /// <summary>
+ /// 瀵嗙爜杈撳叆
+ /// </summary>
+ public const int EntryPassword = 529;
/// <summary>
/// 鍥轰欢鏇存柊
/// </summary>
diff --git a/HDL_ON/Common/UserInfo.cs b/HDL_ON/Common/UserInfo.cs
index c82538d..b7a8838 100644
--- a/HDL_ON/Common/UserInfo.cs
+++ b/HDL_ON/Common/UserInfo.cs
@@ -160,6 +160,29 @@
}
}
+ [Newtonsoft.Json.JsonIgnore]
+ public DateTime LastTimeOpenDoor = DateTime.MinValue;
+ public bool VerOpenDoorPw
+ {
+ get
+ {
+ return (DateTime.Now - LastTime).TotalMinutes > 5;
+ }
+ }
+ [Newtonsoft.Json.JsonIgnore]
+ public string doorPasswordString;
+
+ /// <summary>
+ /// 璁板綍鑷姩鍖栫瓫閫夌殑鎴块棿鐨勬潯浠�
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public Entity.Room logicselectedRoom = new Entity.Room { roomId = "6688",roomName = Language.StringByID(StringId.allAreas) };
+ /// <summary>
+ /// 璁板綍鑷姩鍖栫瓫閫夌殑鍔熻兘鐨勬潯浠�
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public string logicselectedFunction;
+
#endregion
/// <summary>
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 98bc02e..80397b6 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -360,10 +360,11 @@
/// <param name="function"></param>
/// <param name="useRemote">鏄惁鐩存帴浣跨敤杩滅▼鍙戦��</param>
/// <returns></returns>
- public void SendWriteCommand(Function function, Dictionary<string, string> commandDictionary, bool useRemote = false,int resend = 3)
+ public bool SendWriteCommand(Function function, Dictionary<string, string> commandDictionary, bool useRemote = false,int resend = 3)
{
function.controlCounter++;
function.refreshTime = DateTime.Now;
+
//濡傛灉鏄帶鍒惰皟鍏夌殑寮�鏃讹紝浜害鍊间笉鑳戒负0
if (commandDictionary.Count > 2)
@@ -404,7 +405,7 @@
upDataObj.objects.Add(asd);
revString = Newtonsoft.Json.JsonConvert.SerializeObject(upDataObj);
UpdataFunctionStatus(revString, null, true);
- return;
+ return true;
}
@@ -493,6 +494,8 @@
}
}
+
+ return true;
}
/// <summary>
/// 鍏ㄥ紑鍏ㄥ叧鍔熻兘
@@ -1232,13 +1235,80 @@
}
else
{
- Dictionary<string, object> d = new Dictionary<string, object>();
- d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
- d.Add("deviceId", doorlock.deviceId);
- var requestJson = HttpUtil.GetSignRequestJson(d);
- HttpUtil.RequestHttpsPost("/home-wisdom/app/device/door/remoteOpen", requestJson);
+ ConfirmUnlocking(doorlock.deviceId, extStr);
}
}
+ /// <summary>
+ /// 纭寮�閿�
+ /// </summary>
+ /// <param name="functionId"></param>
+ /// <param name="pwd"></param>
+ public void ConfirmUnlocking(string functionId,string pwd)
+ {
+ Loading loading = new Loading();
+ MainPage.BaseView.AddChidren(loading);
+ loading.BackgroundColor = 0x88000000;
+ loading.LodingBackgroundColor = UI.CSS.CSS_Color.BackgroundColor;
+ loading.Start(Language.StringByID(StringId.PleaseWait));
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", functionId);
+ d.Add("pwd", pwd);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ var pack = HttpUtil.RequestHttpsPost("/home-wisdom/app/device/door/pwdConfirm", requestJson);
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ Newtonsoft.Json.Linq.JObject pairs = Newtonsoft.Json.Linq.JObject.Parse(pack.Data.ToString());
+ var scrip = pairs.GetValue("scrip");
+
+ d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", functionId);
+ d.Add("scrip", scrip);
+ requestJson = HttpUtil.GetSignRequestJson(d);
+ pack = HttpUtil.RequestHttpsPost("/home-wisdom/app/device/door/remoteOpen", requestJson);
+ //if(pack.Code == StateCode.SUCCESS)
+ //{
+ // return true;
+ //}
+ //else
+ //{
+ // return false;
+ //}
+ if (pack.Code != StateCode.SUCCESS) {
+ Application.RunOnMainThread(() => {
+ new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), pack.message);
+ UserInfo.Current.doorPasswordString = "";//
+ UserInfo.Current.LastTimeOpenDoor = DateTime.MinValue;
+ });
+ }
+ }
+ if (pack.Code != StateCode.SUCCESS)
+ {
+ Application.RunOnMainThread(() => {
+ new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), pack.message);
+ });
+ }
+ }
+ catch (Exception ex)
+ {
+
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ loading.Hide();
+ loading.RemoveFromParent();
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ }
//瀵嗙爜鍐荤粨
//瀵嗙爜楠岃瘉
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index ca8413a..b64d1e6 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -716,12 +716,8 @@
sendDataObj.time_stamp = Utlis.GetTimestamp();
var acd = new AlinkDoorlockStatus();
acd.sid = sid;
- acd.user_id = userId;
+ acd.user_id = extStr;
acd.ext_str = extStr;
-#if DEBUG
- acd.user_id = "013";
- acd.ext_str = "999999";
-#endif
sendDataObj.objects.Add(acd);
return sendDataObj;
}
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index ba846b9..f17e8e8 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -488,6 +488,7 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\MusicProperty.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\SupportHomeKitNotesPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\FirmwareUpdateView.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockUnlockPage.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index f264254..3acd47a 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "1.5.4";
+ public static string VersionString = "1.5.5";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index c9362af..e4f6eb9 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -197,7 +197,7 @@
airFresh2.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
break;
case SPK.DoorLock:
- var doorLockPage = new DoorLockListPage();
+ var doorLockPage = new DoorLockPage();
doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
break;
}
@@ -205,4 +205,4 @@
return eventHandler;
}
}
-}
\ No newline at end of file
+}
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 31b908a..c5577fa 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -202,6 +202,7 @@
btnIcon.MouseUpEventHandler += (sender, e) =>
{
+
//ESOnVideo.Current.Test(false);
//return;
@@ -215,7 +216,7 @@
etAccount.Text = "18316672920";
//etAccount.Text = "18316120654";//tujie
//etAccount.Text = "13450425807";//榛勭婧� knx椤圭洰
- //etAccount.Text = "18140004933";
+ etAccount.Text = "18244942707";
}
else
{
@@ -243,8 +244,8 @@
//etAccount.Text = "info@smartlife-ks.com";
//etAccount.Text = "551775569@qq.com";//wcf
etAccount.Text = "15626203746";
- etAccount.Text = "zhangquansongjava@163.com";
- etAccount.Text = "s.savinov@hdlautomation.ru";
+ //etAccount.Text = "zhangquansongjava@163.com";
+ //etAccount.Text = "s.savinov@hdlautomation.ru";
}
b = !b;
etPassword.Text = "123456";
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index bed8a4e..2d42531 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -193,6 +193,19 @@
#if DEBUG
btnResidenceName.MouseUpEventHandler = (sender, e) =>
{
+
+ if (UserInfo.Current.VerOpenDoorPw || string.IsNullOrEmpty(UserInfo.Current.doorPasswordString))
+ {
+ var page = new DoorLockUnlockPage(new Function());
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadView();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ }
+ else
+ {
+ Control.Ins.OneKeyUnlocking(new Function(), UserInfo.Current.doorPasswordString);
+ }
+
};
#endif
@@ -856,6 +869,7 @@
//闊充箰妯″潡鏈変富浠庡叧绯伙紝闇�瑕佺壒娈婂鐞�
if (SPK.MusicSpkList().Contains( function.spk))
{
+ continue;
//var music = function as Music.A31MusicModel;
//var music = Music.A31MusicModel.A31MusicModelList.Find((obj) => obj.sid == function.sid);
//if (music == null)
@@ -924,6 +938,12 @@
functionViews.Add(functionView);
LoadDeviceFunctionDiv(functionView, function);
index++;
+
+
+ if (!function.online)
+ {
+ btnbg.UnSelectedImagePath = "Collection/FunctionOfflineBg.png";
+ }
}
if (index == 0)
@@ -1306,6 +1326,23 @@
{
UpdataFunctionStates(function);
}
+
+
+ if (!function.online)
+ {
+ var btnOffline = new Button()
+ {
+ X = btnIcon.Right,
+ Y = Application.GetRealWidth(16),
+ Height = Application.GetMinRealAverage(32),
+ TextID = StringId.DeviceOffline,
+ TextColor = CSS_Color.WarningColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextAlignment = TextAlignment.CenterLeft
+ };
+ view.AddChidren(btnOffline);
+
+ }
}
catch (Exception ex)
{
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 43a2944..0bbd7a4 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -342,6 +342,11 @@
{
if (view.Tag.ToString() == function.sid)
{
+ //if (!function.online)
+ //{
+ // view.UnSelectedImagePath = "Collection/FunctionOfflineBg.png";
+ //}
+
var state = false;
if (function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainTrietex ||
function.spk == SPK.CurtainSwitch)//绐楀笜璁惧鏍规嵁鐧惧垎姣斿垽鏂紑鍏崇姸鎬�
@@ -463,6 +468,16 @@
{
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitch.IsSelected = !btnSwitch.IsSelected;
new System.Threading.Thread(() =>
{
@@ -516,6 +531,16 @@
{
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
btnSwitch.IsSelected = !btnSwitch.IsSelected;
@@ -550,6 +575,16 @@
{
btnClose.MouseUpEventHandler = (sender, e) =>
{
+ if (!curtain.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ 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);
@@ -560,6 +595,16 @@
btnOpen.MouseUpEventHandler = (sender, e) =>
{
+ if (!curtain.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ 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);
@@ -580,6 +625,16 @@
};
btnUp.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -601,6 +656,16 @@
};
btnDown.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index 86d9ff5..436d5f9 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -61,8 +61,9 @@
}
LoadDiv();
- btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png";
-
+
+ btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png";
+
if (SPK.CurtainSpkList().Contains(function.spk))
{//绐楀笜娌℃湁寮�鍏虫寜閽�
CurtainFragment();
@@ -90,6 +91,10 @@
this.AddChidren(btnTipPowerLow);
}
}
+ }
+ else if (function.spk == SPK.DoorLock)
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png";
}
else
{
@@ -160,6 +165,8 @@
LoadEvent_DivSkipEvent();
LoadEvent_FunctionCollection();
+
+
}
/// <summary>
@@ -212,9 +219,27 @@
UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
IsSelected = function.collect
};
- if ( !SPK.ArmSensorSpkList().Contains(function.spk) && !SPK.EnvironDeviceSpkList().Contains( function.spk))//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare &&
+ if ( !SPK.ArmSensorSpkList().Contains(function.spk)
+ && function.spk != SPK.DoorLock
+ && !SPK.EnvironDeviceSpkList().Contains( function.spk))//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare &&
{
bodyDiv.AddChidren(btnCollectionIcon);
+ }
+
+ if (!function.online)
+ {
+ bodyDiv.BackgroundColor = CSS_Color.PromptingColor2;
+ var btnOffline = new Button()
+ {
+ X = Application.GetRealWidth(8 + 10 + 32),
+ Y = Application.GetRealHeight(28 + 24),
+ Height = Application.GetRealHeight(30),
+ TextID = StringId.DeviceOffline,
+ TextColor = CSS_Color.WarningColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextAlignment = TextAlignment.CenterLeft
+ };
+ bodyDiv.AddChidren(btnOffline);
}
}
@@ -332,7 +357,7 @@
btnCurtainOpen.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainUpIcon.png";
btnCurtainOpen.SelectedImagePath = "FunctionIcon/Curtain/CurtainUpIconOn.png";
}
- LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function);
+ LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose);
#endregion
}
/// <summary>
@@ -437,5 +462,8 @@
};
bodyDiv.AddChidren(btnLastStates);
}
+
+
+
}
}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
index 3b8ac47..d579862 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -79,6 +79,16 @@
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitch.IsSelected = !btnSwitch.IsSelected;
if(SPK.NotStatusSpkList.Contains( function.spk ))
@@ -109,34 +119,24 @@
}
#region 鐏厜鐨勪簨浠跺垪琛�
- /// <summary>
- /// 鐏厜寮�鍏充簨浠�
- /// </summary>
- void LoadEvent_LightSwitch(Button btnSwitch)
- {
- btnSwitch.MouseUpEventHandler += (sender, e) =>
- {
- btnSwitch.IsSelected = !btnSwitch.IsSelected;
- new System.Threading.Thread(() =>
- {
- if (SPK.LightSpkList().Contains( function.spk))
- {
- function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
- Dictionary<string, string> d = new Dictionary<string, string>();
- d.Add("on_off", function.trait_on_off.curValue.ToString());
- Control.Ins.SendWriteCommand(function, d);
- }
- })
- { IsBackground = true }.Start();
- };
- }
+
/// <summary>
/// 鐏厜浜害璋冭妭浜嬩欢
/// </summary>
void LoadEvent_LightDimming(DiyImageSeekBar dimmerControlBar)
{
- if(function.spk == SPK.LightDimming || function.spk == SPK.LightRGB)
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ //new Tip()
+ //{
+ // CloseTime = 1,
+ // Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ // Direction = AMPopTipDirection.None,
+ //}.Show(MainPage.BaseView);
+ return;
+ }
+ if (function.spk == SPK.LightDimming || function.spk == SPK.LightRGB)
{
dimmerControlBar.OnStartTrackingTouchEvent = (sender, e) => {
onDimmerBar = true;
@@ -192,41 +192,71 @@
/// <param name="btnStop"></param>
/// <param name="btnOpen"></param>
/// <param name="btnClose"></param>
- void LoadEvent_ControlCurtain(Button btnStop, Button btnOpen, Button btnClose, Function curtain)
+ void LoadEvent_ControlCurtain(Button btnStop, Button btnOpen, Button btnClose)
{
btnClose.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnClose.IsSelected = true;
btnStop.IsSelected = false;
btnOpen.IsSelected = false;
- curtain.trait_on_off.curValue = "off";
- curtain.SetAttrState(FunctionAttributeKey.Percent, 0);
+ function.trait_on_off.curValue = "off";
+ function.SetAttrState(FunctionAttributeKey.Percent, 0);
Dictionary<string, string> d = new Dictionary<string, string>();
- d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
- Control.Ins.SendWriteCommand(curtain, d);
+ d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
+ Control.Ins.SendWriteCommand(function, d);
};
btnStop.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnStop.IsSelected = true;
btnClose.IsSelected = false;
btnOpen.IsSelected = false;
- curtain.trait_on_off.curValue = "stop";
+ function.trait_on_off.curValue = "stop";
Dictionary<string, string> d = new Dictionary<string, string>();
- d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
- Control.Ins.SendWriteCommand(curtain, d);
+ d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
+ Control.Ins.SendWriteCommand(function, d);
};
btnOpen.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnOpen.IsSelected = true;
btnClose.IsSelected = false;
btnStop.IsSelected = false;
- curtain.trait_on_off.curValue = "on";
- curtain.SetAttrState(FunctionAttributeKey.Percent, 100);
+ function.trait_on_off.curValue = "on";
+ function.SetAttrState(FunctionAttributeKey.Percent, 100);
Dictionary<string, string> d = new Dictionary<string, string>();
- d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
- Control.Ins.SendWriteCommand(curtain, d);
+ d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
+ Control.Ins.SendWriteCommand(function, d);
};
}
#endregion
@@ -243,6 +273,16 @@
};
btnUp.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -264,6 +304,16 @@
};
btnDown.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
index 8cc3709..f7b44a0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -14,7 +14,7 @@
/// <summary>
/// 榛樿閫変腑鏄埧闂存椂锛氬叏閮ㄥ尯鍩�
/// </summary>
- public static Entity.Room selectedRoom = new Entity.Room { roomId ="6688" };
+ //public static Entity.Room selectedRoom = new Entity.Room { roomId ="6688" };
/// <summary>
/// 榛樿閫変腑鏄澶囩被鍨嬫椂锛氬叏閮ㄥ姛鑳�
@@ -122,7 +122,9 @@
funAllAreaView.btnText1.Text = (areaView.btnClick.Tag as Entity.Room).roomName;
///鍒囨崲鎴块棿榛樿鍔熻兘绫诲瀷鍏ㄩ儴;
funAllAreaView.btnText2.Text = Language.StringByID(StringId.allFun);
- selectedRoom = (areaView.btnClick.Tag as Entity.Room);
+ //selectedRoom = (areaView.btnClick.Tag as Entity.Room);
+ UserInfo.Current.logicselectedRoom = (areaView.btnClick.Tag as Entity.Room);
+ UserInfo.Current.logicselectedFunction = "";
///鑾峰彇鏄剧ず璁惧鍒楄〃
var list = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room, if_type);
@@ -142,7 +144,7 @@
{
//鑾峰彇鏈�缁堟樉绀哄垪琛�
- var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
+ var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_type);
//鑾峰彇璁惧鍒楄〃鐨勭被鍨嬶紙渚嬪锛氱伅鍏夌被锛岀獥甯樼被銆傘�傘�傦級
var deviceTypeList = LogicMethod.CurrLogicMethod.GetDeviceTypeList(functionList);
if (deviceTypeList.Count == 0)
@@ -223,11 +225,13 @@
{
fLayout.RemoveFromParent();
funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
+ UserInfo.Current.logicselectedFunction = areaView.btnClick.Tag.ToString();
///鑾峰彇鍗曚釜绫诲瀷锛堜緥濡傦細鐏厜绫汇�傘�傦級璁惧FunctionType鍒楄〃
- var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(areaView.btnClick.Tag.ToString());
+ var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
///鑾峰彇鍗曚釜鐏厜绫诲瀷锛堜緥濡傦細鐏厜1,鐏厜2銆傘�傦級鏄剧ず璁惧鍒楄〃
- var lists = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList);
- DeviceListView(vv, lists);
+ var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList);
+ DeviceListView(vv, lists2);
+
};
if (deviceTypeList.Count - 1 == i)
{
@@ -239,9 +243,24 @@
funAllAreaView.btnText2.MouseUpEventHandler += funClick;
funAllAreaView.btnIcon2.MouseUpEventHandler += funClick;
///鑾峰彇鏄剧ず璁惧鍒楄〃
- var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
- DeviceListView(vv, deviceList);
+ var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_type);
+ if (!string.IsNullOrEmpty(UserInfo.Current.logicselectedFunction))
+ {
+
+ ///鑾峰彇鍗曚釜绫诲瀷锛堜緥濡傦細鐏厜绫汇�傘�傦級璁惧FunctionType鍒楄〃
+ var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
+ ///鑾峰彇鍗曚釜鐏厜绫诲瀷锛堜緥濡傦細鐏厜1,鐏厜2銆傘�傦級鏄剧ず璁惧鍒楄〃
+ var lists = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, deviceList);
+
+ funAllAreaView.btnText2.Text = UserInfo.Current.logicselectedFunction;
+ DeviceListView(vv, lists);
+ }
+ else
+ {
+ DeviceListView(vv, deviceList);
+ }
+ funAllAreaView.btnText1.Text = UserInfo.Current.logicselectedRoom.roomName;
}
@@ -252,6 +271,7 @@
/// <param name="deviceList"></param>
public void DeviceListView(VerticalScrolViewLayout verticalScrolView, List<HDL_ON.Entity.Function> deviceList)
{
+
verticalScrolView.RemoveAll();
foreach (var dev in deviceList)
{
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index b58bcf9..bd6a462 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -930,9 +930,9 @@
continue;
}
//鑷姩鍖栭厤缃緭鍏ユ潯浠剁含搴�
- double lat = Convert.ToDouble(logicDate.geo_fence.latitude);
+ double lat = Convert.ToDouble(logicDate.geo_fence.latitude.Replace(",", "."));
//鑷姩鍖栭厤缃緭鍏ユ潯浠剁粡搴�
- double lon = Convert.ToDouble(logicDate.geo_fence.longitude);
+ double lon = Convert.ToDouble(logicDate.geo_fence.longitude.Replace(",", "."));
//鑷姩鍖栭厤缃緭鍏ユ潯浠�<鍦扮悊鍥存爮鍗婂緞><鍗曚綅锛屽叕閲屻�佸崈绫�.绫�>
int radius = int.Parse(logicDate.geo_fence.radius);
//璁$畻2涓粡绾害涔嬮棿鐨勮窛绂�
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/FunAllAreaView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/FunAllAreaView.cs
index 9f803da..cdcd840 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/FunAllAreaView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/FunAllAreaView.cs
@@ -37,7 +37,6 @@
X = Application.GetRealWidth(34),
TextAlignment = TextAlignment.CenterLeft,
TextID=StringId.allAreas,
-
};
/// <summary>
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs
index 15ceafd..9ad21a0 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs
@@ -147,7 +147,9 @@
});
}
}
- catch { }
+ catch (Exception ex) {
+ MainPage.Log(ex.Message);
+ }
finally
{
Application.RunOnMainThread(() => {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
index e683de0..cd5aefc 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -118,7 +118,7 @@
/// </summary>
private void InitFrameWhiteContent1()
{
- temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp));
+ temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
arcBar = new DiyArcSeekBar()
{
Gravity = Gravity.CenterHorizontal,
@@ -147,7 +147,7 @@
arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off";
arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min;
arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max;
- arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp));
+ arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
btnTemp = new Button()
{
@@ -158,7 +158,7 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = 50,
IsBold = true,
- Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(),
+ Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(),
TextAlignment = TextAlignment.Center,
};
FrameWhiteCentet1.AddChidren(btnTemp);
@@ -358,6 +358,15 @@
};
EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
btnModeIcon.IsSelected = btnModeText.IsSelected = true;
device.SetAttrState(FunctionAttributeKey.Mode, m);
btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(m);
@@ -485,6 +494,15 @@
};
EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
btnModeIcon.IsSelected = btnModeText.IsSelected = true;
device.SetAttrState(FunctionAttributeKey.Swing, m);
btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(m);
@@ -600,6 +618,15 @@
};
EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
btnFanIcon.IsSelected = btnFanText.IsSelected = true;
device.SetAttrState(FunctionAttributeKey.FanSpeed, m);
btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(m);
@@ -787,6 +814,15 @@
btn.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
Dictionary<string, string> d = new Dictionary<string, string>();
d.Add(attr.key, "");
Control.Ins.SendWriteCommand(device, d);
@@ -841,11 +877,20 @@
{
btnMinus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
{
return;
}
-
+
if (temp <= device.GetAttribute(FunctionAttributeKey.SetTemp).min)
{
return;
@@ -862,6 +907,15 @@
};
btnPlus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
{
return;
@@ -879,31 +933,33 @@
d.Add(FunctionAttributeKey.SetTemp, temp.ToString());
Control.Ins.SendWriteCommand(device, d);
};
- arcBar.OnStopTrackingTouchEvent = (sender, e) =>
+ if (!device.online)
{
- temp = arcBar.Progress;
- device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
- btnTemp.Text = arcBar.Progress.ToString();
- controlTime = DateTime.Now;
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
- Control.Ins.SendWriteCommand(device, d);
- };
- arcBar.OnProgressChangedEvent = (sender, e) =>
- {
- device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
- btnTemp.Text = e.ToString();
- };
- //arcBar.MouseDownEventHandler = (sender, e) => {
- // Console.WriteLine("ddd");
- // MainPage.BasePageView.ScrollEnabled =false;
- //};
- //arcBar.MouseUpEventHandler = (sender, e) => {
- // Console.WriteLine("ddd2");
- // MainPage.BasePageView.ScrollEnabled = true;
- //};
+ arcBar.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ temp = arcBar.Progress;
+ device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
+ btnTemp.Text = arcBar.Progress.ToString();
+ controlTime = DateTime.Now;
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
+ Control.Ins.SendWriteCommand(device, d);
+ };
+ arcBar.OnProgressChangedEvent = (sender, e) =>
+ {
+ device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
+ btnTemp.Text = e.ToString();
+ };
+ //arcBar.MouseDownEventHandler = (sender, e) => {
+ // Console.WriteLine("ddd");
+ // MainPage.BasePageView.ScrollEnabled =false;
+ //};
+ //arcBar.MouseUpEventHandler = (sender, e) => {
+ // Console.WriteLine("ddd2");
+ // MainPage.BasePageView.ScrollEnabled = true;
+ //};
+ }
}
-
/// <summary>
/// 鎺у埗妯″紡浜嬩欢
@@ -938,6 +994,15 @@
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
btnSwitch.IsSelected = !btnSwitch.IsSelected;
device.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
if (device.trait_on_off.curValue.ToString() == "on")
@@ -976,14 +1041,14 @@
}
else
{
- btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp))) + "掳C";
+ btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C";
btnMode.SelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode));
btnSwing.SelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing));
btnWindSpeed.SelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed));
btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode), false);
btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing), false);
btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed), false);
- temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)));
+ temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")));
arcBar.Progress = temp;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshControlPage.cs
index 848c823..7075c77 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshControlPage.cs
@@ -759,6 +759,15 @@
/// <param name="comadValue">鍛戒护</param>
private void SendOtherComand(IconViewControl btnIcon, string comadKey, string comadValue)
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
btnIcon.CanClick = false;
HdlThreadLogic.Current.RunThread(() =>
@@ -779,6 +788,15 @@
/// </summary>
private void SendSwitchComand()
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
this.btnSwitch.CanClick = false;
string statu = this.btnSwitch.IsSelected == true ? "off" : "on";
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
index 3f665d1..7ea9ab3 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
@@ -89,6 +89,15 @@
FrameWhiteCentet1.AddChidren(btnSwitch);
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
btnSwitch.IsSelected = !btnSwitch.IsSelected;
device.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
new System.Threading.Thread(() =>
@@ -280,6 +289,15 @@
/// <param name="comadValue">鍛戒护</param>
private void SendOtherComand(IconViewControl btnIcon, string comadKey, string comadValue)
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
btnIcon.CanClick = false;
HdlThreadLogic.Current.RunThread(() =>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
index 07ee250..f2de9ff 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
@@ -305,6 +305,15 @@
};
EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
btnModeIcon.IsSelected = btnModeText.IsSelected = true;
device.SetAttrState(FunctionAttributeKey.Mode, m);
btnMode.UnSelectedImagePath = fhTemp.GetModeIconPath(m);
@@ -362,6 +371,15 @@
{
btnMinus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
{
return;
@@ -381,6 +399,15 @@
};
btnPlus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
{
return;
@@ -398,19 +425,23 @@
d.Add(FunctionAttributeKey.SetTemp, temp.ToString());
Control.Ins.SendWriteCommand(device, d);
};
- arcBar.OnStopTrackingTouchEvent = (sender, e) =>
+
+ if (!device.online)
{
- device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
- btnTemp.Text = arcBar.Progress.ToString();
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
- Control.Ins.SendWriteCommand(device, d);
- };
- arcBar.OnProgressChangedEvent = (sender, e) =>
- {
- device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
- btnTemp.Text = e.ToString();
- };
+ arcBar.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
+ btnTemp.Text = arcBar.Progress.ToString();
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
+ Control.Ins.SendWriteCommand(device, d);
+ };
+ arcBar.OnProgressChangedEvent = (sender, e) =>
+ {
+ device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
+ btnTemp.Text = e.ToString();
+ };
+ }
}
/// <summary>
/// 鎺у埗妯″紡浜嬩欢
@@ -460,9 +491,9 @@
Application.RunOnMainThread(() =>
{
btnTemp.Text = device.GetAttrState(FunctionAttributeKey.SetTemp);
- btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp))) + "掳C";
+ btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C";
btnMode.UnSelectedImagePath = fhTemp.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode));
- arcBar.Progress = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)));
+ arcBar.Progress = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")));
if (device.trait_on_off.curValue.ToString() == "on")
{
arcBar.IsOffline = false;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs
index 345f80f..cf582a2 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs
@@ -155,7 +155,7 @@
MaxValue = function.GetAttribute(FunctionAttributeKey.SetTemp).max,
//IsClickable = function.trait_on_off.curValue.ToString() == "on",
ArcColor = CSS_Color.BackgroundColor,
- Progress = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)),
+ Progress = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",",".")),
#if __IOS__
Y = Application.GetRealHeight(120 + 25),
Width = Application.GetRealWidth(260 - 40),
@@ -180,7 +180,7 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = 50,
IsBold = true,
- Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(),
+ Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(),
TextAlignment = TextAlignment.Center,
};
controlView.AddChidren(btnTemp);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs
index 805a2ac..8c9dd0a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs
@@ -25,11 +25,11 @@
}
AC temp = new AC();
updataTime = DateTime.Now;
- bodyView.btnTemp.Text = Convert.ToDouble( updateTemp.GetAttrState(FunctionAttributeKey.SetTemp)).ToString();
- bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState((string)FunctionAttributeKey.RoomTemp))) + "掳C";
+ bodyView.btnTemp.Text = Convert.ToDouble( updateTemp.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString();
+ bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C";
bodyView.btnMode.UnSelectedImagePath = temp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode));
bodyView.btnWindSpeed.UnSelectedImagePath = temp.GetFanIconPath(updateTemp.GetAttrState(FunctionAttributeKey.FanSpeed));
- bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp)));
+ bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")));
if (updateTemp.trait_on_off.curValue.ToString() == "on")
{
bodyView.arcBar.IsOffline = false;
@@ -96,7 +96,7 @@
{
return;
}
- var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp));
+ var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
if (temp <= function.GetAttribute(FunctionAttributeKey.Mode).min)
{
return;
@@ -116,7 +116,7 @@
{
return;
}
- var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp));
+ var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
if (temp >= function.GetAttribute(FunctionAttributeKey.SetTemp).max)
{
return;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs
index f588139..a9993b7 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs
@@ -38,6 +38,12 @@
backAction = action;
}
+ public override void RemoveFromParent()
+ {
+ backAction?.Invoke();
+ base.RemoveFromParent();
+ }
+
/// <summary>
/// 鍔犺浇椤甸潰
/// </summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
index f571b61..242fb61 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
@@ -72,6 +72,15 @@
void LoadEvent_ControlEvent()
{
btnCurtainClose.MouseUpEventHandler = (sender, e) => {
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
new System.Threading.Thread(() => {
System.Threading.Thread.Sleep(2000);
Application.RunOnMainThread(() => {
@@ -107,6 +116,15 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
new System.Threading.Thread(() => {
System.Threading.Thread.Sleep(2000);
Application.RunOnMainThread(() => {
@@ -121,6 +139,15 @@
};
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
new System.Threading.Thread(() => {
System.Threading.Thread.Sleep(2000);
Application.RunOnMainThread(() => {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
index 7638d01..87044d5 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -137,6 +137,15 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -156,6 +165,15 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
onCurtainAnimation = false;
new System.Threading.Thread(() =>
{
@@ -174,6 +192,15 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -191,107 +218,108 @@
CurtainAnimation(100);
};
+ if (!function.online)
+ {
+ btnCurtainStop.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainStop.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainOpen.IsSelected = false;
+ };
+ btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainOpen.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
+ };
+ btnCurtainClose.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainClose.IsSelected = true;
+ btnCurtainOpen.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
+ };
- btnCurtainStop.MouseDownEventHandler = (sender, e) =>
- {
- btnCurtainStop.IsSelected = true;
- btnCurtainClose.IsSelected = false;
- btnCurtainOpen.IsSelected = false;
- };
- btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
- {
- btnCurtainOpen.IsSelected = true;
- btnCurtainClose.IsSelected = false;
- btnCurtainStop.IsSelected = false;
- };
- btnCurtainClose.MouseDownEventHandler = (sender, e) =>
- {
- btnCurtainClose.IsSelected = true;
- btnCurtainOpen.IsSelected = false;
- btnCurtainStop.IsSelected = false;
- };
+ //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
+ //{
+ // function.percent--;
+ // controlBar.Progress = function.percent;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.Percent, function.percent.ToString());
+ // DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ //};
- //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
- //{
- // function.percent--;
- // controlBar.Progress = function.percent;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Percent, function.percent.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- //};
+ //btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
+ //{
+ // function.percent++;
+ // controlBar.Progress = function.percent;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.Percent, function.percent.ToString());
+ // DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ //};
- //btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
- //{
- // function.percent++;
- // controlBar.Progress = function.percent;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Percent, function.percent.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- //};
-
- curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
- {
- btnProgress.Text = curtainSeekBar.Progress + "%";
- // controlBar.Progress = curtainSeekBar.Progress;
- // new System.Threading.Thread(() =>
- // {
- // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
- // {
- // function.percent = e;
- // function.refreshTime = DateTime.Now;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add("percent", function.percent.ToString());
- // Control.SendWriteCommand(function, d);
- // }
- // })
- // { IsBackground = true }.Start();
- };
- curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
- {
- btnProgress.Text = curtainSeekBar.Progress + "%";
+ curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
+ {
+ btnProgress.Text = curtainSeekBar.Progress + "%";
+ // controlBar.Progress = curtainSeekBar.Progress;
+ // new System.Threading.Thread(() =>
+ // {
+ // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
+ // {
+ // function.percent = e;
+ // function.refreshTime = DateTime.Now;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add("percent", function.percent.ToString());
+ // Control.SendWriteCommand(function, d);
+ // }
+ // })
+ // { IsBackground = true }.Start();
+ };
+ curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ btnProgress.Text = curtainSeekBar.Progress + "%";
//controlBar.Progress = curtainSeekBar.Progress;
new System.Threading.Thread(() =>
- {
- function.SetAttrState(FunctionAttributeKey.Percent, e);
- function.refreshTime = DateTime.Now;
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- d.Add(FunctionAttributeKey.Percent, e.ToString());
- DriverLayer.Control.Ins.SendWriteCommand(function, d);
- })
- { IsBackground = true }.Start();
- };
+ {
+ function.SetAttrState(FunctionAttributeKey.Percent, e);
+ function.refreshTime = DateTime.Now;
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.Percent, e.ToString());
+ DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ })
+ { IsBackground = true }.Start();
+ };
- //controlBar.OnProgressChangedEvent = (sender, e) =>
- //{
- // curtainSeekBar.Progress = controlBar.Progress;
- // new System.Threading.Thread(() =>
- // {
- // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
- // {
- // function.percent = e;
- // function.refreshTime = DateTime.Now;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add("percent", function.percent.ToString());
- // Control.SendWriteCommand(function, d);
- // }
- // })
- // { IsBackground = true }.Start();
- //};
+ //controlBar.OnProgressChangedEvent = (sender, e) =>
+ //{
+ // curtainSeekBar.Progress = controlBar.Progress;
+ // new System.Threading.Thread(() =>
+ // {
+ // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
+ // {
+ // function.percent = e;
+ // function.refreshTime = DateTime.Now;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add("percent", function.percent.ToString());
+ // Control.SendWriteCommand(function, d);
+ // }
+ // })
+ // { IsBackground = true }.Start();
+ //};
- //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
- //{
- // curtainSeekBar.Progress = controlBar.Progress;
- // new System.Threading.Thread(() =>
- // {
- // function.percent = e;
- // function.refreshTime = DateTime.Now;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add("percent", function.percent.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- // })
- // { IsBackground = true }.Start();
- //};
-
+ //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
+ //{
+ // curtainSeekBar.Progress = controlBar.Progress;
+ // new System.Threading.Thread(() =>
+ // {
+ // function.percent = e;
+ // function.refreshTime = DateTime.Now;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add("percent", function.percent.ToString());
+ // DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ // })
+ // { IsBackground = true }.Start();
+ //};
+ }
}
}
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
index 775b792..94bfddc 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -138,6 +138,15 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -157,6 +166,15 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
new System.Threading.Thread(() => {
System.Threading.Thread.Sleep(2000);
Application.RunOnMainThread(() => {
@@ -173,6 +191,15 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -208,61 +235,63 @@
// DriverLayer.Control.Ins.SendWriteCommand(function, d);
//};
+ if (!function.online)
+ {
- btnCurtainStop.MouseDownEventHandler = (sender, e) =>
- {
- btnCurtainStop.IsSelected = true;
- btnCurtainClose.IsSelected = false;
- btnCurtainOpen.IsSelected = false;
- };
- btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
- {
- btnCurtainOpen.IsSelected = true;
- btnCurtainClose.IsSelected = false;
- btnCurtainStop.IsSelected = false;
- };
- btnCurtainClose.MouseDownEventHandler = (sender, e) =>
- {
- btnCurtainClose.IsSelected = true;
- btnCurtainOpen.IsSelected = false;
- btnCurtainStop.IsSelected = false;
- };
+ btnCurtainStop.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainStop.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainOpen.IsSelected = false;
+ };
+ btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainOpen.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
+ };
+ btnCurtainClose.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainClose.IsSelected = true;
+ btnCurtainOpen.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
+ };
- //curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
- //{
- // controlBar.Progress = curtainSeekBar.Progress;
- // new System.Threading.Thread(() =>
- // {
- // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
- // {
- // function.percent = e;
- // function.refreshTime = DateTime.Now;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add("percent", function.percent.ToString());
- // Control.SendWriteCommand(function, d);
- // }
- // })
- // { IsBackground = true }.Start();
- //};
- curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
- {
+ //curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
+ //{
+ // controlBar.Progress = curtainSeekBar.Progress;
+ // new System.Threading.Thread(() =>
+ // {
+ // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
+ // {
+ // function.percent = e;
+ // function.refreshTime = DateTime.Now;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add("percent", function.percent.ToString());
+ // Control.SendWriteCommand(function, d);
+ // }
+ // })
+ // { IsBackground = true }.Start();
+ //};
+ curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
+ {
//controlBar.Progress = curtainSeekBar.Progress;
btnProgress.Text = curtainSeekBar.Progress + "%";
- new System.Threading.Thread(() =>
- {
- function.SetAttrState(FunctionAttributeKey.Percent, e);
- function.refreshTime = DateTime.Now;
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- d.Add(FunctionAttributeKey.Percent, e.ToString());
- DriverLayer.Control.Ins.SendWriteCommand(function, d);
- })
- { IsBackground = true }.Start();
- };
+ new System.Threading.Thread(() =>
+ {
+ function.SetAttrState(FunctionAttributeKey.Percent, e);
+ function.refreshTime = DateTime.Now;
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.Percent, e.ToString());
+ DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ })
+ { IsBackground = true }.Start();
+ };
- curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
- {
- btnProgress.Text = curtainSeekBar.Progress + "%";
+ curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
+ {
+ btnProgress.Text = curtainSeekBar.Progress + "%";
// new System.Threading.Thread(() =>
// {
// if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
@@ -277,21 +306,21 @@
// { IsBackground = true }.Start();
};
- //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
- //{
- // curtainSeekBar.Progress = controlBar.Progress;
- // btnProgress.Text = curtainSeekBar.Progress + "%";
- // new System.Threading.Thread(() =>
- // {
- // function.SetAttrState(FunctionAttributeKey.Percent, e);
- // function.refreshTime = DateTime.Now;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add("percent", e.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- // })
- // { IsBackground = true }.Start();
- //};
-
+ //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
+ //{
+ // curtainSeekBar.Progress = controlBar.Progress;
+ // btnProgress.Text = curtainSeekBar.Progress + "%";
+ // new System.Threading.Thread(() =>
+ // {
+ // function.SetAttrState(FunctionAttributeKey.Percent, e);
+ // function.refreshTime = DateTime.Now;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add("percent", e.ToString());
+ // DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ // })
+ // { IsBackground = true }.Start();
+ //};
+ }
}
}
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs
index 2a02592..85dcbb1 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs
@@ -52,7 +52,7 @@
base.SetTitleText(Language.StringByID(StringId.DoorLock));
//鍒濆鍖栧ご閮ㄥ巻鍙茶褰曟帶浠�
- this.InitTopHistoryControl();
+ //this.InitTopHistoryControl();
//鍒濆鍖栦腑閮ㄤ俊鎭�
this.InitMiddleFrame();
@@ -173,7 +173,7 @@
//鐢垫睜鍥炬爣
var btnBattery = new BatteryPersentControl();
btnBattery.Y = Application.GetRealHeight(62);
- frameBack.AddChidren(btnBattery, ChidrenBindMode.BindEvent);
+ //frameBack.AddChidren(btnBattery, ChidrenBindMode.BindEvent);
btnBattery.InitControl();
btnBattery.SetValue(80);
btnBattery.X = frameBack.Width - btnBattery.Width - Application.GetRealWidth(12);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
index 6d6f61d..7d9146c 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
@@ -129,7 +129,7 @@
//瀹冩湁涓渶灏忕殑X杞�
batteryControl.X = Application.GetRealWidth(104) > base.btnRoomName.Right ?
Application.GetRealWidth(104) : base.btnRoomName.Right + Application.GetRealWidth(4);
- FrameWhiteCentet1.AddChidren(batteryControl);
+ //FrameWhiteCentet1.AddChidren(batteryControl);
if (batteryControl.Height > base.btnRoomName.Height)
{
//涓�涓槸25锛屼竴涓槸21锛屽紕涓嶅噯鍒板簳璋佹洿楂�,鍥犱负璁$畻鏂规硶涓嶄竴鏍�
@@ -147,7 +147,7 @@
btnOnlineIcon.X = batteryControl.Right + Application.GetRealWidth(12);
btnOnlineIcon.Y = batteryControl.Y;
btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/Connect.png";
- FrameWhiteCentet1.AddChidren(btnOnlineIcon);
+ //FrameWhiteCentet1.AddChidren(btnOnlineIcon);
//鍦ㄧ嚎鏂囨湰
this.btnOnlineView = new NormalViewControl(Application.GetRealWidth(100), btnOnlineIcon.Height, false);
btnOnlineView.X = btnOnlineIcon.Right + Application.GetRealWidth(4);
@@ -155,7 +155,7 @@
btnOnlineView.TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel;
btnOnlineView.TextColor = CSS_Color.PromptingColor1;
btnOnlineView.TextID = StringId.Connected;
- FrameWhiteCentet1.AddChidren(btnOnlineView);
+ //FrameWhiteCentet1.AddChidren(btnOnlineView);
//鍙充笂瑙掗厤缃粨鏉熺殑浜嬩欢
base.SettionFinishEvent += () =>
{
@@ -911,7 +911,17 @@
HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.DeviceNotOnline), null, null, null, 2);
return;
}
- Control.Ins.OneKeyUnlocking(this.device, this.device.GetAttrState("key"));
+ if (UserInfo.Current.VerOpenDoorPw || string.IsNullOrEmpty(UserInfo.Current.doorPasswordString))
+ {
+ var page = new DoorLockUnlockPage(this.device);
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadView();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ }
+ else
+ {
+ Control.Ins.OneKeyUnlocking(this.device, UserInfo.Current.doorPasswordString);
+ }
//绗竴娆′娇鐢紝璇峰厛缁戝畾闂ㄩ攣瀵嗙爜
//HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.PleaseBindTheDoorPswFirst), () =>
//{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs
new file mode 100644
index 0000000..357373a
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs
@@ -0,0 +1,193 @@
+锘縰sing System;
+using HDL_ON.DriverLayer;
+using HDL_ON.Entity;
+using HDL_ON.Stan;
+using HDL_ON.UI.CSS;
+using Shared;
+namespace HDL_ON.UI
+{
+ public class DoorLockUnlockPage : FrameLayout
+ {
+ /// <summary>
+ /// 褰撳墠鐣岄潰
+ /// </summary>
+ FrameLayout bodyView;
+
+ Function device;
+
+ public DoorLockUnlockPage(Function function)
+ {
+ bodyView = this;
+ device = function;
+ }
+
+ /// <summary>
+ /// 鍔犺浇瑙嗗浘
+ /// </summary>
+ public void LoadView()
+ {
+
+ new TopViewDiv(bodyView, Language.StringByID(StringId.PlsEntryPassword)).LoadTopView();
+ bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
+
+
+ var btnMsg = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(100),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(100),
+ TextAlignment = TextAlignment.TopCenter,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextID = StringId.DoorLockEntryPasswordTip,
+ IsMoreLines = true,
+ };
+ bodyView.AddChidren(btnMsg);
+
+ #region 瀵嗙爜濉啓
+ var passwordView = new FrameLayout()
+ {
+ X = Application.GetRealWidth(28),
+ Y = Application.GetRealHeight(200),
+ Width = Application.GetRealWidth(319),
+ Height = Application.GetRealHeight(44),
+ };
+ bodyView.AddChidren(passwordView);
+
+
+ var etPassword = new EditText()
+ {
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ PlaceholderTextColor = CSS_Color.PromptingColor1,
+ PlaceholderText = Language.StringByID(StringId.PlsEntryPassword),
+ SecureTextEntry = true,
+ TextAlignment = TextAlignment.Center,
+ BackgroundColor = CSS_Color.BackgroundColor,
+ IsNumberKeyboardType = true
+ };
+ passwordView.AddChidren(etPassword);
+
+ //var btnVisiblePassword = new Button()
+ //{
+ // X = Application.GetRealWidth(273),
+ // Gravity = Gravity.CenterVertical,
+ // Width = Application.GetMinRealAverage(20),
+ // Height = Application.GetMinRealAverage(20),
+ // UnSelectedImagePath = "LoginIcon/HidePasswordIcon.png",
+ // SelectedImagePath = "LoginIcon/ShowPasswordIcon.png",
+ //};
+ //passwordView.AddChidren(btnVisiblePassword);
+
+ #endregion
+
+
+
+ var frameRow = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(28),
+ Y = Application.GetRealHeight(258),//375 // 667
+ };
+ bodyView.AddChidren(frameRow);
+
+ //鍚屾剰鎸夐挳鑳屾櫙
+ var agreeView = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(28),
+ Width = Application.GetRealWidth(28),
+ X = Application.GetRealWidth(22),
+ };
+ frameRow.AddChidren(agreeView);
+
+ //鍚屾剰鍥炬爣鎸夐挳
+ var agreeBtn = new Button()
+ {
+ Width = Application.GetMinRealAverage(28),
+ Height = Application.GetMinRealAverage(28),
+ UnSelectedImagePath = "Public/ChooseIcon.png",
+ SelectedImagePath = "Public/ChooseOnIcon.png",
+ IsSelected = false,
+ Gravity = Gravity.Center,
+ };
+ agreeView.AddChidren(agreeBtn);
+
+ var agreeTextBtn = new TextButton()
+ {
+ X = agreeView.Right,
+ Width = Application.GetRealWidth(28),
+ Height = Application.GetRealHeight(28),
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextID = StringId.DoorLock5minTip
+ };
+ frameRow.AddChidren(agreeTextBtn);
+ agreeTextBtn.Width = Utlis.GetRealWidthByTextButton(agreeTextBtn);
+
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+ {
+ agreeBtn.IsSelected = !agreeBtn.IsSelected;
+ };
+
+ agreeBtn.MouseUpEventHandler = eventHandler;
+ agreeView.MouseUpEventHandler = eventHandler;
+ agreeTextBtn.MouseUpEventHandler = eventHandler;
+
+
+ Button btnLine = new Button()
+ {
+ Y = Application.GetRealHeight(607),
+ Height = Application.GetRealHeight(1),
+ BackgroundColor = CSS.CSS_Color.DividingLineColor,
+ };
+ bodyView.AddChidren(btnLine);
+
+ Button btnCancel = new Button()
+ {
+ Y = btnLine.Bottom,
+ Width = Application.GetRealWidth(374/2),
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.Cancel,
+ };
+ bodyView.AddChidren(btnCancel);
+ btnCancel.MouseUpEventHandler = (sender, e) => {
+ this.RemoveFromParent();
+ };
+
+ Button btnConfirm = new Button()
+ {
+ X = btnCancel.Right,
+ Y = btnLine.Y,
+ Width = Application.GetRealWidth(376 / 2),
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.Center,
+ //TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.MainBackgroundColor,
+ BackgroundColor = CSS_Color.MainColor,
+ TextID = StringId.Confirm,
+ };
+ bodyView.AddChidren(btnConfirm);
+ btnConfirm.MouseUpEventHandler = (sender, e) => {
+ var password = etPassword.Text.Trim();
+ if (password.Length == 0)
+ {
+ //璁惧涓嶅湪绾�
+ HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.PlsEntryPassword), null, null, null, 2);
+ return;
+ }
+ if (agreeBtn.IsSelected)
+ {
+ UserInfo.Current.doorPasswordString = password;
+ }
+ Control.Ins.OneKeyUnlocking(this.device, etPassword.Text.Trim());
+ this.RemoveFromParent();
+ };
+
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
index 76d2fb3..7021c55 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
@@ -417,6 +417,16 @@
{
btnSwitchIcon.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitchIcon.IsSelected;
new System.Threading.Thread(() =>
{
@@ -429,6 +439,16 @@
};
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitch.IsSelected;
new System.Threading.Thread(() =>
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
index 190b378..d93b021 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -125,10 +125,17 @@
FrameWhiteCentet1.AddChidren(btnDown);
#region 鎺у埗
- btnUp.MouseDownEventHandler = (sender, e) => {
- btnUp.IsSelected = true;
- };
btnUp.MouseUpEventHandler = (sender, e) => {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -143,10 +150,17 @@
Control.Ins.SendWriteCommand(device, d);
};
//----
- btnStop.MouseDownEventHandler = (sender, e) => {
- btnStop.IsSelected = true;
- };
btnStop.MouseUpEventHandler = (sender, e) => {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -160,11 +174,31 @@
d.Add(FunctionAttributeKey.Position, "stop");
Control.Ins.SendWriteCommand(device, d);
};
- //-----
- btnDown.MouseDownEventHandler = (sender, e) => {
- btnDown.IsSelected = true;
- };
+ if (!device.online)
+ {
+ btnUp.MouseDownEventHandler = (sender, e) => {
+ btnUp.IsSelected = true;
+ };
+ btnStop.MouseDownEventHandler = (sender, e) => {
+ btnStop.IsSelected = true;
+ };
+ //-----
+ btnDown.MouseDownEventHandler = (sender, e) =>
+ {
+ btnDown.IsSelected = true;
+ };
+ }
btnDown.MouseUpEventHandler = (sender, e) => {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -208,6 +242,16 @@
EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
string onoff = hotDryView.Lighting ? "false" : "true";
device.SetAttrState(FunctionAttributeKey.HotDry, onoff);
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -237,6 +281,16 @@
EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
string onoff = windDryView.Lighting ? "false" : "true";
device.SetAttrState(FunctionAttributeKey.WindDry, onoff);
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -272,6 +326,16 @@
EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
string onoff = disinfectView.Lighting ? "false" : "true";
device.SetAttrState(FunctionAttributeKey.Disinfect, onoff);
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -312,6 +376,16 @@
EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
string onoff = lightingView.Lighting ? "off" : "on";
device.SetAttrState(FunctionAttributeKey.OnOff, onoff);
Dictionary<string, string> d = new Dictionary<string, string>();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs
index 3d4e0fb..e9ec37c 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs
@@ -74,6 +74,16 @@
functionListView.AddChidren(hotDryTimeCell);
hotDryTimeCell.GoAction = () =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3, Language.StringByID(StringId.HotDryTime));
timeControl.RowHeight = Application.GetRealHeight(50);
timeControl.InitControl(0, 1, 162);
@@ -120,6 +130,16 @@
functionListView.AddChidren(windDryCell);
windDryCell.GoAction = () =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3,Language.StringByID(StringId.WindDryTime));
timeControl.RowHeight = Application.GetRealHeight(50);
timeControl.InitControl(0, 1, 162);
@@ -167,6 +187,16 @@
functionListView.AddChidren(disinfectTimeCell);
disinfectTimeCell.GoAction = () => {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3, Language.StringByID(StringId.DisinfectTime));
timeControl.RowHeight = Application.GetRealHeight(50);
timeControl.InitControl(0, 1, 162);
@@ -215,6 +245,16 @@
anionTimeCell.LineView.RemoveFromParent();
anionTimeCell.GoAction = () => {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3,Language.StringByID(StringId.AnionTime));
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs
index 86a0e73..7dab158 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs
@@ -62,6 +62,16 @@
{
btnSwitchIcon.MouseUpEventHandler += (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitchIcon.IsSelected;
new System.Threading.Thread(() =>
@@ -76,6 +86,16 @@
};
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitch.IsSelected;
new System.Threading.Thread(() =>
@@ -88,18 +108,21 @@
{ IsBackground = true }.Start();
};
- barGradualChange.OnProgressChangedEvent = (sender, e) => {
- function.SetAttrState(FunctionAttributeKey.OpenLevel, e.ToString());
- new System.Threading.Thread(() =>
+ if (!function.online)
+ {
+ barGradualChange.OnProgressChangedEvent = (sender, e) =>
{
- function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
- Control.Ins.SendWriteCommand(function, d);
- })
- { IsBackground = true }.Start();
- };
-
+ function.SetAttrState(FunctionAttributeKey.OpenLevel, e.ToString());
+ new System.Threading.Thread(() =>
+ {
+ function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
+ Control.Ins.SendWriteCommand(function, d);
+ })
+ { IsBackground = true }.Start();
+ };
+ }
}
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs
index c576ebf..c8041d3 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs
@@ -89,6 +89,17 @@
row.AddChidren(btn);
btn.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(attr.key, "");
Control.Ins.SendWriteCommand(device, d);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs
index 5873fdd..df0f1d1 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs
@@ -480,6 +480,16 @@
btn.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
Dictionary<string, string> d = new Dictionary<string, string>();
d.Add(attr.key, "");
Control.Ins.SendWriteCommand(device, d);
@@ -538,6 +548,16 @@
btnChlPlus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -547,6 +567,16 @@
};
btnChlReduce.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -556,6 +586,16 @@
};
btnVolPlus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -565,6 +605,16 @@
};
btnVolReduce.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -574,6 +624,16 @@
};
btnBack.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -583,6 +643,16 @@
};
btnPower.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -609,6 +679,16 @@
};
btnMenu.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -618,6 +698,17 @@
}
};
btnTopMenuUp.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -627,6 +718,17 @@
}
};
btnTopMenuLeft.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -636,6 +738,17 @@
}
};
btnTopMenuRight.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -645,6 +758,17 @@
}
};
btnTopMenuDown.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -654,6 +778,17 @@
}
};
btnOk.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs
index 240cb13..c5c93da 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs
@@ -290,6 +290,16 @@
{
btnSwitchIcon.MouseUpEventHandler += (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitchIcon.IsSelected;
new System.Threading.Thread(() =>
@@ -306,6 +316,16 @@
};
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitch.IsSelected;
new System.Threading.Thread(() =>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/StbPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/StbPage.cs
index 8d323c4..cf97d88 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/StbPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/StbPage.cs
@@ -421,6 +421,16 @@
}
numberView.AddChidren(btn);
btn.MouseUpEventHandler = (sender, e) => {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
string index = (sender as Button).Text;
btn.IsSelected = false;
if (DB_ResidenceData.Instance.GatewayType == 1)
@@ -474,6 +484,16 @@
{
btnMenu.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -483,6 +503,16 @@
};
btnChlPlus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -492,6 +522,16 @@
};
btnChlReduce.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -501,6 +541,16 @@
};
btnVolPlus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -510,6 +560,16 @@
};
btnVolReduce.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -519,6 +579,16 @@
};
btnBack.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -529,6 +599,16 @@
btnMenu.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -538,10 +618,30 @@
};
btn123.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
ShowNumberView();
};
btnMute.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -551,6 +651,16 @@
};
btnPower.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (DB_ResidenceData.Instance.GatewayType == 1)
{
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -560,23 +670,41 @@
};
- btnTopMenuUp.MouseDownEventHandler = (sender, e) => {
- topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconUp.png";
- };
- btnTopMenuDown.MouseDownEventHandler = (sender, e) => {
- topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconDown.png";
- };
- btnTopMenuLeft.MouseDownEventHandler = (sender, e) => {
- topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconLeft.png";
- };
- btnTopMenuRight.MouseDownEventHandler = (sender, e) => {
- topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconRight.png";
- };
- btnOk.MouseDownEventHandler = (sender, e) => {
- topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconOk.png";
- };
+ if (!device.online)
+ {
+ btnTopMenuUp.MouseDownEventHandler = (sender, e) =>
+ {
+ topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconUp.png";
+ };
+ btnTopMenuDown.MouseDownEventHandler = (sender, e) =>
+ {
+ topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconDown.png";
+ };
+ btnTopMenuLeft.MouseDownEventHandler = (sender, e) =>
+ {
+ topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconLeft.png";
+ };
+ btnTopMenuRight.MouseDownEventHandler = (sender, e) =>
+ {
+ topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconRight.png";
+ };
+ btnOk.MouseDownEventHandler = (sender, e) =>
+ {
+ topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIconOk.png";
+ };
+ }
btnMenu.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -586,6 +714,17 @@
}
};
btnTopMenuUp.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -595,6 +734,17 @@
}
};
btnTopMenuLeft.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -604,6 +754,17 @@
}
};
btnTopMenuRight.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -613,6 +774,17 @@
}
};
btnTopMenuDown.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -622,6 +794,17 @@
}
};
btnOk.MouseUpEventHandler = (sender, e) => {
+
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
topMenuView.BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png";
if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -788,6 +971,16 @@
btn.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
Dictionary<string, string> d = new Dictionary<string, string>();
d.Add(attr.key, "");
Control.Ins.SendWriteCommand(device, d);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs
index 5fbf109..ff71d51 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs
@@ -40,6 +40,16 @@
/// </summary>
void LoadControlEvent()
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnChangeTVAV.MouseUpEventHandler = (sender, e) =>
{
if (DB_ResidenceData.Instance.GatewayType == 1)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs
index 2074184..0bc953c 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs
@@ -539,7 +539,17 @@
/// </summary>
/// <param name="value">auto:鑷姩 sleep:鐫$湢 manual:鎵嬪姩 strong:寮虹儓</param>
private void SendModeComand(string value)
- {
+ {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
this.btnMode.CanClick = false;
HdlThreadLogic.Current.RunThread(() =>
{
@@ -558,7 +568,17 @@
/// </summary>
/// <param name="value">canel:鍙栨秷 1:1灏忔椂 2:2灏忔椂 3:4灏忔椂 4:8灏忔椂</param>
private void SendTimingComand(string value)
- {
+ {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
this.btnTime.CanClick = false;
HdlThreadLogic.Current.RunThread(() =>
{
@@ -577,7 +597,17 @@
/// </summary>
/// <param name="value">1:浣庢。 2:涓。 3:楂樻。</param>
private void SendFanSpeedComand(string value)
- {
+ {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
this.btnFan.CanClick = false;
HdlThreadLogic.Current.RunThread(() =>
{
@@ -595,7 +625,17 @@
/// 鍙戦�佸紑鍏冲懡浠�
/// </summary>
private void SendSwitchComand()
- {
+ {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
this.btnPictrue.CanClick = false;
this.btnSwitch.CanClick = false;
@@ -622,7 +662,17 @@
/// 鍙戦�佷娇鑳藉懡浠�
/// </summary>
private void SendEnableComand(MostRightIconControl btnSwitch, string sendKey, string value)
- {
+ {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (btnSwitch != null)
{
btnSwitch.CanClick = false;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaFanPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaFanPage.cs
index c280a90..df3ecc3 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaFanPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaFanPage.cs
@@ -97,21 +97,25 @@
//鍒锋柊鐣岄潰鐘舵��
this.RefreshFormStatu(false);
//妗�
- var strView = Language.StringByID(StringId.Gear);
- seekBarContr.ProgressChangedEvent += (div, value) =>
- {
- this.btnNowGear.Text = value + strView;
- //婊戝姩涓�
- if (div == 0) { this.fanData.IsProgressing = true; }
- //婊戝姩缁撴潫
- else
- {
- this.fanData.IsProgressing = false;
- this.fanData.ProgressEndTime = DateTime.Now;
- //鍙戦�侀閫熷懡浠�
- this.SendSpeedComand(value);
- }
- };
+ var strView = Language.StringByID(StringId.Gear);
+
+ if (device.online)
+ {
+ seekBarContr.ProgressChangedEvent += (div, value) =>
+ {
+ this.btnNowGear.Text = value + strView;
+ //婊戝姩涓�
+ if (div == 0) { this.fanData.IsProgressing = true; }
+ //婊戝姩缁撴潫
+ else
+ {
+ this.fanData.IsProgressing = false;
+ this.fanData.ProgressEndTime = DateTime.Now;
+ //鍙戦�侀閫熷懡浠�
+ this.SendSpeedComand(value);
+ }
+ };
+ }
}
#endregion
@@ -174,7 +178,17 @@
/// 鍙戦�佸紑鍏冲懡浠�
/// </summary>
private void SendSwitchComand()
- {
+ {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
this.btnSwitch.CanClick = false;
string statu = this.btnSwitch.IsSelected == true ? "off" : "on";
@@ -194,7 +208,8 @@
/// 鍙戦�侀閫熷懡浠�
/// </summary>
private void SendSpeedComand(int value)
- {
+ {
+
var dic = new Dictionary<string, string>();
dic.Add("fan_speed_percent", value.ToString());
Control.Ins.SendWriteCommand(this.device, dic, true);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs
index 73e6c7a..3d08b88 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs
@@ -167,6 +167,16 @@
/// </summary>
private void SendSwitchComand()
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
this.btnPictrue.CanClick = false;
this.btnSwitch.CanClick = false;
@@ -272,6 +282,16 @@
private void SetControlTime()
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
var timeControl = new BottomTimeSelectControl();
timeControl.RowCount = 5;
timeControl.InitControl(0,0);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs
index 8532e4a..0b3bf1b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs
@@ -86,6 +86,16 @@
btnSwitch.IsSelected = i_brushStatu;
btnSwitch.ButtonClickEvent += (sender, e) =>
{
+ if (!i_device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
if (btnSwitch.IsSelected == true)
{
//鍙栨秷鐨勮瘽鐩存帴鍙栨秷
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs
index 2368509..1fa0b85 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs
@@ -454,7 +454,17 @@
/// 鍙戦�佸懡浠�
/// </summary>
private void SendComand(string key, string i_value)
- {
+ {
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
HdlThreadLogic.Current.RunThread(() =>
{
var dic = new Dictionary<string, string>();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs
index 967b540..cf7936f 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs
@@ -713,7 +713,7 @@
sensorSPK = showList[0].spk;
foreach (var s in showList)
{
- assembleValues += Convert.ToDouble(s.GetAttrState("value"));
+ assembleValues += Convert.ToDouble(s.GetAttrState("value").Replace(",", "."));
}
@@ -1011,7 +1011,7 @@
assembleValues = 0;
foreach (var s in sensorList)
{
- assembleValues += Convert.ToDouble(s.GetAttrState("value"));
+ assembleValues += Convert.ToDouble(s.GetAttrState("value").Replace(",", "."));
}
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
index 5a8281e..5782d56 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
@@ -19,9 +19,9 @@
{
return;
}
- var outinTemp = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp)));
+ var outinTemp = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")));
bodyView.btnTemp.Text = outinTemp.ToString();
- bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp))) + "掳C";
+ bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C";
bodyView.btnMode.SelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode));
bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode),false);
bodyView.arcBar.Progress = outinTemp;
@@ -129,6 +129,16 @@
/// </summary>
void LoadEvent_TempChange()
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnMinus.MouseUpEventHandler = (sender, e) =>
{
if(function.trait_on_off.curValue.ToString() == "off")
@@ -136,7 +146,7 @@
return;
}
- var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp));
+ var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
if (temp <= Convert.ToInt32(function.GetAttribute(FunctionAttributeKey.SetTemp).min))
{
return;
@@ -156,7 +166,7 @@
{
return;
}
- var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp));
+ var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
if (temp >= Convert.ToDouble(function.GetAttribute(FunctionAttributeKey.SetTemp).max))
{
return;
@@ -181,7 +191,7 @@
arcBar.OnProgressChangedEvent = (sender, e) =>
{
function.SetAttrState(FunctionAttributeKey.SetTemp, e);
- btnTemp.Text = Convert.ToDouble( function.GetAttrState(FunctionAttributeKey.SetTemp)).ToString();
+ btnTemp.Text = Convert.ToDouble( function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString();
};
}
/// <summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
index 704093f..feb241d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -44,6 +44,13 @@
function = func;
actionRefresh = action;
}
+
+ public override void RemoveFromParent()
+ {
+ actionRefresh?.Invoke();
+ base.RemoveFromParent();
+ }
+
/// <summary>
/// 鍔犺浇鐣岄潰
/// </summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
index c5349dd..8ab3dc2 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
@@ -85,7 +85,17 @@
/// 淇敼鑹叉俯
/// </summary>
void LoadEvet_ChangeColorTemplatrue()
- {
+ {
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
barColorTemplatrue.OnProgressChangedEvent += (sender, value) =>
{
new System.Threading.Thread(() =>
@@ -129,11 +139,18 @@
/// </summary>
void LoadEvent_DimmerBar()
{
- dimmerBar.OnStartTrackingTouchEvent = (sender, e) => {
- onDimmerBar = true;
- };
dimmerBar.OnStopTrackingTouchEvent = (sender, e) =>
- {
+ {
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
onDimmerBar = false;
function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
@@ -143,48 +160,54 @@
btnBrightnessText.Text = dimmerBar.Progress + "%";
dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
- };
- dimmerBar.OnProgressChangedEvent = (sender, e) =>
- {
- dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
- //function.fadeTime = 0;
- //if (!btnSwitch.IsSelected)
- //{
- // dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
- //}
- //btnSwitch.IsSelected = e > 0 ? true : false;
- //function.brightness = e;
- //function.trait_on_off.curValue = e > 0 ? "on" : "off";
-
- //if (e == 0 || e == 100)
- //{
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Brightness, function.brightness.ToString());
- // Control.Ins.SendWriteCommand(function, d);
- //}
- //else
- //{
- // if (200 < (DateTime.Now - function.refreshTime).TotalMilliseconds)
- // {
- // function.refreshTime = DateTime.Now;
- // new System.Threading.Thread(() =>
- // {
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Brightness, function.brightness.ToString());
- // Control.Ins.SendWriteCommand(function, d);
- // })
- // { IsBackground = true }.Start();
- // }
- //}
-
- //btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16 - 16) / 100) + Application.GetRealWidth(40);
- //btnBrightnessText.Text = function.brightness + "%";
-
+ };
+ if (function.online)
+ {
+ dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
+ {
+ onDimmerBar = true;
+ };
+ dimmerBar.OnProgressChangedEvent = (sender, e) =>
+ {
+ dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
+ //function.fadeTime = 0;
+ //if (!btnSwitch.IsSelected)
+ //{
+ // dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
+ //}
+ //btnSwitch.IsSelected = e > 0 ? true : false;
+ //function.brightness = e;
+ //function.trait_on_off.curValue = e > 0 ? "on" : "off";
+
+ //if (e == 0 || e == 100)
+ //{
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.Brightness, function.brightness.ToString());
+ // Control.Ins.SendWriteCommand(function, d);
+ //}
+ //else
+ //{
+ // if (200 < (DateTime.Now - function.refreshTime).TotalMilliseconds)
+ // {
+ // function.refreshTime = DateTime.Now;
+ // new System.Threading.Thread(() =>
+ // {
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.Brightness, function.brightness.ToString());
+ // Control.Ins.SendWriteCommand(function, d);
+ // })
+ // { IsBackground = true }.Start();
+ // }
+ //}
+
+ //btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16 - 16) / 100) + Application.GetRealWidth(40);
+ //btnBrightnessText.Text = function.brightness + "%";
+
btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80);
- btnBrightnessText.Text = dimmerBar.Progress + "%";
- };
-
-
+ btnBrightnessText.Text = dimmerBar.Progress + "%";
+ };
+
+ }
}
/// <summary>
@@ -193,7 +216,17 @@
void LoadSwitchEvent()
{
btnSwitch.MouseUpEventHandler += (sender, e) =>
- {
+ {
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
//function.fadeTime = barFadeTime.Progress;
btnSwitch.IsSelected = !btnSwitch.IsSelected;
if (btnSwitch.IsSelected)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
index bc1193d..a8d34a9 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -88,21 +88,25 @@
/// </summary>
void LoadEvent_DimmerBar()
{
- dimmerBar.OnStartTrackingTouchEvent = (sender, e) => {
- onDimmerBar = true;
- };
- dimmerBar.OnStopTrackingTouchEvent = (sender, e) => {
- onDimmerBar = false;
- function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress);
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString());
- Control.Ins.SendWriteCommand(function, d);
- btnBrightnessText.Text = dimmerBar.Progress + "%";
- };
- //20201223 鍒犻櫎婊戝姩鍙戦�佸懡浠わ紝闃叉鎺т欢璺冲姩
- dimmerBar.OnProgressChangedEvent = (sender, e) =>
+ if (function.online)
{
- dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
+ dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
+ {
+ onDimmerBar = true;
+ };
+ dimmerBar.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ onDimmerBar = false;
+ function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress);
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString());
+ Control.Ins.SendWriteCommand(function, d);
+ btnBrightnessText.Text = dimmerBar.Progress + "%";
+ };
+ //20201223 鍒犻櫎婊戝姩鍙戦�佸懡浠わ紝闃叉鎺т欢璺冲姩
+ dimmerBar.OnProgressChangedEvent = (sender, e) =>
+ {
+ dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
//function.fadeTime = 0;
//if (!btnSwitch.IsSelected)
//{
@@ -133,10 +137,10 @@
// }
//}
btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(288 - 16 - 16) / 100) + Application.GetRealWidth(40);
- btnBrightnessText.Text = dimmerBar.Progress + "%";
- };
+ btnBrightnessText.Text = dimmerBar.Progress + "%";
+ };
+ }
}
-
/// <summary>
/// 鍔犺浇寮�鍏充簨浠�
/// </summary>
@@ -144,6 +148,16 @@
{
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitch.IsSelected = !btnSwitch.IsSelected;
if (btnSwitch.IsSelected)
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
index 8281d85..ef4bf1b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
@@ -88,6 +88,16 @@
/// </summary>
void LoadColorChangeEvent()
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
DateTime colorChangeTime = DateTime.MinValue;
//bool send = false;
@@ -202,11 +212,21 @@
/// </summary>
void LoadEvent_DimmerBar()
{
- dimmerBar.OnStartTrackingTouchEvent = (sender, e)=>{
- onDimmerBar = true;
- };
- dimmerBar.OnStopTrackingTouchEvent = (sender, e) => {
- new System.Threading.Thread(() => {
+
+ dimmerBar.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
+ new System.Threading.Thread(() =>
+ {
System.Threading.Thread.Sleep(200);
onDimmerBar = false;
})
@@ -214,47 +234,54 @@
function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString());
-
+
Control.Ins.SendWriteCommand(function, d);
};
- dimmerBar.OnProgressChangedEvent = (sender, e) => {
- //function.fadeTime = 0;
- //if (!btnSwitch.IsSelected)
- //{
- // dimmerBar.ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1;
- //}
- //btnSwitch.IsSelected = e > 0 ? true : false;
- //function.brightness = e;
- //function.trait_on_off.curValue = e > 0 ? "on" : "off";
+ if (function.online)
+ {
+ dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
+ {
+ onDimmerBar = true;
+ };
+ dimmerBar.OnProgressChangedEvent = (sender, e) =>
+ {
+ //function.fadeTime = 0;
+ //if (!btnSwitch.IsSelected)
+ //{
+ // dimmerBar.ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1;
+ //}
+ //btnSwitch.IsSelected = e > 0 ? true : false;
+ //function.brightness = e;
+ //function.trait_on_off.curValue = e > 0 ? "on" : "off";
- //if (e == 0 || e == 100)
- //{
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Brightness, function.brightness.ToString());
- // Control.Ins.SendWriteCommand(function, d);
- //}
- //else
- //{
- // if (200 < (DateTime.Now - function.refreshTime).TotalMilliseconds)
- // {
- // function.refreshTime = DateTime.Now;
- // new System.Threading.Thread(() =>
- // {
- // //Control.Send(CommandType_A.write, function);
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Brightness, function.brightness.ToString());
- // Control.Ins.SendWriteCommand(function, d);
- // })
- // { IsBackground = true }.Start();
- // }
- // else
- // {
- // MainPage.Log("skip dimmer control!!");
- // }
- //}
- };
+ //if (e == 0 || e == 100)
+ //{
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.Brightness, function.brightness.ToString());
+ // Control.Ins.SendWriteCommand(function, d);
+ //}
+ //else
+ //{
+ // if (200 < (DateTime.Now - function.refreshTime).TotalMilliseconds)
+ // {
+ // function.refreshTime = DateTime.Now;
+ // new System.Threading.Thread(() =>
+ // {
+ // //Control.Send(CommandType_A.write, function);
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.Brightness, function.brightness.ToString());
+ // Control.Ins.SendWriteCommand(function, d);
+ // })
+ // { IsBackground = true }.Start();
+ // }
+ // else
+ // {
+ // MainPage.Log("skip dimmer control!!");
+ // }
+ //}
+ };
+ }
}
-
/// <summary>
/// 淇敼鐏厜娓愬彉鏃堕棿
/// </summary>
@@ -309,6 +336,10 @@
{
btnRestoredPoint.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ return;
+ }
if(function.trait_on_off.curValue.ToString() == "off")
{
return;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs
index 6fc5a4a..d71f38a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs
@@ -62,6 +62,16 @@
{
btnSwitchIcon.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitchIcon.IsSelected;
new System.Threading.Thread(() =>
{
@@ -74,6 +84,16 @@
};
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitch.IsSelected;
new System.Threading.Thread(() =>
{
diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs
index f61de04..56a78a0 100644
--- a/SiriIntents/Server/HttpUtil.cs
+++ b/SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,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>
--
Gitblit v1.8.0