WJC
2019-12-03 f8b647c263f068babb8efcc19ff4e74026a4bd28
ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
old mode 100755 new mode 100644
@@ -4,9 +4,6 @@
using Shared.Common;
using Shared.Phone;
using Shared.R;
//if (Application.DeviceType == Device.Android) {
//}
//using UIKit;//ios平台才有,android没有;
using ZigBee.Device;
@@ -22,7 +19,6 @@
        public void Show(int isInt=0, bool edit=false)
        {
            #region  最上面的布局代码
            var topRowLayout = new RowLayout
@@ -35,7 +31,7 @@
            var titleName = new Button
            {
                TextSize = 16,
                TextSize = 17,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(176),
@@ -120,6 +116,8 @@
                Y = blancolor.Bottom + Application.GetRealHeight(50),
                TextID =MyInternationalizationString.createtimetext,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                TextSize = 15,
            };
            middle.AddChidren(titleText);
@@ -130,7 +128,7 @@
                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
            };
            middle.AddChidren(PickerViewfra);
            PickerViewfra.SetCornerWithSameRadius(20, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            var mUIPickerView = new UIPickerView
@@ -164,12 +162,20 @@
            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);
                if (timevalue > 3600)
                {
                    //更新最新状态
                    mUIPickerView.setCurrentItems(60, timevalue - 3600, 0);
                }
                else
                {
                    var minutevalue1 = timevalue / 60;
                    var secondvalue1 = timevalue % 60;
                    //更新最新状态
                    mUIPickerView.setCurrentItems(minutevalue1, secondvalue1, 0);
                }
                value = timevalue;
            }
            string selectde = "";
@@ -199,7 +205,10 @@
            ///完成点击事件
            btnsave.MouseUpEventHandler += (sender, e) =>
            {
                if (timevalue == 0)
                {
                    return;
                }
                if (selectde != ""|| timevalue==5)
                {
                    Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
@@ -235,5 +244,3 @@
        }
    }
}