From 1c4904d77f484c075080942d87785481b52b6fb2 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期一, 28 十月 2019 14:58:46 +0800
Subject: [PATCH] Revert "Merge branch 'dev-tzy' into DEV_GXC"

---
 ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs |  215 +++++++++--------------------------------------------
 1 files changed, 39 insertions(+), 176 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
index 26cc142..2788f4b 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
@@ -16,214 +16,77 @@
         {
             Tag = "Logic";
         }
-
-        public void Show(int isInt=0, bool edit=false)
+        Dictionary<string, string> timeConditionsInfo = new Dictionary<string, string>();
+      
+        public void Show()
         {
-            
-
-            #region  鏈�涓婇潰鐨勫竷灞�浠g爜
-            var topRowLayout = new RowLayout
+            this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
+            var topFrameLayout = new FrameLayout
             {
-                BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
-                Height = Application.GetRealHeight(184),
-                LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
+                Height = Application.GetRealHeight(140),
+                Y = Application.GetRealHeight(80),
             };
-            this.AddChidren(topRowLayout);
+            AddChidren(topFrameLayout);
 
             var titleName = new Button
             {
-                TextSize = 16,
+                Text = "娣诲姞寤舵椂",
+                TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                TextAlignment = TextAlignment.CenterLeft,
-                X = Application.GetRealWidth(176),
-                Width = Application.GetRealWidth(400),
-                Height = Application.GetRealHeight(69),
-                Y = Application.GetRealHeight(92),
-                TextID = MyInternationalizationString.adddelay,
             };
-            topRowLayout.AddChidren(titleName);
+            topFrameLayout.AddChidren(titleName);
 
-            var clickBtn = new Button
-            {
-                Width = Application.GetRealWidth(81 + 51),
-                Height = Application.GetRealHeight(58 + 40),
-                Y = Application.GetRealHeight(98 - 40),
-            };
-            topRowLayout.AddChidren(clickBtn);
-            clickBtn.MouseDownEventHandler += (sender, e) =>
-            {
-                RemoveFromParent();
-            };
-
+         
             var back = new Button
             {
-                Width = Application.GetRealWidth(30),
-                Height = Application.GetRealHeight(51),
-                X = Application.GetRealWidth(81),
-                Y = Application.GetRealHeight(98),
-                //Gravity = Gravity.CenterVertical;
-                UnSelectedImagePath = "ZigeeLogic/back.png",
+                Width = Application.GetRealWidth(110),
+                Height = Application.GetRealHeight(110),
+                X = Application.GetRealWidth(20),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "ZigeeLogic/Back.png",
             };
-            topRowLayout.AddChidren(back);
+            topFrameLayout.AddChidren(back);
             back.MouseDownEventHandler += (sender, e) =>
             {
                 RemoveFromParent();
             };
-            #endregion
 
-            var middle = new FrameLayout
-            {
-                Y = topRowLayout.Bottom,
-                Height = Application.GetRealHeight(1920 - 184),
-                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
-            };
+            var middle = new FrameLayout();
+            middle.Y = topFrameLayout.Bottom;
+            middle.Height = Application.GetRealHeight(1920 - 220 - 174);
+            middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
             this.AddChidren(middle);
 
 
-            var blancolor = new FrameLayout
-            {
-                Width = Application.GetMinRealAverage(200),
-                Height = Application.GetMinRealAverage(200),
-                Y = Application.GetRealHeight(130),
-                BackgroundColor = 0xFFFFFFFF,
-                Radius = (uint)Application.GetMinRealAverage(100),
-                X = Application.GetRealWidth(440),
-            };
-            middle.AddChidren(blancolor);
-            var color = new FrameLayout
-            {
-                Width = blancolor.Width - Application.GetMinRealAverage(24),
-                Height = blancolor.Height - Application.GetMinRealAverage(24),
-                Y = Application.GetRealHeight(12),
-                BackgroundColor = 0xFFFEF1ED,
-                Radius = (uint)Application.GetMinRealAverage(86),
-                X = Application.GetRealWidth(12),
-            };
-            blancolor.AddChidren(color);
-            var btnicon = new Button
-            {
-                X = Application.GetRealWidth(48),
-                Width = Application.GetRealWidth(80),
-                Height = Application.GetRealHeight(80),
-                Y = Application.GetRealHeight(48),
-                UnSelectedImagePath = "ZigeeLogic/delay.png",
-            };
-            color.AddChidren(btnicon);
-            var titleText = new Button
-            {
-                Width = Application.GetMinRealAverage(480),
-                Height = Application.GetMinRealAverage(60),
-                X = Application.GetRealWidth(300),
-                Y = blancolor.Bottom + Application.GetRealHeight(50),
-                TextID =MyInternationalizationString.createtimetext,
-                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-            };
-            middle.AddChidren(titleText);
-
-            var PickerViewfra = new FrameLayout
-            {
-                Y = titleText.Bottom + Application.GetRealHeight(250),
-                Height = Application.GetRealHeight(1046),
-                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
-            };
-            middle.AddChidren(PickerViewfra);
 
 
-
-            var mUIPickerView = new UIPickerView
+            var timeview = new TimeView
             {
-                Y = Application.GetRealHeight(50),
+                Y = Application.GetRealHeight(400),
                 Height = Application.GetRealHeight(600),
+                BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
+                Width = Application.GetRealWidth(1080),
             };
-            PickerViewfra.AddChidren(mUIPickerView);
+           middle.AddChidren(timeview);
 
-            var mList1 = new List<string>();
-            var mList2 = new List<string>();
-            for (int i = 0; i < 61; i++)
+            var btnComplete = new Button
             {
-                if (i < 10)
-                {
-                    var a = "0" + i.ToString();
-                    mList1.Add(a + " " + Language.StringByID(MyInternationalizationString.minute));
-                    mList2.Add(a + " " + Language.StringByID(MyInternationalizationString.second));
-                }
-                else
-                {
-                    mList1.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.minute));
-                    mList2.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.second));
-                }
-
-            }
-            mUIPickerView.setNPicker(mList1, mList2, new List<string>());
-            ///榛樿鐘舵��
-            mUIPickerView.setCurrentItems(0, 5, 0);
-            int timevalue = 5;
-            int value = 0;
-            if (edit)
-            {
-                
-                timevalue = int.Parse(Common.Logic.CurrentLogic.Actions[isInt]["DelayTime"].ToString());
-                var minutevalue1 = timevalue / 60;
-                var secondvalue1 = timevalue % 60;
-                //鏇存柊鏈�鏂扮姸鎬�
-                mUIPickerView.setCurrentItems(minutevalue1, secondvalue1, 0);
-                value = timevalue;
-            }
-            string selectde = "";
-            mUIPickerView.OnSelectChangeEvent += (s1, s2, s3) =>
-            {
-                var minutevalue = int.Parse(mList1[s1].Split(' ')[0]);
-                var secondvalue = int.Parse(mList2[s2].Split(' ')[0]);
-                timevalue = minutevalue * 60 + secondvalue;
-                selectde = "yes";
-
+                Y = middle.Bottom,
+                Height = Application.GetRealHeight(174),
+                TextID = MyInternationalizationString.complete,
+                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextSize = 16,
             };
+            AddChidren(btnComplete);
 
-
-            var btnsave = new Button
-            {
-                Y = PickerViewfra.Height - Application.GetRealHeight(260),
-                X = Application.GetRealWidth(85),
-                Height = Application.GetRealHeight(130),
-                Width = Application.GetRealWidth(910),
-                Radius = (uint)Application.GetRealHeight(60),
-                BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
-                TextID = MyInternationalizationString.Save,
-                TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
-            };
-            PickerViewfra.AddChidren(btnsave);
 
             ///瀹屾垚鐐瑰嚮浜嬩欢
-            btnsave.MouseUpEventHandler += (sender, e) =>
+            btnComplete.MouseUpEventHandler += (sender, e) =>
             {
-                
-                if (selectde != ""|| timevalue==5)
-                {
-                    Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
-                    actionsInfo.Add("LinkType", 7);
-                    actionsInfo.Add("DelayTime", timevalue);
-                    if (edit)
-                    {
-                        Common.Logic.CurrentLogic.Actions.RemoveAt(isInt);
-                        Common.Logic.CurrentLogic.Actions.Insert(isInt, actionsInfo);
-                    }
-                    else
-                    {
-                        Common.Logic.CurrentLogic.Actions.Add(actionsInfo);
-
-                    }
-                }
-                else
-                {
-                    if (!edit)
-                    {
-                        var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
-                                              Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
-                                              Language.StringByID(MyInternationalizationString.complete));
-                        alert.Show();
-                        return;
-                    }
-                }
+                Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
+                actionsInfo.Add("LinkType", 10);
+                actionsInfo.Add("DelayTime", 5);
+                Common.Logic.CurrentLogic.Actions.Add(actionsInfo);
                 var logicCommunalPage = new LogicCommunalPage { };
                 UserView.HomePage.Instance.AddChidren(logicCommunalPage);
                 UserView.HomePage.Instance.PageIndex += 1;

--
Gitblit v1.8.0