From 34e965100d635346e2d4cd6e6013bdaed66b3004 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 02 一月 2020 19:52:13 +0800
Subject: [PATCH] 2019.1.2-3
---
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
old mode 100755
new mode 100644
index 28e2981..ff45178
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
@@ -23,7 +23,7 @@
/// <summary>
/// sceneImg
/// </summary>
- private Button sceneImg;
+ private ImageView sceneImg;
/// <summary>
/// SceneCategoryView
@@ -60,19 +60,22 @@
{
Y = Application.GetRealHeight(46),
Height = Application.GetRealHeight(446 - 46),
- LineColor = ZigbeeColor.Current.GXCGrayBackgroundColor
+ LineColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+ Tag= scene
};
AddChidren(sceneRowLayout);
+ sceneRowLayout.SubViewWidth = Application.GetRealWidth(199);
- sceneImg = new Button()
+ sceneImg = new ImageView()
{
X = Application.GetRealWidth(179),
Width = Application.GetRealWidth(844),
Height = Application.GetRealHeight(400),
- UnSelectedImagePath = scene.IconPath,
+ ImagePath = scene.IconPathType == 0 ? scene.IconPath : System.IO.Path.Combine(Config.Instance.FullPath, scene.IconPath),
Radius = (uint)Application.GetRealHeight(17)
};
sceneRowLayout.AddChidren(sceneImg);
+ //sceneImg.SetViewShadow(true);
var leftFL = new FrameLayout
{
@@ -162,8 +165,10 @@
var delayBtn = new RowLayoutDeleteButton
{
TextID = R.MyInternationalizationString.Delay,
- Tag = scene.SceneDelayTime
+ Tag = scene.SceneDelayTime,
+ BackgroundColor=ZigbeeColor.Current.GXCTextSelectedColor,
};
+ delayBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight);
sceneRowLayout.AddLeftView(delayBtn);
//缂栬緫
var settingBtn = new Device.CommonForm.RowLayoutEditButton()
@@ -171,12 +176,13 @@
TextID = R.MyInternationalizationString.Editor,
Tag = scene.SceneDelayTime
};
+ settingBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerTopLeft);
//鍒犻櫎
var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
{
Tag = scene
};
-
+ deleteBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight);
if (room.IsSharedRoom)
{
@@ -191,6 +197,7 @@
{
sceneRowLayout.AddRightView(settingBtn);
sceneRowLayout.AddRightView(deleteBtn);
+
}
}
@@ -200,12 +207,12 @@
if (room.IsLove)
{
Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteScene(scene);
- RemoveViewByTag((sender as Button).Tag);
+ RemoveFromParent();
}
else
{
var tip = new CustomAlert { };
- AddChidren(tip);
+ Common.CommonPage.Instance.AddChidren(tip);
tip.Show(Language.StringByID(R.MyInternationalizationString.ConfirmDelete));
tip.ResultEventHandler += async (e1) =>
@@ -224,7 +231,7 @@
{
room.RemoveScene(scene);
//RefreshBodyView();
- RemoveViewByTag((sender as Button).Tag);
+ RemoveFromParent();
}
//0 绉婚櫎澶辫触
else if (removeSceneAllData.removeSceneData.Result == 0)
@@ -237,7 +244,7 @@
{
room.RemoveScene(scene);
//RefreshBodyView();
- RemoveViewByTag((sender as Button).Tag);
+ RemoveFromParent();
CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneIsNull);
return;
}
--
Gitblit v1.8.0