From f5268d43584a1f72cb7b19c17232645c24e2348b Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 17 十二月 2020 15:29:31 +0800
Subject: [PATCH] 20201217-3
---
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs | 127 ++++++++++++++++++++++++++++--------------
1 files changed, 85 insertions(+), 42 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 087c0d9..6f1aa84 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -69,41 +69,70 @@
};
bodyView.AddChidren(topView);
- btnSceneTilte = new Button()
+ //涓嶆槸A缃戝叧鎴栬�呮槸鎴愬憳 鍙厑璁告坊鍔犲満鏅殣钘忚嚜鍔ㄥ寲
+ if (DB_ResidenceData.Instance.GatewayType != 1 || DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
{
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(170),
- Height = Application.GetRealHeight(25),
- TextAlignment = TextAlignment.CenterRight,
- TextSize = CSS_FontSize.HeadlineFontSize,
- TextColor = CSS_Color.PromptingColor1,
- SelectedTextColor = CSS_Color.MainColor,
- TextID = StringId.Scenes,
- IsSelected = true
- };
- topView.AddChidren(btnSceneTilte);
-
- btnAutomationTitle = new Button()
+ btnSceneTilte = new Button()
+ {
+ Y = Application.GetRealHeight(30),
+ //Width = Application.GetRealWidth(170),
+ Height = Application.GetRealHeight(25),
+ TextAlignment = TextAlignment.Center,
+ TextSize = CSS_FontSize.HeadlineFontSize,
+ TextColor = CSS_Color.PromptingColor1,
+ SelectedTextColor = CSS_Color.MainColor,
+ TextID = StringId.Scenes,
+ IsSelected = true
+ };
+ topView.AddChidren(btnSceneTilte);
+ btnAutomationTitle = new Button();
+ }
+ else
{
- X = Application.GetRealWidth(209),
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(170),
- Height = Application.GetRealHeight(25),
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.TextFontSize,
- TextColor = CSS_Color.PromptingColor1,
- SelectedTextColor = CSS_Color.MainColor,
- TextID = StringId.Automation,
- };
- topView.AddChidren(btnAutomationTitle);
- btnAddIcon = new Button()
+ btnSceneTilte = new Button()
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(170),
+ Height = Application.GetRealHeight(25),
+ TextAlignment = TextAlignment.CenterRight,
+ TextSize = CSS_FontSize.HeadlineFontSize,
+ TextColor = CSS_Color.PromptingColor1,
+ SelectedTextColor = CSS_Color.MainColor,
+ TextID = StringId.Scenes,
+ IsSelected = true
+ };
+ topView.AddChidren(btnSceneTilte);
+
+ btnAutomationTitle = new Button()
+ {
+ X = Application.GetRealWidth(209),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(170),
+ Height = Application.GetRealHeight(25),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextColor = CSS_Color.PromptingColor1,
+ SelectedTextColor = CSS_Color.MainColor,
+ TextID = StringId.Automation,
+ };
+ topView.AddChidren(btnAutomationTitle);
+ }
+ var btnAddIconBg = new Button()
{
X = Application.GetRealWidth(337),
Y = Application.GetRealHeight(29),
Width = Application.GetMinRealAverage(28),
Height = Application.GetMinRealAverage(28),
UnSelectedImagePath = "Public/AddIcon.png",
+ };
+ topView.AddChidren(btnAddIconBg);
+
+ btnAddIcon = new Button()
+ {
+ X = Application.GetRealWidth(337-20),
+ Width = Application.GetMinRealAverage(28+30),
+ Height = Application.GetMinRealAverage(28+29),
};
topView.AddChidren(btnAddIcon);
#endregion
@@ -171,7 +200,7 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
TextAlignment = TextAlignment.CenterLeft,
- Text = DB_ResidenceData.residenceData.CurFoor,
+ Text = DB_ResidenceData.Instance.CurFloor.roomName,
};
floorChangeView.AddChidren(btnFloor);
@@ -198,13 +227,13 @@
try
{
int index = 0;
- foreach (var scene in DB_ResidenceData.functionList.scenes)
+ foreach (var scene in FunctionList.List.scenes)
{
- if (scene.roomIds.Count == 0)//濡備綍鍦ㄦ埧闂村凡缁忕Щ闄や簡杩欎釜鍔熻兘锛屽垯鏀惰棌鐣岄潰涔熶笉浼氬啀鏄剧ず
- {
- scene.collect = false;
- continue;
- }
+ //if (scene.roomIds.Count == 0)//濡備綍鍦ㄦ埧闂村凡缁忕Щ闄や簡杩欎釜鍔熻兘锛屽垯鏀惰棌鐣岄潰涔熶笉浼氬啀鏄剧ず
+ //{
+ // scene.collect = false;
+ // continue;
+ //}
if (index % 2 == 0)
{
sceneFunctionView.AddChidren(new Button() { Height = Application.GetRealHeight(7) });
@@ -310,7 +339,6 @@
};
view.AddChidren(btnZone);
-
Button btnSettingIcon;
btnSettingIcon = new Button()
{
@@ -333,10 +361,15 @@
SelectedImagePath = "Collection/CollectionIcon.png",
IsSelected = scene.collect,
};
- view.AddChidren(btnCollection);
+ //view.AddChidren(btnCollection);
+ //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
+ if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
+ {
+ view.AddChidren(btnCollection);
+ }
btnCollection.MouseUpEventHandler = (sender, e) => {
scene.collect = btnCollection.IsSelected = !btnCollection.IsSelected;
- scene.SaveSceneData();
+ scene.CollectScene();
};
LoadEvent_ControlScene(btnCoverd,btnName,btnZone, scene);
btnSettingIcon.MouseUpEventHandler = (sender, e) => {
@@ -346,13 +379,12 @@
Action refreshAction = () => {
btnName.Text = scene.name;
btnZone.Text = scene.GetRoomListName();
- //view.BackgroundImagePath = scene.ImagePath;
//2020-12-03 淇敼鍥剧墖鍔犺浇鏂规硶
ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, view);
};
var aep = new SceneEditPage(scene, backAction);
MainPage.BasePageView.AddChidren(aep);
- aep.LoadPage(StringId.EditScene, refreshAction);
+ aep.LoadPage(refreshAction);
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
};
}
@@ -372,9 +404,8 @@
//btnAddIcon.RemoveFromParent();
automationPage = new FrameLayout();
contentPageView.AddChidren(automationPage);
- HDL_ON.UI.UI2.Intelligence.Automation.MainView.automationPage = automationPage;
- HDL_ON.UI.UI2.Intelligence.Automation.MainView.MainShow();
-
+ UI2.Intelligence.Automation.MainView.automationPage = automationPage;
+ UI2.Intelligence.Automation.MainView.MainShow();
}
#endregion
}
@@ -454,6 +485,18 @@
{
if (!btnAutomationTitle.IsSelected)
{
+ //濡傛灉鏄垚鍛�
+ if (DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
+ {
+ //濡傛灉娌℃湁鍦烘櫙鏉冮檺
+ if (!DB_ResidenceData.Instance.CurrentRegion.isAllowCreateScene)
+ {
+ //鎻愮ず娌℃湁鍦烘櫙鐨勫垱寤烘潈闄�
+ Utlis.ShowTip(Language.StringByID(StringId.PermissionDenied));
+ return;
+ }
+ }
+
Action action = () =>
{
LoadSceneFunctionControlZone();
@@ -466,7 +509,7 @@
else
{
//璺宠浆鍒伴�昏緫鐣岄潰
- HDL_ON.UI.UI2.Intelligence.Automation.MainView.SkipAddLogicPage();
+ UI2.Intelligence.Automation.MainView.SkipAddLogicPage();
}
};
}
--
Gitblit v1.8.0