| | |
| | | {
|
| | | device.IconPath = "Device/Light.png";
|
| | | }
|
| | | else
|
| | | {
|
| | | device.IconPath = "Device/RelayEpoint.png";
|
| | | }
|
| | | device.ReSave();
|
| | | }
|
| | | this.CloseProgressBar();
|
| | |
| | | var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
|
| | |
|
| | | var form = new BottomItemSelectForm();
|
| | | form.CancelCallEvent = true;//允许取消
|
| | | form.AddForm(title, listText, nowSelectNo);
|
| | | form.FinishSelectEvent += (selectNo) =>
|
| | | {
|
| | | btnFunction.Text = listText[selectNo];
|
| | | if (selectNo == -1)
|
| | | {
|
| | | //选择取消
|
| | | btnFunction.Text = string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | btnFunction.Text = listText[selectNo];
|
| | | }
|
| | | nowSelectNo = selectNo;
|
| | | //记录起当前选择的功能类型
|
| | | if (selectNo == 0)
|
| | |
| | | {
|
| | | dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A灯光;
|
| | | }
|
| | | else
|
| | | else if (selectNo == 2)
|
| | | {
|
| | | dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A插座;
|
| | | }
|
| | | else
|
| | | {
|
| | | dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A未定义;
|
| | | }
|
| | | };
|
| | | };
|
| | | }
|