黄学彪
2020-04-16 9d3c2727f1cd12f0a29c75f4ddff851d5243ac81
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -932,10 +932,19 @@
                var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
                var form = new BottomItemSelectForm();
                form.CancelCallEvent = true;//允许取消
                form.AddForm(title, listText, nowSelectNo);
                form.FinishSelectEvent += (selectNo) =>
                {
                    if (selectNo == -1)
                    {
                        //选择取消
                        btnFunction.Text = string.Empty;
                    }
                    else
                    {
                    btnFunction.Text = listText[selectNo];
                    }
                    nowSelectNo = selectNo;
                    //记录起当前选择的功能类型
                    if (selectNo == 0)
@@ -956,7 +965,7 @@
                            this.listNewDevice[0].IconPath = "Device/Light.png";
                        }
                    }
                    else
                    else if (selectNo == 2)
                    {
                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A插座;
                        if (this.listNewDevice[0].IsCustomizeImage == false)
@@ -965,6 +974,15 @@
                            this.listNewDevice[0].IconPath = "Device/Socket1.png";
                        }
                    }
                    else
                    {
                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A未定义;
                        if (this.listNewDevice[0].IsCustomizeImage == false)
                        {
                            //重新设置图片
                            this.listNewDevice[0].IconPath = "Device/Switch.png";
                        }
                    }
                    this.listNewDevice[0].ReSave();
                };
            };