From fbbfd430f289f3c0cc0f826b2207944ef7205c9d Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 10 十二月 2019 10:17:50 +0800
Subject: [PATCH] 2019.12.10
---
ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs | 12 ----
ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs | 7 +-
ZigbeeApp/GateWay.Droid/Assets/Language.ini | 3
.gitignore | 2
ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs | 14 ++--
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | 27 +++++---
ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs | 10 ++-
ZigbeeApp/Shared/R.cs | 12 ++++
ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs | 2
ZigbeeApp/Shared/Common/CommonPage.cs | 3
ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs | 13 +++-
ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs | 4
ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs | 52 +++++++++-------
ZigbeeApp/Shared/Common/Room.cs | 14 +++-
14 files changed, 103 insertions(+), 72 deletions(-)
diff --git a/.gitignore b/.gitignore
index cb059f5..84279dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -197,3 +197,5 @@
ZigbeeApp/.vs/GateWay/xs/project-cache/ShardLib-Debug.json
ZigbeeApp/packages/System.Runtime.4.3.0/lib/xamarintvos10/_._
*._
+*.ide
+ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
index 6a0d51b..df47810 100644
--- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
+++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -2,14 +2,17 @@
<MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.M7BBB18B19152766" />
<MonoDevelop.Ide.ItemProperties.GateWay.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.8c0bdb303f25d82c2a42fb8bfca449bfaca00260" />
<MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" />
- <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Common/Room.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Common/CommonPage.cs">
<Files>
- <File FileName="Shared/Common/CommonPage.cs" Line="163" Column="30" />
- <File FileName="Shared/Phone/UserView/UserHomeView.cs" Line="654" Column="51" />
- <File FileName="Shared/R.cs" Line="667" Column="18" />
- <File FileName="GateWay.Droid/Assets/Language.ini" Line="632" Column="18" />
- <File FileName="Shared/Common/House.cs" Line="1" Column="1" />
- <File FileName="Shared/Common/Room.cs" Line="647" Column="26" />
+ <File FileName="Shared/Common/CommonPage.cs" Line="162" Column="61" />
+ <File FileName="Shared/Phone/UserView/UserHomeView.cs" />
+ <File FileName="Shared/R.cs" />
+ <File FileName="GateWay.Droid/Assets/Language.ini" />
+ <File FileName="Shared/Phone/Device/CommonForm/FunctionMainView.cs" />
+ <File FileName="Shared/Phone/Device/Room/UnallocatedRoom.cs" />
+ <File FileName="Shared/Phone/Device/Account/AccountRegister.cs" />
+ <File FileName="Shared/Phone/Device/Account/AccountLogic.cs" />
+ <File FileName="Shared/Phone/Device/Account/AccountForgetPWD.cs" />
</Files>
<Pads>
<Pad Id="ProjectPad">
@@ -20,13 +23,13 @@
</Node>
<Node name="Shared" expanded="True">
<Node name="Common" expanded="True">
- <Node name="Room.cs" selected="True" />
+ <Node name="CommonPage.cs" selected="True" />
</Node>
<Node name="Phone" expanded="True">
<Node name="Device" expanded="True">
<Node name="Account" expanded="True" />
- <Node name="Category" expanded="True" />
- <Node name="DeviceLogic" expanded="True" />
+ <Node name="CommonForm" expanded="True" />
+ <Node name="Room" expanded="True" />
</Node>
<Node name="UserCenter" expanded="True">
<Node name="CommonBase" expanded="True" />
@@ -45,7 +48,9 @@
</DisabledProjects>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
- <BreakpointStore />
+ <BreakpointStore>
+ <Breakpoint file="/Users/guoxuecheng/Desktop/HomeApp/ZigbeeApp/Shared/Phone/Device/Account/AccountRegister.cs" relfile="Shared/Phone/Device/Account/AccountRegister.cs" line="409" column="1" />
+ </BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
</Properties>
\ No newline at end of file
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index bfa7c45..a7cce3a 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -778,7 +778,8 @@
13506=5鎸�
13511=璇锋竻娲佹护缃�
-
+13600=娌″姛鑳� {\r\n} 璇峰厛娣诲姞
+13601=娌″満鏅� {\r\n} 璇峰厛娣诲姞
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
index 90080f2..b4155f8 100644
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -158,9 +158,8 @@
/// <summary>
/// 鐢ㄤ簬涓浗澶ч檰楠岃瘉鎵嬫満鍙锋鍒欒〃杈惧紡
- /// 绛夊悓浜�--- "^[1]+\\d{10}"
/// </summary>
- public static string PhoneRegexStr = "^[1]+[0,1,2,3,4,5,6,7,8,9]+\\d{9}";
+ public static string PhoneRegexStr = "^[1][0-9]{10}$";
/// <summary>
/// 鐢ㄤ簬楠岃瘉闈炰腑鍥藉ぇ闄嗘墜鏈哄彿姝e垯琛ㄨ揪寮�
/// </summary>
diff --git a/ZigbeeApp/Shared/Common/Room.cs b/ZigbeeApp/Shared/Common/Room.cs
index 417768e..4d255ea 100644
--- a/ZigbeeApp/Shared/Common/Room.cs
+++ b/ZigbeeApp/Shared/Common/Room.cs
@@ -604,6 +604,10 @@
/// <returns></returns>
public List<Room> GetRoomsByFloorId(string id)
{
+ if (Config.Instance.Home.FloorDics.Count == 0)
+ {
+ return Lists;
+ }
return Lists.FindAll((obj) => obj.FloorId == id);
}
/// <summary>
@@ -611,12 +615,12 @@
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
- public List<string> GetRoomNamesByFloorId(string id)
+ public List<string> GetRoomNamesByFloorId(string id)
{
List<string> names = new List<string> { };
- foreach(var r in Lists)
+ foreach (var r in Lists)
{
- if(r.FloorId==id)
+ if (r.FloorId == id)
{
names.Add(r.Name);
}
@@ -631,6 +635,10 @@
/// <returns></returns>
public List<Room> GetRoomsByFloorIdAppendLoveRoom(string id)
{
+ if (Config.Instance.Home.FloorDics.Count == 0)
+ {
+ return Lists;
+ }
var r= Lists.FindAll((obj) => obj.FloorId == id);
r.Insert(0, GetLoveRoom());
return r;
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs
index 9a7efab..82baff6 100644
--- a/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs
@@ -286,18 +286,6 @@
{
return;
}
- //鍏堝垽鏂�2娆″瘑鐮佽緭鍏ユ槸鍚︿竴鑷�
- if (pwdRow.PasswrodET.Text.Trim() != pwdComfireRow.PasswrodET.Text.Trim())
- {
- errorBtn.TextID = R.MyInternationalizationString.TwoPasswordInconsistency;
- return;
- }
-
- if (AccountLogic.Instance.CheckPwdLength(pwdRow.PasswrodET.Text.Trim()) == false)
- {
- errorBtn.TextID = R.MyInternationalizationString.ThePWDLengthError;
- return;
- }
(sender as Button).Enable = (sender as Button).IsSelected = false;
CommonPage.Loading.Start();
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
index e1661ef..a025338 100644
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
@@ -631,7 +631,7 @@
{
curRoom = rooms[index1][index2];
zoneRow.SetTitle($"{Config.Instance.Home.GetFloorNameById(floorIds[index1])} , {rooms[index1][index2].Name}");
- }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor),
+ }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongZone),
Language.StringByID(R.MyInternationalizationString.Confrim),
Language.StringByID(R.MyInternationalizationString.Cancel));
}
@@ -651,7 +651,7 @@
{
curRoom = rs[index1];
zoneRow.SetTitle(rs[index1].Name);
- }, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor),
+ }, 0, Language.StringByID(R.MyInternationalizationString.BelongZone),
Language.StringByID(R.MyInternationalizationString.Confrim),
Language.StringByID(R.MyInternationalizationString.Cancel));
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs
index dac1b70..3394193 100644
--- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs
@@ -179,9 +179,16 @@
confirmBtn.SetTitle(R.MyInternationalizationString.Save);
confirmBtn.MouseUpEventHandler += (sender, e) =>
{
- sceneTargetDevice.DelayTime = totalSecond;
- selectedTimeAction?.Invoke(sceneTargetDevice);
- RemoveFromParent();
+ if (totalSecond == 0)
+ {
+ RemoveFromParent();
+ }
+ else
+ {
+ sceneTargetDevice.DelayTime = totalSecond;
+ selectedTimeAction?.Invoke(sceneTargetDevice);
+ RemoveFromParent();
+ }
};
}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs
index a6fc541..ce78534 100644
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs
@@ -99,7 +99,7 @@
Y = Application.GetMinRealAverage(17),
Width = Application.GetMinRealAverage(320),
Height = Application.GetMinRealAverage(63),
- TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+ TextColor = ZigbeeColor.Current.GXCTextGrayColor,
SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
TextAlignment=TextAlignment.CenterLeft
};
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
index 6561293..589c395 100644
--- a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
@@ -162,30 +162,31 @@
var floorRow = new DeviceInfoRow(308);
floorRow.Init();
floorRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.BelongFloor)} :");
- infoFL.AddChidren(floorRow);
- if (!room.IsLove)
+ if (Config.Instance.Home.FloorDics.Count > 0 && room.IsLove == false)
{
- floorRow.SetTitle(room.FloorName);
- floorRow.ClickBtn.MouseUpEventHandler += (sender, e) =>
- {
- if (Config.Instance.Home.FloorDics != null)
- {
- List<string> floorIds = new List<string> { };
- List<string> floorNames = new List<string> { };
- foreach (var floor in Config.Instance.Home.FloorDics)
- {
- floorIds.Add(floor.Key);
- floorNames.Add(floor.Value);
- }
-
- PickerView.Show(floorNames, (index) =>
- {
- room.FloorId = floorIds[index];
- floorRow.SetTitle(room.FloorName);
- }, floorIds.IndexOf(room.FloorId), Language.StringByID(R.MyInternationalizationString.BelongFloor), Language.StringByID(R.MyInternationalizationString.Confrim), Language.StringByID(R.MyInternationalizationString.Cancel));
- }
- };
+ infoFL.AddChidren(floorRow);
}
+ floorRow.SetTitle(room.FloorName);
+ floorRow.ClickBtn.MouseUpEventHandler += (sender, e) =>
+ {
+ if (Config.Instance.Home.FloorDics != null)
+ {
+ List<string> floorIds = new List<string> { };
+ List<string> floorNames = new List<string> { };
+ foreach (var floor in Config.Instance.Home.FloorDics)
+ {
+ floorIds.Add(floor.Key);
+ floorNames.Add(floor.Value);
+ }
+
+ PickerView.Show(floorNames, (index) =>
+ {
+ room.FloorId = floorIds[index];
+ floorRow.SetTitle(room.FloorName);
+ }, floorIds.IndexOf(room.FloorId), Language.StringByID(R.MyInternationalizationString.BelongFloor), Language.StringByID(R.MyInternationalizationString.Confrim), Language.StringByID(R.MyInternationalizationString.Cancel));
+ }
+ };
+
var temperatureRow = new DeviceInfoRow(446);
temperatureRow.Init();
@@ -249,7 +250,6 @@
(selectTemp as ZigBee.Device.TemperatureSensor).ReadTemperatureOrHumidity();
};
};
-
if (string.IsNullOrEmpty(room.TemperatrueDevice) == false)
{
HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice");
@@ -297,6 +297,7 @@
(dev as ZigBee.Device.TemperatureSensor).ReadTemperatureOrHumidity();
}
}
+
var humidityRow = new DeviceInfoRow(585);
humidityRow.Init();
@@ -390,6 +391,11 @@
}
}
+ if (Config.Instance.Home.FloorDics.Count == 0 || room.IsLove)
+ {
+ temperatureRow.Y = Application.GetRealHeight(308);
+ humidityRow.Y= Application.GetRealHeight(446);
+ }
var confirm = new Device.CommonForm.CompleteButton(1700, 700, 127);
confirm.SetTitle(R.MyInternationalizationString.Confrim);
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
index 52ebd3b..a476c9b 100644
--- a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
@@ -76,8 +76,11 @@
};
floorBtn.Text = Config.Instance.Home.GetCurrentFloorName;
- top.topView.AddChidren(floorBtn);
- top.topView.AddChidren(selectFloorBtn);
+ if(Config.Instance.Home.FloorDics.Count>0)
+ {
+ top.topView.AddChidren(floorBtn);
+ top.topView.AddChidren(selectFloorBtn);
+ }
selectFloorBtn.MouseUpEventHandler += SelectedFloor_MouseUpEventHandler;
floorBtn.MouseUpEventHandler += SelectedFloor_MouseUpEventHandler;
}
@@ -180,8 +183,7 @@
private void ShowUnallocatedRoom_MouseUpEvent(object sender,MouseEventArgs mouseEventArgs)
{
var unalloctedRoom = new UnallocatedRoom();
- HomePage.Instance.AddChidren(unalloctedRoom);
- HomePage.Instance.PageIndex += 1;
+ AddChidren(unalloctedRoom);
unalloctedRoom.Show();
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
index fca2cd7..813d7c9 100644
--- a/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
@@ -244,12 +244,15 @@
public void ShowFunction(bool selectAll)
{
SelectAll = selectAll;
+
+ var devList = Common.Room.AllRoomDeviceUIList;
+
//閫夋嫨鍔熻兘--鐩存帴浠庢埧闂寸殑devicelist涓幏鍙�
- if (Common.Room.AllRoomDeviceUIList == null)
+ if (devList == null)
{
return;
}
- if (Common.Room.AllRoomDeviceUIList.Count == 0)
+ if (devList.Count == 0)
{
ShowNoFunctionTip();
}
@@ -302,7 +305,7 @@
functionTypeIMG.ClickBtn.MouseUpEventHandler += ShowSameTypeFunction;
- if (deviceType == Shared.Common.Room.AllRoomDeviceUIList[0].CommonDevice.Type)
+ if (deviceType == devList[0].CommonDevice.Type)
{
ShowSameTypeFunction(functionTypeIMG.ImageBtn, null);
}
@@ -433,8 +436,7 @@
Height = Application.GetRealHeight(200),
Width = Application.GetRealWidth(700),
Gravity = Gravity.CenterHorizontal,
- TextID = R.MyInternationalizationString.NoFunction,
- //Text = "娌℃湁鍔熻兘 \n 璇峰湪涓汉涓績涓�--璁惧绠$悊澶勬坊鍔�",
+ Text= Language.StringByID(R.MyInternationalizationString.NoFunction_Tip).Replace("{\\r\\n}", "\r\n"),
TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
TextAlignment = TextAlignment.Center,
IsMoreLines = true
@@ -613,7 +615,7 @@
Height = Application.GetRealHeight(200),
Width = Application.GetRealWidth(700),
Gravity = Gravity.CenterHorizontal,
- TextID = R.MyInternationalizationString.NoScene,
+ Text = Language.StringByID(R.MyInternationalizationString.NoScene_Tip).Replace("{\\r\\n}", "\r\n"),
TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
TextAlignment = TextAlignment.Center,
IsMoreLines = true
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
index adce2b8..f6b5651 100644
--- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -429,7 +429,6 @@
floorBtn = new Button
{
- X = floor.Right,
Width = Application.GetRealWidth(500),
Height = Application.GetRealHeight(100),
Gravity = Gravity.CenterVertical,
@@ -441,9 +440,9 @@
if(Config.Instance.Home.FloorDics.Count>0)
{
topFrameLayout.AddChidren(floor);
+ floorBtn.X = floor.Right;
topFrameLayout.AddChidren(floorBtn);
}
-
var messageBtn = new Button()
{
@@ -911,7 +910,7 @@
{
Y = noFunction.Bottom,
Height = Application.GetRealHeight(200),
- Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"),
+ Text = Language.StringByID(R.MyInternationalizationString.NoFunction_Tip).Replace("{\\r\\n}", "\r\n"),
TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
IsMoreLines = true
};
@@ -1631,7 +1630,7 @@
{
Y = noScene.Bottom,
Height = Application.GetRealHeight(200),
- Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}", "\r\n"),
+ Text = Language.StringByID(R.MyInternationalizationString.NoScene_Tip).Replace("{\\r\\n}", "\r\n"),
TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
IsMoreLines = true
};
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index a2d5a4f..6693dd6 100644
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -1191,6 +1191,8 @@
/// </summary>
public const int TheSceneIsDelaying = 13149;
+
+
/// <summary>
/// 閫夋嫨鎽嗛
/// </summary>
@@ -1224,6 +1226,16 @@
/// </summary>
public const int NeedCleanAC = 13511;
+ /// <summary>
+ /// 娌″姛鑳� 璇峰厛娣诲姞
+ /// </summary>
+ public const int NoFunction_Tip = 13600;
+ /// <summary>
+ /// 娌″満鏅� 璇峰厛娣诲姞
+ /// </summary>
+ public const int NoScene_Tip = 13601;
+
+
#endregion
--
Gitblit v1.8.0