| | |
| | | targetView.btnText.Text = device.name; |
| | | //改变设备名称显示控件宽度 |
| | | targetView.btnText.Width = Application.GetRealWidth(80); |
| | | targetView.btnDelay.Visible = false; |
| | | //区别不同设备,显示不同设备状态 |
| | | switch (device.spk) |
| | | { |
| | |
| | | { |
| | | |
| | | InpOrOutLogicMethod inpOrOutLogicMethod = new InpOrOutLogicMethod(); |
| | | inpOrOutLogicMethod.Delayed(thisView, outputTarget, (value) => |
| | | inpOrOutLogicMethod.Delayed(thisView, outputTarget.delay, (value) => |
| | | { |
| | | outputTarget.delay = value.ToString(); |
| | | if (outputTarget.target_type == "1") |
| | |
| | | /// <summary> |
| | | /// 延时时间方法 |
| | | /// </summary> |
| | | /// <param name="fLayout">在哪个界面显示</param> |
| | | /// <param name="edit">(true=编辑;false=新建)</param> |
| | | /// <param name="index">编辑条件的索引</param> |
| | | private void Delayed(FrameLayout thisFLayout, Output output, Action<int> action) |
| | | /// <param name="thisFLayout">在哪个界面显示</param> |
| | | /// <param name="delay">当前延时时间</param> |
| | | /// <param name="action">回调函数</param> |
| | | public void Delayed(FrameLayout thisFLayout, string delay, Action<int> action) |
| | | { |
| | | FrameLayout fLayout = new FrameLayout |
| | | { |
| | |
| | | //定义一个局部变量记录选中时间 |
| | | int timepoint = 5; |
| | | |
| | | if (output.delay != "0") |
| | | if (delay != "0") |
| | | { |
| | | int intValue = int.Parse(output.delay); |
| | | int intValue = int.Parse(delay); |
| | | var m = intValue / 60; |
| | | var s = intValue % 60; |
| | | |
| | |
| | | //选中时间回调方法,时间变化一次回调一次 |
| | | timePointView.mUIPickerView.OnSelectChangeEvent += (index1, index2, index3) => |
| | | { |
| | | string minuet = timePointView.GethStringList0()[index1].Split(' ')[0]; |
| | | string second = timePointView.GetmStringList()[index2].Split(' ')[0]; |
| | | string minuet = timePointView.GetmStringList()[index1].Split(' ')[0]; |
| | | string second = timePointView.GetsStringList()[index2].Split(' ')[0]; |
| | | int minuetIntValue = int.Parse(minuet); |
| | | int secondIntValue = int.Parse(second); |
| | | timepoint = minuetIntValue * 60 + secondIntValue; |