From 944b87b6bcccb095cd73f13f4410fb20faf48f74 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期三, 25 十二月 2019 11:21:06 +0800 Subject: [PATCH] 2019.12.25 --- ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs index 9077953..e1e988d 100644 --- 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,21 @@ { Y = Application.GetRealHeight(46), Height = Application.GetRealHeight(446 - 46), - LineColor = ZigbeeColor.Current.GXCGrayBackgroundColor + LineColor = ZigbeeColor.Current.GXCGrayBackgroundColor, + Tag= scene }; AddChidren(sceneRowLayout); - 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 { @@ -200,12 +202,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 +226,7 @@ { room.RemoveScene(scene); //RefreshBodyView(); - RemoveViewByTag((sender as Button).Tag); + RemoveFromParent(); } //0 绉婚櫎澶辫触 else if (removeSceneAllData.removeSceneData.Result == 0) @@ -237,7 +239,7 @@ { room.RemoveScene(scene); //RefreshBodyView(); - RemoveViewByTag((sender as Button).Tag); + RemoveFromParent(); CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneIsNull); return; } @@ -314,19 +316,18 @@ CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ControlSceneFail); } - var times = scene.SceneDelayTime; - scene.RemainTime = times; + scene.RemainTime = scene.SceneDelayTime; scene.SceneDelayTime = 0; new System.Threading.Thread(() => { - while (times > 0) + while (scene.RemainTime > 0) { System.Threading.Thread.Sleep(1000); Application.RunOnMainThread(() => { - SetTimeText(CommonFormResouce.GetTimeString(times)); + SetTimeText(CommonFormResouce.GetTimeString(scene.RemainTime)); }); - times -= 1; + scene.RemainTime -= 1; } Application.RunOnMainThread(() => { -- Gitblit v1.8.0