From 1802b849f0dadc81644fb0a706d6fb45efdf2a20 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 24 十一月 2021 16:13:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/newBranch1' into WJC
---
HDL-ON_iOS/ViewController.cs | 3
HDL-ON_Android/Properties/AndroidManifest.xml | 4
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs | 131 ++++----
HDL-ON_iOS/HDL-ON_iOS.csproj | 9
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs | 4
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs | 8
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 14
HDL-ON_iOS/AppDelegate.cs | 31 ++
HDL_ON/DAL/Mqtt/MqttClient.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs | 134 ++++----
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs | 19
HDL-ON_iOS/Info.plist | 10
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs | 16
HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 25 +
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs | 70 ++++
.vs/HDL_APP_Project/xs/UserPrefs.xml | 44 +-
HDL_ON/UI/MainPage.cs | 82 +++++
HDL_ON/UI/UI1-Login/LoginPage.cs | 2
HDL_ON/Entity/Function/Scene.cs | 32 +
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs | 99 +++--
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs | 12
HDL-ON_iOS/Entitlements.plist | 2
HDL_ON/DAL/Server/NewAPI.cs | 4
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 88 ++--
HDL_ON/DAL/Server/HttpServerRequest.cs | 26 +
25 files changed, 572 insertions(+), 299 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index df83ea1..19047f3 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,23 +1,25 @@
-锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
- <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget." />
- <MonoDevelop.Ide.Workbench>
+锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
+ <MonoDevelop.Ide.ItemProperties.SiriIntentUI>
+ <MonoDevelop.MacDev.AppleDevelopmentTeam />
+ </MonoDevelop.Ide.ItemProperties.SiriIntentUI>
+ <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" />
+ <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Server/HttpUtil.cs">
+ <Files>
+ <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs" Line="203" Column="17" IsPinned="True" />
+ <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="79" />
+ </Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="HDL_APP_Project" expanded="True">
- <Node name="HDL_ON" expanded="True">
- <Node name="UI" expanded="True">
- <Node name="UI2" expanded="True">
- <Node name="3-Intelligence" expanded="True">
- <Node name="Automation" expanded="True" />
- </Node>
- </Node>
- <Node name="MainPage.cs" selected="True" />
- </Node>
- </Node>
- <Node name="HDL-ON_Android" expanded="True" />
- <Node name="HDL-ON_iOS" expanded="True" />
+ <Node name="HDL-ON_iOS" expanded="True" selected="True" />
</Node>
+ </State>
+ </Pad>
+ <Pad Id="MonoDevelop.Debugger.WatchPad">
+ <State>
+ <Value>tempFunction.deviceId</Value>
+ <Value>updata2.ToString()</Value>
</State>
</Pad>
</Pads>
@@ -27,13 +29,17 @@
<String>Shared.IOS.TBL/Shared.IOS.TBL.csproj</String>
<String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
<String>Shared.IOS/Shared.IOS.csproj</String>
+ <String>SiriIntent/SiriIntent.csproj</String>
+ <String>SceneKit/SceneKit.csproj</String>
</DisabledProjects>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
- <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.2ffc9a07" />
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
+ <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore>
- <Breakpoint file="/Users/hdl/Desktop/git/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="1415" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="28" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL-ON_iOS/Other/SkipControl.cs" relfile="HDL-ON_iOS/Other/SkipControl.cs" line="25" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="14" column="1" />
</BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
-</Properties>
\ No newline at end of file
+</Properties>
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 81ae197..5533d7f 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="202111031" android:versionName="1.3.202111031" package="com.hdl.onpro">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202111231" android:versionName="1.3.202111231" package="com.hdl.onpro">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
<!-- 涔愭鍙瀵硅闇�瑕佺殑鏉冮檺 -->
<!--<uses-permission android:name="android.permission.INTERNET" />-->
@@ -82,7 +82,7 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_LOGS" />
<!-- 鏋佸厜鎺ㄩ�佺粨鏉� -->
- <application android:allowBackup="true" android:icon="@drawable/Icon" android:networkSecurityConfig="@xml/network_security_config" android:largeHeap="true" android:label="ON+">
+ <application android:allowBackup="true" android:icon="@drawable/Icon" android:networkSecurityConfig="@xml/network_security_config" android:largeHeap="true" android:label="On Pro">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="com.hdl.onpro.fileProvider" android:grantUriPermissions="true" android:exported="false">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index e2fb0ec..2d22046 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -1,4 +1,4 @@
-锘縰sing System;
+锘縰sing System;
using Foundation;
using HDL_ON;
using Shared;
@@ -9,6 +9,7 @@
using Microsoft.AppCenter.Crashes;
using HDL_ON.UI;
using HDL_ON.DAL.Server;
+using Intents;
namespace SharedMethod
{
@@ -275,6 +276,34 @@
//{
// //RemoteInfo.Current.ReadMsgList(true);
//}
+
+ #region Siri
+ // Request access to Siri
+ INPreferences.RequestSiriAuthorization((INSiriAuthorizationStatus status) => {
+ // Respond to returned status
+ switch (status)
+ {
+ case INSiriAuthorizationStatus.Authorized:
+ break;
+ case INSiriAuthorizationStatus.Denied:
+ break;
+ case INSiriAuthorizationStatus.NotDetermined:
+ break;
+ case INSiriAuthorizationStatus.Restricted:
+ break;
+ }
+ });
+
+ var language = INPreferences.SiriLanguageCode;
+
+ // Take action based on language
+ if (language == "en-US")
+ {
+ // Do something...
+ }
+
+ #endregion
+
//楂樺痉key
GDMapKit.setGDApiKey("f0635ea15c5d579c6e93d9f07a06da69");
Console.WriteLine("FinishedLaunching");
diff --git a/HDL-ON_iOS/Entitlements.plist b/HDL-ON_iOS/Entitlements.plist
index f6d873f..cb782f8 100644
--- a/HDL-ON_iOS/Entitlements.plist
+++ b/HDL-ON_iOS/Entitlements.plist
@@ -8,5 +8,7 @@
<array>
<string>applinks:china-gateway.hdlcontrol.com</string>
</array>
+ <key>com.apple.developer.siri</key>
+ <true/>
</dict>
</plist>
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 0877629..5704978 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -54,7 +54,7 @@
<MtouchLink>SdkOnly</MtouchLink>
<MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
<MtouchEnableSGenConc>false</MtouchEnableSGenConc>
-<CodesignProvision>On+Dev-20210913-1</CodesignProvision>
+<CodesignProvision>OnPro211116-1</CodesignProvision>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
@@ -69,7 +69,7 @@
<MtouchLink>SdkOnly</MtouchLink>
<MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
<MtouchI18n>cjk</MtouchI18n>
- <CodesignProvision>ComHdlOnProAdHoc20210616-1</CodesignProvision>
+ <CodesignProvision>OnPro-Hoc20211117-1</CodesignProvision>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -1401,6 +1401,11 @@
<Project>{2DDF4C3C-6998-432E-9F43-6786D82F0630}</Project>
<Name>Blufi</Name>
</ProjectReference>
+ <ProjectReference Include="..\SiriIntentUI\SiriIntentUI.csproj">
+ <IsAppExtension>true</IsAppExtension>
+ <Project>{B594D3F5-4B93-4988-B45E-150BBFDC8A43}</Project>
+ <Name>SiriIntentUI</Name>
+ </ProjectReference>
</ItemGroup>
<Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index be3c8cc..edd4751 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -92,17 +92,17 @@
<key>XSLaunchImageAssets</key>
<string>Assets.xcassets/LaunchImage.launchimage</string>
<key>CFBundleName</key>
- <string>ON +</string>
+ <string>On Pro</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>CFBundleDisplayName</key>
- <string>ON +</string>
+ <string>On Pro</string>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>CFBundleShortVersionString</key>
- <string>1.2.202110281</string>
+ <string>1.3.202111231</string>
<key>CFBundleVersion</key>
- <string>1.2.10281</string>
+ <string>1.3.11231</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Use geographic location to provide services such as weather</string>
<key>NSAppleMusicUsageDescription</key>
@@ -133,5 +133,7 @@
<string>This application uses Bluetooth to communicate with the device, this application does not collect, store or record any data that communicates via Bluetooth.</string>
<key>NSVoIPUsageDescription</key>
<string>Make audio/video calls</string>
+ <key>NSSiriUsageDescription</key>
+ <string>On Pro data will be send to Siri.</string>
</dict>
</plist>
diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs
index ddecb00..05e8540 100644
--- a/HDL-ON_iOS/ViewController.cs
+++ b/HDL-ON_iOS/ViewController.cs
@@ -24,7 +24,6 @@
public override void ViewDidLoad()
{
- Console.WriteLine("qidong 1111");
base.ViewDidLoad();
HDL_ON.MainPage.Show();
@@ -97,5 +96,7 @@
// MainPage.InternetStatus = 2;
//}
}
+
+
}
}
\ No newline at end of file
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 1974da4..b638339 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -310,7 +310,7 @@
try
{
var topic = e.ApplicationMessage.Topic;
- MainPage.Log($"鏀跺埌mqtt涓婚:{topic}");
+ //MainPage.Log($"鏀跺埌mqtt涓婚:{topic}");
//涓�绔彛涓婚澶勭悊
if (DB_ResidenceData.Instance.GatewayType == 0 && !DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
{
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 1fbd42c..8f2d089 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -2556,10 +2556,10 @@
var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson);
}
-#endregion
+ #endregion
-#region 鈻� 鍙瀵硅_________________________
+ #region 鈻� 鍙瀵硅_________________________
/// <summary>
/// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋�
/// </summary>
@@ -2572,9 +2572,9 @@
var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson);
return pack;
}
-#endregion
+ #endregion
-#region 鈻� 闂ㄩ攣鐩稿叧____________________________
+ #region 鈻� 闂ㄩ攣鐩稿叧____________________________
/// <summary>
/// 鑾峰彇闂ㄩ攣鍘嗗彶璁板綍(鎸夋棩鏈熼檷搴�)
@@ -2643,8 +2643,8 @@
return listSortLog;
}
-#endregion
-#region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________
+ #endregion
+ #region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________
/// <summary>
/// 鑾峰彇宸叉巿鏉冪殑闊崇鍒楄〃
/// </summary>
@@ -2708,8 +2708,20 @@
var requestJson = HttpUtil.GetSignRequestJson(updateSpeakerDeviceListObj);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_DeviceList_Update, requestJson);
}
-#endregion
+ #endregion
+ /// <summary>
+ /// 缁戝畾source闈㈡澘
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew BindSourcePanel(string qrString)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("content", qrString);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_BindSourcePanel, requestJson);
+ }
/// <summary>
/// 浜鸿劯褰曞叆
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index d39f52d..3314fee 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -734,6 +734,10 @@
#region 鈻� -- SIP鐩稿叧鎺ュ彛_______________________________
#endregion
+ /// <summary>
+ /// 缁戝畾source闈㈡澘
+ /// </summary>
+ public const string Api_Post_BindSourcePanel = "/home-wisdom/source/screen/home/bind";
}
diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index 693db8d..684aad0 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -223,6 +223,18 @@
return "SceneData_" + sid;
}
}
+
+ /// <summary>
+ /// 鎵ц鍊掕鏃�
+ /// </summary>
+ int countdownTime = 0;
+ /// <summary>
+ /// 閲嶇疆鎵ц鍊掕鏃�
+ /// </summary>
+ public void ResetCountdownTime()
+ {
+ countdownTime = 0;
+ }
/// <summary>
/// 鍦烘櫙鎵ц\鍊掕鏃�
/// </summary>
@@ -232,31 +244,30 @@
//鍦烘櫙姝e湪鍊掕鏃舵墽琛屼腑
if (LastExecutionTime != "" && Convert.ToDouble(LastExecutionTime) + Convert.ToDouble(delay) > Convert.ToDouble(Utlis.GetTimestamp(false)))
{
- int time = 0;
int.TryParse(Convert.ToInt32(
Convert.ToDouble(LastExecutionTime) + Convert.ToDouble(delay) - Convert.ToDouble(Utlis.GetTimestamp(false))
- ).ToString(), out time);
- if (time > 0)
+ ).ToString(), out countdownTime);
+ if (countdownTime > 0)
{
new System.Threading.Thread(() =>
{
- if (time > 0)
+ if (countdownTime > 0)
{
- while (time > 0)
+ while (countdownTime > 0)
{
Application.RunOnMainThread(() =>
{
- if (time > 60)
+ if (countdownTime > 60)
{
- btnShowDelay.Text = (time / 60).ToString() + "min" + time % 60 + "s";
+ btnShowDelay.Text = (countdownTime / 60).ToString() + "min" + countdownTime % 60 + "s";
}
else
{
- btnShowDelay.Text = time.ToString() + "s";
+ btnShowDelay.Text = countdownTime.ToString() + "s";
}
});
System.Threading.Thread.Sleep(1000);
- time--;
+ countdownTime--;
}
Application.RunOnMainThread(() =>
{
@@ -317,6 +328,8 @@
var revPack = pm.EditScene(this);
if (revPack.Code == StateCode.SUCCESS)
{
+ //閲嶇疆鎵ц鍊掕鏃�
+ this.countdownTime = 0;
if(MainPage.NoLoginMode)
{
var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this));
@@ -349,6 +362,7 @@
var revPack = pm.EditScene(this);
if (revPack.Code == StateCode.SUCCESS)
{
+ this.countdownTime = 0;
var scenes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(revPack.Data.ToString());
var tempScene = scenes.Find((obj) => obj.sid == sid);
if (tempScene != null)
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 5c0af7d..a36e803 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -33,7 +33,7 @@
//public static string ClientType = APIClientType.HDL_ON_PRO.ToString();
/// <summary>
- ///
+ ///
/// </summary>
public static Entity.CityInfo cityInfo = new Entity.CityInfo();
/// <summary>
@@ -86,8 +86,84 @@
/// </summary>
public static bool Increase
{
- get
- {
+
+ /// <summary>
+ /// BaseView
+ /// </summary>
+ public static FrameLayout BaseView { get; internal set; }
+ /// <summary>
+ /// BasePageView
+ /// </summary>
+ public static PageLayout BasePageView { get; set; }
+ /// <summary>
+ /// 鐢ㄦ埛鎺у埗鐖跺鍣�
+ /// </summary>
+ public static UserPage UserBasePage;
+ /// <summary>
+ /// 鐗堟湰鍙�
+ /// </summary>
+ public static string VersionString = "1.3.1123";
+ ///// <summary>
+ ///// 瀹㈡埛绔被鍨�
+ ///// </summary>
+ //public static string ClientType = APIClientType.HDL_ON_PRO.ToString();
+
+ /// <summary>
+ ///
+ /// </summary>
+ public static Entity.CityInfo cityInfo = new Entity.CityInfo();
+ /// <summary>
+ /// 澶╂皵鍒锋柊action
+ /// </summary>
+ public static Action RefreshAir;
+ /// <summary>
+ /// 鍥為��椤甸潰action 娌℃湁闇�瑕佸彲浠ヤ笉鐢�
+ /// </summary>
+ public static Action ReturnRefreshAction;
+ /// <summary>
+ /// 鏃犵櫥褰曟ā寮�
+ /// </summary>
+ public static bool NoLoginMode = false;
+ /// <summary>
+ /// 缃戠粶杩炴帴鐘舵��
+ /// 0:鏃犵綉缁�
+ /// </summary>
+ public static int InternetStatus = 2;
+ /// <summary>
+ /// 鏄惁杩涘叆鍚庡彴
+ /// </summary>
+ public static bool IsEnterBackground = false;
+ /// <summary>
+ /// 褰撳墠鍒嗛〉绱㈠紩
+ /// 0:鏀惰棌
+ /// 1:鍒嗙被
+ /// 2:鏅鸿兘
+ /// 3:涓汉
+ /// </summary>
+ public static int CurPageIndex = 9999;
+
+ ///// <summary>
+ ///// 鍏徃浠g爜
+ ///// 棰勭暀绗笁鏂瑰畾鍒舵爣璁�
+ ///// 0:HDL
+ ///// </summary>
+ //public static int Company = 0;
+
+ /// <summary>
+ /// 鍙虫粦鍚庨��鎻愮ず鎸夐挳
+ /// </summary>
+ public static Button BtnBackIcon;
+ /// <summary>
+ /// 鍚庨��鍙虫粦浜嗗灏戣窛绂伙紝瓒呰繃涓�瀹氳窛绂绘墠瑙﹀彂鍚庨��浜嬩欢
+ /// </summary>
+ public static int StartX = 0;
+ /// <summary>
+ /// 鏄惁鍏ㄩ潰灞忔墜鏈�
+ /// </summary>
+ public static bool Increase
+ {
+ get
+ {
#if __IOS__
if (Application.PhoneType>10)
{
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
index 33dacc8..e3b259b 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -412,14 +412,15 @@
})
{ IsBackground = true }.Start();
}
-
/// <summary>
/// 鍔犺浇鎻愮ず寮圭獥
/// </summary>
- /// <param name="titleId"></param>
- /// <param name="msgId"></param>
- public void TipMsg(int titleId, int msgId,Action action = null)
+ /// <param name="title"></param>
+ /// <param name="msg"></param>
+ /// <param name="action"></param>
+ public void TipMsg(string title, string msg, Action action = null)
{
+
Dialog dialog = new Dialog()
{
BackgroundColor = CSS_Color.DialogTransparentColor1,
@@ -445,7 +446,7 @@
TextSize = CSS_FontSize.SubheadingFontSize,
TextAlignment = TextAlignment.Center,
IsBold = true,
- TextID = titleId,
+ Text = title
};
contentView.AddChidren(btnTitle);
@@ -458,7 +459,7 @@
TextAlignment = TextAlignment.Center,
TextColor = CSS_Color.TextualColor,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextID = msgId,
+ Text = msg,
IsMoreLines = true,
};
contentView.AddChidren(btnMsg);
@@ -499,6 +500,18 @@
}
+
+
+ /// <summary>
+ /// 鍔犺浇鎻愮ず寮圭獥
+ /// </summary>
+ /// <param name="titleId"></param>
+ /// <param name="msgId"></param>
+ public void TipMsg(int titleId, int msgId, Action action = null)
+ {
+ TipMsg(Language.StringByID(titleId), Language.StringByID(msgId), action);
+ }
+
/// <summary>
/// 鍔犺浇绛夊緟鐣岄潰
/// </summary>
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 911e6d2..bdb35c9 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -225,7 +225,6 @@
//etAccount.Text = "13415629083";
//etAccount.Text = "13676202754";//宸存灄鏈嶅姟鍣�
//etAccount.Text = "13602944661";//kx
- etAccount.Text = "551775569@qq.com";//wcf
//etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374
//etAccount.Text = "15971583093";//楂樿儨
//etAccount.Text = "15217626103";//鏄嗘槑閲戣寕椤圭洰
@@ -239,6 +238,7 @@
//etAccount.Text = "support5@hdlchina.com.cn";
//etAccount.Text = "13375012441";
etAccount.Text = "info@smartlife-ks.com";
+ etAccount.Text = "551775569@qq.com";//wcf
}
b = !b;
etPassword.Text = "123456";
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
index fcc0b5e..b333fe4 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -851,55 +851,55 @@
#endregion
#region 鑾峰彇鏀寔
- FrameLayout supView = new FrameLayout()
- {
- Height = Application.GetRealWidth(44),
- BackgroundColor = 0xFFFF0000,
- };
- supportView.AddChidren(supView);
- supView.MouseUpEventHandler = (sender, e) => {
- Dialog dialog = new Dialog();
+ //FrameLayout supView = new FrameLayout()
+ //{
+ // Height = Application.GetRealWidth(44),
+ // BackgroundColor = 0xFFFF0000,
+ //};
+ //supportView.AddChidren(supView);
+ //supView.MouseUpEventHandler = (sender, e) => {
+ // Dialog dialog = new Dialog();
- var bodyView = new FrameLayout();
- dialog.AddChidren(bodyView);
+ // var bodyView = new FrameLayout();
+ // dialog.AddChidren(bodyView);
- var contentView = new VerticalScrolViewLayout()
- {
- Height = Application.GetRealHeight(600),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- };
- bodyView.AddChidren(contentView);
+ // var contentView = new VerticalScrolViewLayout()
+ // {
+ // Height = Application.GetRealHeight(600),
+ // BackgroundColor = CSS_Color.MainBackgroundColor,
+ // };
+ // bodyView.AddChidren(contentView);
- var btnClose = new Button()
- {
- Y = Application.GetRealHeight(600),
- Height = Application.GetRealHeight(67),
- BackgroundColor = CSS_Color.WarningColor,
- Text = "鍏� 闂�",
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.SubheadingFontSize,
- };
- btnClose.MouseUpEventHandler = (sender1, e1) => {
- dialog.Close();
- };
- bodyView.AddChidren(btnClose);
+ // var btnClose = new Button()
+ // {
+ // Y = Application.GetRealHeight(600),
+ // Height = Application.GetRealHeight(67),
+ // BackgroundColor = CSS_Color.WarningColor,
+ // Text = "鍏� 闂�",
+ // TextAlignment = TextAlignment.CenterLeft,
+ // TextSize = CSS_FontSize.SubheadingFontSize,
+ // };
+ // btnClose.MouseUpEventHandler = (sender, e) => {
+ // dialog.Close();
+ // };
+ // bodyView.AddChidren(btnClose);
- foreach (var msg in Control.Ins.MsgInfoList)
- {
- var et = new TextView()
- {
- IsMoreLines = true,
- Height = Application.GetRealHeight(150),
- Width = Application.GetRealWidth(300),
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- Text = msg,
- };
- contentView.AddChidren(et);
- }
+ // foreach (var msg in Control.Ins.MsgInfoList)
+ // {
+ // var et = new TextView()
+ // {
+ // IsMoreLines = true,
+ // Height = Application.GetRealHeight(150),
+ // Width = Application.GetRealWidth(300),
+ // TextColor = CSS_Color.FirstLevelTitleColor,
+ // TextSize = CSS_FontSize.TextFontSize,
+ // Text = msg,
+ // };
+ // contentView.AddChidren(et);
+ // }
- dialog.Show();
- };
+ // dialog.Show();
+ //};
//Button btnSupportIcon = new Button()
//{
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
index e7f2bb5..1c7a8bd 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -1,4 +1,5 @@
锘� using System;
+using HDL_ON.DAL.Server;
using HDL_ON.UI;
using HDL_ON.UI.CSS;
using Shared;
@@ -553,7 +554,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.SubheadingFontSize,
- TextID = StringId.AddResidence,
+ TextID = StringId.ScanQRCoden,
};
addResidenceView.AddChidren(btnAddResidenceText);
@@ -561,17 +562,78 @@
{
Scan.OpenScan((scanString) =>
{
- //鎵ц缁戝畾浣忓畢
- new BindingResidencePage().DoBindResidence(scanString);
+ if (scanString.StartsWith("source://bind/"))
+ {
+ var waitPage = new Loading();
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ Application.RunOnMainThread(() =>
+ {
+ waitPage.Start("Plaese wait...");
+ });
+ var sendString = scanString.Replace("source://bind/", "");
+ MainPage.Log($"缁戝畾source灞�:{sendString}");
+ //缁戝畾source灞�
+ var pack = new HttpServerRequest().BindSourcePanel(sendString);
+ Application.RunOnMainThread(() =>
+ {
+ var title = Language.StringByID(StringId.Tip);
+ var msg = "";
+ if(pack.Code == StateCode.SUCCESS)
+ {
+ if(Language.CurrentLanguage=="Chinese")
+ {
+ msg = "Source灞忕粦瀹氭垚鍔�.";
+ }
+ else
+ {
+ msg = "Source Hub binding succeeded";
+ }
+ new HDL_ON.UI.PublicAssmebly().TipMsg(title, msg);
+ }
+ else
+ {
+ if (Language.CurrentLanguage == "Chinese")
+ {
+ msg = $"Source灞忕粦瀹氬け璐�.({pack.Code})";
+ }
+ else
+ {
+ msg = "Source Hub binding failed";
+ }
+ new HDL_ON.UI.PublicAssmebly().TipMsg(title, msg);
+ }
+ });
+ }
+ catch(Exception ex)
+ { }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ waitPage.Hide();
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+ else
+ {
+ //鎵ц缁戝畾浣忓畢
+ new BindingResidencePage().DoBindResidence(scanString);
+ }
});
};
- optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
#endregion
if (Entity.DB_ResidenceData.Instance.SupportFacePass)
{
#region 涓汉閫夐」-浜鸿劯閫氳绠$悊
+ optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+
faceManagementView = new FrameLayout()
{
Height = Application.GetRealHeight(50),
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
index cd87d70..56c921d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -52,9 +52,13 @@
AC acFunction = new AC();
/// <summary>
- /// app鑷繁鎺у埗鐨勬俯搴︽暟鍊艰褰�
+ /// 鎺у埗鏃堕棿
/// </summary>
- List<string> seltControlTemp = new List<string>();
+ DateTime controlTime = DateTime.MinValue.AddDays(10);
+ /// <summary>
+ /// 鎺у埗娓╁害
+ /// </summary>
+ int temp = 16;
#endregion
@@ -92,7 +96,19 @@
//璇诲彇鐘舵��
new System.Threading.Thread(() =>
{
- Control.Ins.SendReadCommand(device);
+ while (true)
+ {
+ if(controlTime == DateTime.MinValue)
+ {
+
+ }
+ else if (controlTime.AddSeconds(2)<DateTime.Now)
+ {
+ Control.Ins.SendReadCommand(device);
+ controlTime = DateTime.MinValue;
+ }
+ System.Threading.Thread.Sleep(1000);
+ }
})
{ IsBackground = true }.Start();
}
@@ -102,7 +118,7 @@
/// </summary>
private void InitFrameWhiteContent1()
{
-
+ temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp));
arcBar = new DiyArcSeekBar()
{
Gravity = Gravity.CenterHorizontal,
@@ -829,13 +845,14 @@
{
return;
}
- var temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp));
+
if (temp <= device.GetAttribute(FunctionAttributeKey.SetTemp).min)
{
return;
}
- temp--;
- seltControlTemp.Add(temp.ToString());
+ --temp;
+ Console.WriteLine($"temp == {temp}");
+ controlTime = DateTime.Now;
arcBar.Progress = temp;
btnTemp.Text = temp.ToString();
device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString());
@@ -849,13 +866,12 @@
{
return;
}
- var temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp));
if (temp >= device.GetAttribute(FunctionAttributeKey.SetTemp).max)
{
return;
}
- temp++;
- seltControlTemp.Add(temp.ToString());
+ ++temp;
+ controlTime = DateTime.Now;
arcBar.Progress = temp;
btnTemp.Text = temp.ToString();
device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString());
@@ -951,48 +967,49 @@
{
Application.RunOnMainThread(() =>
{
- btnTemp.Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp)).ToString();
- btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp))) + "掳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);
- var updataTemp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)));
-
//app鑷繁鎺у埗鐨勪笉鐢ㄦ洿鏂帮紝浼氶�犳垚璺冲姩
- if (seltControlTemp.Contains(updataTemp.ToString()))
+ if (controlTime.AddSeconds(2) > DateTime.Now)
{
- seltControlTemp.Remove(updataTemp.ToString());
+ return;
}
else
{
- arcBar.Progress = updataTemp;
- }
+ btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp))) + "掳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)));
- if (device.trait_on_off.curValue.ToString() == "on")
- {
- btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = true;
- arcBar.IsOffline = false;
- btnSwitch.IsSelected = true;
- arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png";
- if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
+
+ arcBar.Progress = temp;
+ btnTemp.Text = temp.ToString() ;
+
+ if (device.trait_on_off.curValue.ToString() == "on")
{
- arcBar.IsClickable = false;
+ btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = true;
+ arcBar.IsOffline = false;
+ btnSwitch.IsSelected = true;
+ arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png";
+ if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
+ {
+ arcBar.IsClickable = false;
+ }
+ else
+ {
+ arcBar.IsClickable = true;
+ }
}
else
{
- arcBar.IsClickable = true;
+ btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = false;
+ arcBar.IsOffline = true;
+ btnSwitch.IsSelected = false;
+ arcBar.IsClickable = false;
+ arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png";
}
- }
- else
- {
- btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = false;
- arcBar.IsOffline = true;
- btnSwitch.IsSelected = false;
- arcBar.IsClickable = false;
- arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png";
}
});
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
index 3bbabed..6b29c6f 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
@@ -145,7 +145,7 @@
Height = Application.GetRealHeight(50),
TextSize = CSS_FontSize.TextFontSize,
TextColor = CSS_Color.PromptingColor1,
- Text = curtainTemp.GetPercent(function).ToString() + "%",
+ Text = curtainTemp.GetPercent(function).ToString() + "%",
};
controlView.AddChidren(btnProgress);
@@ -157,7 +157,7 @@
Height = Application.GetRealWidth(210),
Progress = curtainTemp.GetPercent(function),
//IsInvertedProgress = true,
- ProgressTextColor = 0x00000000,
+ ProgressTextColor = CSS_Color.WarningColor,// 0x00000000,
};
controlView.AddChidren(curtainSeekBar);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
index 25b967f..775b792 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -26,10 +26,14 @@
//bodyView.btnCurtainClose.IsSelected = percent == 0;
try
{
- if (!bodyView.onCurtainAnimation)
- {
- bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)));
- }
+ var progress = Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent));
+ bodyView.curtainSeekBar.Progress = progress;
+ bodyView.btnProgress.Text = progress + "%";
+
+ //if (!bodyView.onCurtainAnimation)
+ //{
+ // bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)));
+ //}
}
catch { }
}
@@ -148,7 +152,7 @@
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(function, d);
- CurtainAnimation(0);
+ //CurtainAnimation(100);
};
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
@@ -183,7 +187,7 @@
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(function, d);
- CurtainAnimation(100);
+ //CurtainAnimation(0);
};
//btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
index 2c3be59..a40ee00 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
@@ -37,7 +37,7 @@
/// <summary>
/// 娓愬彉鏃堕棿淇敼
/// </summary>
- //DiyImageSeekBar barFadeTime;
+ DiyImageSeekBar barFadeTime;
/// <summary>
/// 鑹叉俯鐨勬粦鍔ㄦ帶浠�
/// </summary>
@@ -170,7 +170,72 @@
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
Text = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness)) + "%",
};
- controlView.AddChidren(btnBrightnessText);
+ controlView.AddChidren(btnBrightnessText);
+
+
+ #region 娓愬彉鏃堕棿璋冭妭
+ if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
+ {
+ var btnGradualChangeText = new Button()
+ {
+ X = Application.GetRealWidth(35),
+ Y = Application.GetRealHeight(306 + 40),
+ Width = Application.GetRealWidth(224),
+ Height = Application.GetRealHeight(21),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextID = StringId.SpeedOfChange,
+ };
+ controlView.AddChidren(btnGradualChangeText);
+
+ var btnGradualChangeMinValuesText = new Button()
+ {
+ X = Application.GetRealWidth(35),
+ Y = btnGradualChangeText.Bottom + Application.GetRealHeight(5),
+ Width = Application.GetRealWidth(22),
+ Height = Application.GetRealHeight(21),
+ Text = "0s",
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ };
+ controlView.AddChidren(btnGradualChangeMinValuesText);
+
+ barFadeTime = new DiyImageSeekBar()
+ {
+ X = btnGradualChangeMinValuesText.Right,
+ Y = Application.GetRealHeight(360),
+ Width = Application.GetRealWidth(210),
+ Height = Application.GetRealHeight(54),
+ SeekBarViewHeight = Application.GetRealHeight(8),
+ ThumbImagePath = "Public/ThumbImage.png",
+ ThumbImageHeight = Application.GetRealHeight(54),
+ ProgressBarColor = CSS_Color.MainColor,
+ ProgressTextColor = CSS_Color.FirstLevelTitleColor,
+ ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ ProgressBarUnitSring = "s",
+ MaxValue = 10,
+ Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.FadeTime)),
+ SeekBarPadding = Application.GetRealWidth(20),
+ };
+ controlView.AddChidren(barFadeTime);
+
+ var btnGradualChangeMaxValuesText = new Button()
+ {
+ X = barFadeTime.Right,
+ Y = btnGradualChangeText.Bottom + Application.GetRealHeight(5),
+ Width = Application.GetRealWidth(35),
+ Height = Application.GetRealHeight(21),
+ Text = "10s",
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ };
+ controlView.AddChidren(btnGradualChangeMaxValuesText);
+ }
+ #endregion
+
#region 鑹叉俯
var cctAttr = function.GetAttribute(FunctionAttributeKey.CCT);
@@ -186,7 +251,7 @@
//鑹叉俯
var btnTempClolor = new Button();
btnTempClolor.X = Application.GetRealWidth(35);
- btnTempClolor.Y = Application.GetRealHeight(306 + 60);
+ btnTempClolor.Y = Application.GetRealHeight(395);
btnTempClolor.Width = Application.GetRealWidth(224);
btnTempClolor.Height = Application.GetRealHeight(21);
btnTempClolor.TextAlignment = TextAlignment.CenterLeft;
@@ -249,66 +314,6 @@
btnTempClolorMax.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
controlView.AddChidren(btnTempClolorMax);
- #endregion
-
- #region 娓愬彉鏃堕棿璋冭妭
- //var btnGradualChangeText = new Button()
- //{
- // X = Application.GetRealWidth(35),
- // Y = Application.GetRealHeight(385),
- // Width = Application.GetRealWidth(224),
- // Height = Application.GetRealHeight(21),
- // TextAlignment = TextAlignment.CenterLeft,
- // TextColor = CSS_Color.FirstLevelTitleColor,
- // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- // TextID = StringId.SpeedOfChange,
- //};
- //controlView.AddChidren(btnGradualChangeText);
-
- //var btnGradualChangeMinValuesText = new Button()
- //{
- // X = Application.GetRealWidth(35),
- // Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
- // Width = Application.GetRealWidth(22),
- // Height = Application.GetRealHeight(21),
- // Text = "0s",
- // TextAlignment = TextAlignment.CenterLeft,
- // TextColor = CSS_Color.PromptingColor1,
- // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- //};
- //controlView.AddChidren(btnGradualChangeMinValuesText);
-
- //barFadeTime = new DiyImageSeekBar()
- //{
- // X = btnGradualChangeMinValuesText.Right,
- // Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8),
- // Width = Application.GetRealWidth(210),
- // Height = Application.GetRealHeight(54),
- // SeekBarViewHeight = Application.GetRealHeight(8),
- // ThumbImagePath = "Public/ThumbImage.png",
- // ThumbImageHeight = Application.GetRealHeight(54),
- // ProgressBarColor = CSS_Color.MainColor,
- // ProgressTextColor = CSS_Color.FirstLevelTitleColor,
- // ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- // ProgressBarUnitSring = "s",
- // MaxValue = 10,
- // Progress = function.fadeTime,
- // SeekBarPadding = Application.GetRealWidth(20),
- //};
- //controlView.AddChidren(barFadeTime);
-
- //var btnGradualChangeMaxValuesText = new Button()
- //{
- // X = barFadeTime.Right,
- // Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
- // Width = Application.GetRealWidth(35),
- // Height = Application.GetRealHeight(21),
- // Text = "10s",
- // TextAlignment = TextAlignment.CenterLeft,
- // TextColor = CSS_Color.PromptingColor1,
- // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- //};
- //controlView.AddChidren(btnGradualChangeMaxValuesText);
#endregion
btnSwitch = new Button()
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
index 2bb7c7b..c5349dd 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
@@ -25,7 +25,7 @@
bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
if (!bodyView.onDimmerBar)
{
- bodyView.dimmerBar.Progress = Convert.ToInt32( updataTemp.GetAttrState(FunctionAttributeKey.Brightness));
+ bodyView.dimmerBar.Progress = Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness));
}
bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%";
bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80);
@@ -59,7 +59,8 @@
LoadEvet_ChangeFadeTime();
LoadEvet_ChangeColorTemplatrue();
//鍥為��鍒锋柊淇℃伅浜嬩欢
- actionRefresh = () => {
+ actionRefresh = () =>
+ {
btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
//function.SaveFunctionData(true);
@@ -70,11 +71,14 @@
/// </summary>
void LoadEvet_ChangeFadeTime()
{
- //barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
- //{
- // function.fadeTime = e;
- // function.SaveFunctionData(true);
- //};
+ if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
+ {
+ barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
+ function.SaveFunctionFile();
+ };
+ }
}
/// <summary>
@@ -205,7 +209,6 @@
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());
- d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime));
if (btnSwitch.IsSelected)
{
d.Add(FunctionAttributeKey.Brightness, function.lastBrightness.ToString());
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
index 2da3103..52f25af 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
@@ -166,74 +166,82 @@
};
controlView.AddChidren(btnBrightnessText);
- #region 娓愬彉鏃堕棿璋冭妭
- var btnGradualChangeText = new Button()
+ if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
{
- X = Application.GetRealWidth(35),
- Y = Application.GetRealHeight(385),
- Width = Application.GetRealWidth(224),
- Height = Application.GetRealHeight(21),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextID = StringId.SpeedOfChange,
- Visible = function.GetAttribute(FunctionAttributeKey.FadeTime)!= null,
- Enable = function.GetAttribute(FunctionAttributeKey.FadeTime)!= null,
- };
- controlView.AddChidren(btnGradualChangeText);
+ #region 娓愬彉鏃堕棿璋冭妭
- var btnGradualChangeMinValuesText = new Button()
- {
- X = Application.GetRealWidth(35),
- Y = btnGradualChangeText.Bottom+ Application.GetRealHeight(8),
- Width = Application.GetRealWidth(22),
- Height = Application.GetRealHeight(21),
- Text = "0s",
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.PromptingColor1,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Visible = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
- Enable = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
- };
- controlView.AddChidren(btnGradualChangeMinValuesText);
+ var btnGradualChangeText = new Button()
+ {
+ X = Application.GetRealWidth(35),
+ Y = Application.GetRealHeight(385),
+ Width = Application.GetRealWidth(224),
+ Height = Application.GetRealHeight(21),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextID = StringId.SpeedOfChange,
+ Visible = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
+ Enable = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
+ };
+ controlView.AddChidren(btnGradualChangeText);
- barFadeTime = new DiyImageSeekBar()
- {
- X = btnGradualChangeMinValuesText.Right,
- Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8),
- Width = Application.GetRealWidth(210),
- Height = Application.GetRealHeight(54),
- SeekBarViewHeight = Application.GetRealHeight(8),
- ThumbImagePath = "Public/ThumbImage.png",
- ThumbImageHeight = Application.GetRealHeight(54),
- ProgressBarColor = CSS_Color.MainColor,
- ProgressTextColor = CSS_Color.FirstLevelTitleColor,
- ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- ProgressBarUnitSring = "s",
- MaxValue = 10,
- Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.FadeTime)),
- SeekBarPadding = Application.GetRealWidth(20),
- Visible = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
- Enable = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
- };
- controlView.AddChidren(barFadeTime);
+ var btnGradualChangeMinValuesText = new Button()
+ {
+ X = Application.GetRealWidth(35),
+ Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
+ Width = Application.GetRealWidth(22),
+ Height = Application.GetRealHeight(21),
+ Text = "0s",
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Visible = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
+ Enable = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
+ };
+ controlView.AddChidren(btnGradualChangeMinValuesText);
- var btnGradualChangeMaxValuesText = new Button()
- {
- X = barFadeTime.Right,
- Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
- Width = Application.GetRealWidth(35),
- Height = Application.GetRealHeight(21),
- Text = "10s",
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.PromptingColor1,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Visible = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
- Enable = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
- };
- controlView.AddChidren(btnGradualChangeMaxValuesText);
- #endregion
+ barFadeTime = new DiyImageSeekBar()
+ {
+ X = btnGradualChangeMinValuesText.Right,
+ Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8),
+ Width = Application.GetRealWidth(210),
+ Height = Application.GetRealHeight(54),
+ SeekBarViewHeight = Application.GetRealHeight(8),
+ ThumbImagePath = "Public/ThumbImage.png",
+ ThumbImageHeight = Application.GetRealHeight(54),
+ ProgressBarColor = CSS_Color.MainColor,
+ ProgressTextColor = CSS_Color.FirstLevelTitleColor,
+ ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ ProgressBarUnitSring = "s",
+ MaxValue = 10,
+ Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.FadeTime)),
+ SeekBarPadding = Application.GetRealWidth(20),
+ Visible = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
+ Enable = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
+ };
+ controlView.AddChidren(barFadeTime);
+ barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
+ function.UpdataFuncitonInfo();
+ };
+ var btnGradualChangeMaxValuesText = new Button()
+ {
+ X = barFadeTime.Right,
+ Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
+ Width = Application.GetRealWidth(35),
+ Height = Application.GetRealHeight(21),
+ Text = "10s",
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Visible = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
+ Enable = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
+ };
+ controlView.AddChidren(btnGradualChangeMaxValuesText);
+ #endregion
+ }
btnSwitch = new Button()
{
Gravity = Gravity.CenterHorizontal,
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
index a0daf23..bc1193d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -62,11 +62,14 @@
/// </summary>
void LoadEvet_ChangeFadeTime()
{
- barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
{
- function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
- function.UpdataFuncitonInfo();
- };
+ barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
+ function.SaveFunctionFile();
+ };
+ }
}
/// <summary>
@@ -91,7 +94,6 @@
dimmerBar.OnStopTrackingTouchEvent = (sender, e) => {
onDimmerBar = false;
function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress);
- function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.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);
@@ -142,7 +144,6 @@
{
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
- function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
btnSwitch.IsSelected = !btnSwitch.IsSelected;
if (btnSwitch.IsSelected)
{
@@ -157,7 +158,6 @@
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());
- d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime));
if (btnSwitch.IsSelected)
{
if(function.lastBrightness == 0)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
index b78927b..45ef832 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
@@ -242,6 +242,8 @@
controlView.AddChidren(btnMaxValuesText);
#endregion
+ if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
+ {
#region 娓愬彉鏃堕棿璋冭妭
var btnGradualChangeText = new Button()
{
@@ -294,6 +296,11 @@
Enable = function.GetAttribute(FunctionAttributeKey.FadeTime) != null,
};
controlView.AddChidren(barFadeTime);
+ barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
+ function.UpdataFuncitonInfo();
+ };
var btnGradualChangeMaxValuesText = new Button()
{
@@ -311,6 +318,7 @@
controlView.AddChidren(btnGradualChangeMaxValuesText);
#endregion
+ }
btnRestoredPoint = new Button()
{
X = Application.GetRealWidth(116),
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
index 0bf3e7c..8281d85 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
@@ -260,11 +260,14 @@
/// </summary>
void LoadEvet_ChangeFadeTime()
{
- barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
{
- function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
- function.UpdataFuncitonInfo();
- };
+ barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
+ function.SaveFunctionFile();
+ };
+ }
}
/// <summary>
/// 鍔犺浇寮�鍏充簨浠�
@@ -281,7 +284,6 @@
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());
- d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime));
if (btnSwitch.IsSelected)
{
if(function.lastBrightness == 0)
--
Gitblit v1.8.0