From d020a48f69f1acd8d97fc15372e19cde7779d934 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期一, 15 十一月 2021 10:46:43 +0800
Subject: [PATCH] 绑定source面板
---
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL_APP_Project.sln | 14 +
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs | 6
HDL-ON_iOS/Entitlements.plist | 2
HDL-ON_iOS/HDL-ON_iOS.csproj | 6
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs | 8 +
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 6
HDL-ON_iOS/AppDelegate.cs | 30 +++
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs | 134 ++++++++-------
SiriLibrary/Class1.cs | 11 +
HDL-ON_iOS/Info.plist | 6
HDL_ON/DAL/Server/NewAPI.cs | 4
HDL_ON/DAL/Server/HttpUtil.cs | 4
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs | 4
HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 25 ++
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs | 68 ++++++++
HDL_ON/DAL/Server/HttpServerRequest.cs | 26 ++
SiriLibrary/SiriLibrary.csproj | 47 +++++
.vs/HDL_APP_Project/xs/UserPrefs.xml | 27 ++-
HDL_ON/UI/MainPage.cs | 2
SiriLibrary/Properties/AssemblyInfo.cs | 36 ++++
22 files changed, 362 insertions(+), 108 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 85ea5ee..4f5c689 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,47 +1,58 @@
锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
- <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" />
+ <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.97AA2632-71E3-46DB-B866-5ABE55A009E7" />
<MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Mqtt/MqttClient.cs">
<Files>
- <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="8" Column="17" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" Line="969" Column="46" />
- <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="235" Column="57" />
- <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="313" Column="69" />
+ <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="2722" Column="62" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPage.cs" Line="94" Column="15" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs" Line="90" Column="14" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" Line="119" Column="16" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" Line="597" Column="21" />
+ <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="1" Column="1" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="HDL_APP_Project" expanded="True">
<Node name="HDL_ON" expanded="True">
+ <Node name="Common" expanded="True" />
<Node name="DAL" expanded="True">
<Node name="Mqtt" expanded="True">
<Node name="MqttClient.cs" selected="True" />
</Node>
<Node name="Server" expanded="True" />
</Node>
+ <Node name="Entity" expanded="True" />
<Node name="UI" expanded="True">
+ <Node name="UI0-Public" expanded="True" />
<Node name="UI1-Login" expanded="True" />
+ <Node name="UI2" expanded="True">
+ <Node name="2-Classification" expanded="True" />
+ <Node name="4-PersonalCenter" expanded="True" />
+ </Node>
</Node>
</Node>
<Node name="HDL-ON_iOS" expanded="True" />
+ <Node name="SiriLibrary" expanded="True" />
</Node>
</State>
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
+ <MonoDevelop.Ide.ItemProperties.SiriLibrary FirstBuild="True" />
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<DisabledProjects>
<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>
</DisabledProjects>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
<MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore>
<Breakpoint file="/Users/kaede/Desktop/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/HDL_ON/Entity/Function/Scene.cs" relfile="HDL_ON/Entity/Function/Scene.cs" line="333" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" line="251" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" line="185" column="1" />
</BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 9246634..7f765ee 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="202111041" android:versionName="1.3.202111041" package="com.hdl.onpro">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202111051" android:versionName="1.3.202111051" package="com.hdl.onpro">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
<!-- 涔愭鍙瀵硅闇�瑕佺殑鏉冮檺 -->
<!--<uses-permission android:name="android.permission.INTERNET" />-->
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index 03ce2b3..e7b6565 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -9,6 +9,7 @@
using Microsoft.AppCenter.Crashes;
using HDL_ON.UI;
using HDL_ON.DAL.Server;
+using Intents;
namespace SharedMethod
{
@@ -275,7 +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
+
Console.WriteLine("FinishedLaunching");
return true;
}
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..524996b 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -69,7 +69,7 @@
<MtouchLink>SdkOnly</MtouchLink>
<MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
<MtouchI18n>cjk</MtouchI18n>
- <CodesignProvision>ComHdlOnProAdHoc20210616-1</CodesignProvision>
+ <CodesignProvision>ComHdlOnProAdHoc20211109-1</CodesignProvision>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -1401,6 +1401,10 @@
<Project>{2DDF4C3C-6998-432E-9F43-6786D82F0630}</Project>
<Name>Blufi</Name>
</ProjectReference>
+ <ProjectReference Include="..\SiriLibrary\SiriLibrary.csproj">
+ <Project>{C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}</Project>
+ <Name>SiriLibrary</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..42be14b 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.2.202110281</string>
+ <string>1.3.202111051</string>
<key>CFBundleVersion</key>
- <string>1.2.10281</string>
+ <string>1.3.11051</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+ data will be send to Siri.</string>
</dict>
</plist>
diff --git a/HDL_APP_Project.sln b/HDL_APP_Project.sln
index c30175b..248ef6a 100644
--- a/HDL_APP_Project.sln
+++ b/HDL_APP_Project.sln
@@ -10,6 +10,8 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blufi", "HdlBluWi\Blufi.csproj", "{2DDF4C3C-6998-432E-9F43-6786D82F0630}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiriLibrary", "SiriLibrary\SiriLibrary.csproj", "{C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}"
+EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
HDL_ON\HDL_ON.projitems*{09712674-2a38-407b-b1e2-560b2c352f9a}*SharedItemsImports = 4
@@ -63,6 +65,18 @@
{2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|iPhone.Build.0 = Release|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
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/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index d2292ee..cf4a06a 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
/// 鍥哄畾鍩熷悕,姝e紡鐜
/// 鍏叡鍩熷悕灏辫繎瑙f瀽
/// </summary>
- public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
- //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+ //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+ public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
/// <summary>
/// RegionMark
/// </summary>
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index 180b762..57644f5 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -730,6 +730,10 @@
#region 鈻� -- SIP鐩稿叧鎺ュ彛_______________________________
#endregion
+ /// <summary>
+ /// 缁戝畾source闈㈡澘
+ /// </summary>
+ public const string Api_Post_BindSourcePanel = "/home-wisdom/source/screen/home/bind";
}
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index a41f04c..9be4e61 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "1.3.1104";
+ public static string VersionString = "1.3.1105";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
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/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
index e7f2bb5..f7a2d84 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;
@@ -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 HDL_ON.DAL.Server.HttpServerRequest().BindSourcePanel(scanString);
+ 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灞忕粦瀹氬け璐�.";
+ }
+ 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/Curtain/RollingShutterPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
index 9abe53d..6b29c6f 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
@@ -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 5554a63..775b792 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -152,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) =>
@@ -187,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/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..1168eb2 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -62,11 +62,7 @@
/// </summary>
void LoadEvet_ChangeFadeTime()
{
- barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
- {
- function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
- function.UpdataFuncitonInfo();
- };
+
}
/// <summary>
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..416f6d1 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
@@ -260,11 +260,7 @@
/// </summary>
void LoadEvet_ChangeFadeTime()
{
- barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
- {
- function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
- function.UpdataFuncitonInfo();
- };
+
}
/// <summary>
/// 鍔犺浇寮�鍏充簨浠�
diff --git a/SiriLibrary/Class1.cs b/SiriLibrary/Class1.cs
new file mode 100644
index 0000000..9bb5fcd
--- /dev/null
+++ b/SiriLibrary/Class1.cs
@@ -0,0 +1,11 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace SiriLibrary
+{
+ public class Class1
+ {
+ }
+}
diff --git a/SiriLibrary/Properties/AssemblyInfo.cs b/SiriLibrary/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..5d687c3
--- /dev/null
+++ b/SiriLibrary/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SiriLibrary")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("SiriLibrary")]
+[assembly: AssemblyCopyright("Copyright 漏 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/SiriLibrary/SiriLibrary.csproj b/SiriLibrary/SiriLibrary.csproj
new file mode 100644
index 0000000..4f46429
--- /dev/null
+++ b/SiriLibrary/SiriLibrary.csproj
@@ -0,0 +1,47 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}</ProjectGuid>
+ <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <TemplateGuid>{a52b8a63-bc84-4b47-910d-692533484892}</TemplateGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>SiriLibrary</RootNamespace>
+ <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
+ <AssemblyName>SiriLibrary</AssemblyName>
+ <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>portable</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>portable</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="Xamarin.iOS" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Resources\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Class1.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
+</Project>
\ No newline at end of file
--
Gitblit v1.8.0