| | |
| | | /// <param name="frameLayout">弹窗父控件</param> |
| | | /// <param name="stateValue">之前状态值</param> |
| | | /// <param name="action">返回结果</param> |
| | | public void FLayoutView(FrameLayout frameLayout, string stateValue, Action<string> action,int min,int max) |
| | | public void FLayoutView(FrameLayout frameLayout, string stateValue, Action<string> action,int min,int max,string unit) |
| | | { |
| | | FrameLayout frame = new FrameLayout |
| | | { |
| | |
| | | for (int i = min; i < max; i++) |
| | | { |
| | | //添加数据 |
| | | temperatureList.Add(i.ToString() + "℃"); |
| | | temperatureList.Add((i + 0.5).ToString() + "℃"); |
| | | temperatureList.Add(i.ToString() + unit); |
| | | temperatureList.Add((i + 0.5).ToString() + unit); |
| | | } |
| | | //加载数据界面的设置方法(列表互不联动) |
| | | view.mUIPickerView.setNPicker(temperatureList, null, null); |
| | | //默认初始选中状态 |
| | | view.mUIPickerView.setCurrentItems(9, 0, 0); |
| | | //定义一个局部变量记录选中时间 |
| | | string temperature = "25℃"; |
| | | string temperature = "25"+ unit; |
| | | for (int i = 0; i < temperatureList.Count; i++) |
| | | { |
| | | if (temperatureList[i] == stateValue) |