From 1606d40b0eaf15c6db0f436495eb4953a4c8ac3e Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 03 三月 2021 18:41:38 +0800
Subject: [PATCH] 2021-03-03 1.更新
---
Crabtree/SmartHome/HDL/Common/HDLLinkUtlis.cs | 8 +-
Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs | 95 ++++++++++++-------------------
Crabtree/SmartHome/UI/SimpleControl/R.cs | 5 +
Crabtree/ON/Assets/Language.ini | 2
Crabtree/ON.Ios/Resources/Language.ini | 2
Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingDevicePage.cs | 14 ++--
Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingScenePage.cs | 4
Crabtree/.vs/SmartHome/xs/UserPrefs.xml | 33 +++++++----
8 files changed, 81 insertions(+), 82 deletions(-)
diff --git a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
index d3bfc20..afb12c4 100644
--- a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
+++ b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
@@ -1,28 +1,37 @@
-锘�<Properties StartupConfiguration="{9D9EF20B-6E65-4A65-92BF-567EBF1E1443}|Default">
+锘�<Properties StartupConfiguration="{1D83BF28-BA88-4152-BA41-D7EFE90A5437}|Default">
<MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.822QECU5228FU" />
- <MonoDevelop.Ide.Workbench ActiveDocument="SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="SmartHome/HDL/Common/HDLLinkUtlis.cs">
<Files>
- <File FileName="SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs" Line="382" Column="24" />
- <File FileName="SmartHome/HDL/Common/HDLLinkUtlis.cs" Line="125" Column="21" />
+ <File FileName="SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs" Line="326" Column="47" />
+ <File FileName="SmartHome/HDL/Common/CommonUtlis.cs" />
+ <File FileName="SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs" />
+ <File FileName="SmartHome/UI/SimpleControl/R.cs" />
+ <File FileName="ON.Ios/Resources/Language.ini" />
+ <File FileName="ON/Assets/Language.ini" />
+ <File FileName="SmartHome/HDL/Common/HDLLinkUtlis.cs" Line="127" Column="53" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="SmartHome" expanded="True">
- <Node name="ON.Droid" expanded="True" />
+ <Node name="ON.Droid" expanded="True">
+ <Node name="Assets" expanded="True" />
+ <Node name="Resources" expanded="True" />
+ </Node>
+ <Node name="ON.Ios" expanded="True">
+ <Node name="Resources" expanded="True" />
+ </Node>
<Node name="Shared" expanded="True">
<Node name="HDL" expanded="True">
- <Node name="Common" expanded="True" />
- <Node name="Operation" expanded="True">
- <Node name="Device" expanded="True" />
+ <Node name="Common" expanded="True">
+ <Node name="HDLLinkUtlis.cs" selected="True" />
</Node>
</Node>
<Node name="UI" expanded="True">
<Node name="SimpleControl" expanded="True">
<Node name="Phone" expanded="True">
- <Node name="User" expanded="True">
- <Node name="UserSettingView.cs" selected="True" />
- </Node>
+ <Node name="Register" expanded="True" />
+ <Node name="User" expanded="True" />
</Node>
</Node>
</Node>
@@ -40,7 +49,7 @@
<String>IosService/IosService.csproj</String>
<String>DroidService/DroidService.csproj</String>
</DisabledProjects>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" />
<MonoDevelop.Ide.ItemProperties.ON.Ios PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.08FD445C-3EE8-4ED2-BF28-B42ADD0DA92C" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
diff --git a/Crabtree/ON.Ios/Resources/Language.ini b/Crabtree/ON.Ios/Resources/Language.ini
index 18d8163..aeb2229 100644
--- a/Crabtree/ON.Ios/Resources/Language.ini
+++ b/Crabtree/ON.Ios/Resources/Language.ini
@@ -1109,6 +1109,7 @@
20058=Sync to cloud
20059=Device and scene data are successfully synchronized to the cloud!
20060=Failed to sync the device and scene data to the cloud!
+20061=Do you want to synchronize all local devices and scenes to the cloud? This will be used for schedule and alexa control functions.
[Chinese]
1=浣犲ソ
@@ -2220,6 +2221,7 @@
20058=Sync to cloud
20059=Device and scene data are successfully synchronized to the cloud!
20060=Failed to sync the device and scene data to the cloud!
+20061=Do you want to synchronize all local devices and scenes to the cloud? This will be used for schedule and alexa control functions.
[Czech]
diff --git a/Crabtree/ON/Assets/Language.ini b/Crabtree/ON/Assets/Language.ini
index b0b703f..fd38bf9 100644
--- a/Crabtree/ON/Assets/Language.ini
+++ b/Crabtree/ON/Assets/Language.ini
@@ -1109,6 +1109,7 @@
20058=Sync to cloud
20059=Device and scene data are successfully synchronized to the cloud!
20060=Failed to sync the device and scene data to the cloud!
+20061=Do you want to synchronize all local devices and scenes to the cloud? This will be used for schedule and alexa control functions.
[Chinese]
1=浣犲ソ
@@ -2220,6 +2221,7 @@
20058=Sync to cloud
20059=Device and scene data are successfully synchronized to the cloud!
20060=Failed to sync the device and scene data to the cloud!
+20061=Do you want to synchronize all local devices and scenes to the cloud? This will be used for schedule and alexa control functions.
[Czech]
diff --git a/Crabtree/SmartHome/HDL/Common/HDLLinkUtlis.cs b/Crabtree/SmartHome/HDL/Common/HDLLinkUtlis.cs
index 906b541..73c912e 100644
--- a/Crabtree/SmartHome/HDL/Common/HDLLinkUtlis.cs
+++ b/Crabtree/SmartHome/HDL/Common/HDLLinkUtlis.cs
@@ -124,7 +124,7 @@
/// <returns></returns>
public void OneclickUpload ()
{
- MainPage.Loading.Start ("Uploading device list...");
+ MainPage.Loading.Start ("Uploading...");
System.Threading.Tasks.Task.Run (() => {
try {
var res = false;
@@ -136,7 +136,7 @@
}
}
- if (!res) {
+ if (res) {
Utlis.ShowAlertOnMainThread (Language.StringByID (SimpleControl.R.MyInternationalizationString.SuccessfullySynchronizedToTheCloud));
} else {
Utlis.ShowAlertOnMainThread (Language.StringByID (SimpleControl.R.MyInternationalizationString.FailedToSyncToTheCloud));
@@ -666,8 +666,8 @@
} else {
IMessageCommon.Current.ShowErrorInfoAlter (revertObj.Code);
}
- } catch {
-
+ } catch(Exception EX) {
+ Utlis.WriteLine ("catch: " + EX.ToString());
}
return res;
}
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingDevicePage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingDevicePage.cs
index 4bacf6c..8b399ec 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingDevicePage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingDevicePage.cs
@@ -279,15 +279,15 @@
deviceRow.AddChidren (btnChoose);
- var sceneData = targetInfoList.Find ((obj) => obj.targetId == function.deviceId);
- btnChoose.IsSelected = sceneData != null;
+ var targeDeviceData = targetInfoList.Find ((obj) => obj.targetId == function.deviceId);
+ btnChoose.IsSelected = targeDeviceData != null;
btnChoose.MouseUpEventHandler += (sendere, ee) => {
btnChoose.IsSelected = !btnChoose.IsSelected;
if (btnChoose.IsSelected) {
- var sceneData = targetInfoList.Find ((obj) => obj.targetId == function.deviceId);
- if (sceneData == null) {
+ var deviceData = targetInfoList.Find ((obj) => obj.targetId == function.deviceId);
+ if (deviceData == null) {
targetInfoList.Add (new TargetInfo () {
targetId = function.deviceId,
targetName = function.name,
@@ -296,9 +296,9 @@
}
} else {
- var sceneData = targetInfoList.Find ((obj) => obj.targetId == function.deviceId);
- if (sceneData != null) {
- targetInfoList.Remove (sceneData);
+ var deviceData = targetInfoList.Find ((obj) => obj.targetId == function.deviceId);
+ if (deviceData != null) {
+ targetInfoList.Remove (deviceData);
}
}
};
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingScenePage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingScenePage.cs
index 8493a99..ade437b 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingScenePage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingScenePage.cs
@@ -253,8 +253,8 @@
deviceRow.AddChidren (btnChoose);
- var sceneData = targetInfoList.Find ((obj) => obj.targetId == sceneBase.userSceneId);
- btnChoose.IsSelected = sceneData != null;
+ var targetSceneData = targetInfoList.Find ((obj) => obj.targetId == sceneBase.userSceneId);
+ btnChoose.IsSelected = targetSceneData != null;
btnChoose.MouseUpEventHandler += (sendere, ee) => {
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs
index f7b1522..b4f8024 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs
@@ -211,39 +211,39 @@
#region ---鏁版嵁鎺ユ敹---
//if (MainPage.LoginUser.AccountType == 2 || MainPage.LoginUser.AccountString == @"464027401@qq.com") {
- var DataReceptionView = new FrameLayout () {
- Width = Application.GetRealWidth (640),
- Height = Application.GetRealHeight (100),
- BackgroundColor = SkinStyle.Current.ViewColor
- };
- //UserMiddle.SettingView.AddChidren (DataReceptionView);
- var btnDataReceptionIcon = new Button () {
- X = Application.GetRealWidth (30),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth (75),
- Height = Application.GetRealHeight (75),
- UnSelectedImagePath = "AccountSettings/DataShared.png"
- };
- DataReceptionView.AddChidren (btnDataReceptionIcon);
- var btnDataReceptionTitle = new Button () {
- X = Application.GetRealWidth (125),
- TextAlignment = TextAlignment.CenterLeft,
- TextID = R.MyInternationalizationString.DataReception,
- TextColor = SkinStyle.Current.TextColor1,
- };
- DataReceptionView.AddChidren (btnDataReceptionTitle);
- EventHandler<MouseEventArgs> DataReceptionEventHandler = (sender, e) => {
+ var DataReceptionView = new FrameLayout () {
+ Width = Application.GetRealWidth (640),
+ Height = Application.GetRealHeight (100),
+ BackgroundColor = SkinStyle.Current.ViewColor
+ };
+ //UserMiddle.SettingView.AddChidren (DataReceptionView);
+ var btnDataReceptionIcon = new Button () {
+ X = Application.GetRealWidth (30),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetRealWidth (75),
+ Height = Application.GetRealHeight (75),
+ UnSelectedImagePath = "AccountSettings/DataShared.png"
+ };
+ DataReceptionView.AddChidren (btnDataReceptionIcon);
+ var btnDataReceptionTitle = new Button () {
+ X = Application.GetRealWidth (125),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = R.MyInternationalizationString.DataReception,
+ TextColor = SkinStyle.Current.TextColor1,
+ };
+ DataReceptionView.AddChidren (btnDataReceptionTitle);
+ EventHandler<MouseEventArgs> DataReceptionEventHandler = (sender, e) => {
- GoData ();
- };
- DataReceptionView.MouseUpEventHandler += DataReceptionEventHandler;
- btnDataReceptionIcon.MouseUpEventHandler += DataReceptionEventHandler;
- btnDataReceptionTitle.MouseUpEventHandler += DataReceptionEventHandler;
- Button btnNull3 = new Button () {
- BackgroundColor = SkinStyle.Current.MainColor,
- Height = Application.GetRealHeight (5)
- };
- //UserMiddle.SettingView.AddChidren (btnNull3);
+ GoData ();
+ };
+ DataReceptionView.MouseUpEventHandler += DataReceptionEventHandler;
+ btnDataReceptionIcon.MouseUpEventHandler += DataReceptionEventHandler;
+ btnDataReceptionTitle.MouseUpEventHandler += DataReceptionEventHandler;
+ Button btnNull3 = new Button () {
+ BackgroundColor = SkinStyle.Current.MainColor,
+ Height = Application.GetRealHeight (5)
+ };
+ //UserMiddle.SettingView.AddChidren (btnNull3);
#endregion
#region ---msg---
@@ -321,7 +321,12 @@
return;
}
- HDLLinkUtlis.Current.OneclickUpload ();
+ //ok浜嬩欢
+ Action okAction = () => {
+ HDLLinkUtlis.Current.OneclickUpload ();
+ };
+
+ CommonUtlis.Current.ShowActionAlert (Language.StringByID (R.MyInternationalizationString.DoYouWantToSynchronizeToTheCloud), okAction);
};
SyncDeviceView.MouseUpEventHandler += SyncDeviceEventHandler;
btnSyncDeviceIcon.MouseUpEventHandler += SyncDeviceEventHandler;
@@ -637,30 +642,6 @@
dialog.Close ();
};
dialog.Show ();
- }
-
-
-
- /// <summary>
- ///
- /// </summary>
- /// <param name="stateCodeStr"></param>
- static void ShowGetSubAccountByDistributedMarkErrorInfo (string stateCodeStr)
- {
- string mes = "";
-
- if (stateCodeStr == ErrorCode.NetworkError) {
- mes = ErrorCode.NetworkError;
- } else {
- mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr;
- }
- if (!string.IsNullOrEmpty (mes)) {
- Application.RunOnMainThread (() => {
- new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
- });
- }
-
-
}
}
diff --git a/Crabtree/SmartHome/UI/SimpleControl/R.cs b/Crabtree/SmartHome/UI/SimpleControl/R.cs
index c5ac68e..84d984b 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/R.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/R.cs
@@ -1199,6 +1199,11 @@
/// Failed to sync the device and scene data to the cloud!
/// </summary>
public const int FailedToSyncToTheCloud = 20060;
+ /// <summary>
+ /// 鏄惁鍚屾鏈湴鎵�鏈夎澶囧拰鍦烘櫙鍒颁簯绔紵杩欏皢鐢ㄤ簬瀹氭椂鍣ㄥ拰alexa璇煶鎺у埗鍔熻兘銆�
+ /// Do you want to synchronize all local devices and scenes to the cloud? This will be used for timer and alexa voice control functions.
+ /// </summary>
+ public const int DoYouWantToSynchronizeToTheCloud = 20061;
#endregion
}
--
Gitblit v1.8.0