| | |
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.FunctionSetting));
|
| | |
|
| | | //主人和管理员才能更改
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
|
| | | if (HdlUserCenterResourse.ResidenceOption.AuthorityNo == 1 || HdlUserCenterResourse.ResidenceOption.AuthorityNo == 2)
|
| | | {
|
| | | //初始化中部控件(主人,管理员)
|
| | | this.InitMiddleFrameByAdmin();
|
| | |
| | | };
|
| | |
|
| | | //设备所属类型
|
| | | var infoType = LocalDevice.Current.GetDeviceBelongEnumInfo(device);
|
| | | var infoType = HdlDeviceCommonLogic.Current.GetDeviceBelongEnumInfo(device);
|
| | | var btnBelongType = new NormalViewControl(700, 62, true);
|
| | | btnBelongType.Y = btnPic.Bottom + Application.GetRealHeight(35);
|
| | | btnBelongType.Gravity = Gravity.CenterHorizontal;
|
| | |
| | |
|
| | | //功能名称
|
| | | string caption = Language.StringByID(R.MyInternationalizationString.FunctionName);
|
| | | string deviceName = LocalDevice.Current.GetDeviceEpointName(device);
|
| | | string deviceName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | var btnNote = new FrameCaptionInputControl(caption, deviceName, listview.rowSpace / 2);
|
| | | btnNote.txtInput.MaxByte = 48;//限制只能输入48个字节
|
| | | listview.AddChidren(btnNote);
|
| | |
| | | btnNote.AddBottomLine();
|
| | | btnNote.txtInput.FinishInputEvent += () =>
|
| | | {
|
| | | string oldName = LocalDevice.Current.GetDeviceEpointName(device);
|
| | | string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | if (btnNote.Text == string.Empty)
|
| | | {
|
| | | btnNote.Text = oldName;
|
| | |
| | |
|
| | | //所属模块
|
| | | caption = Language.StringByID(R.MyInternationalizationString.BelongDevice);
|
| | | deviceName = Common.LocalDevice.Current.GetDeviceMacName(device);
|
| | | deviceName = HdlDeviceCommonLogic.Current.GetDeviceMacName(device);
|
| | | var rowBelongModul = new FrameCaptionViewControl(caption, deviceName, listview.rowSpace / 2);
|
| | | listview.AddChidren(rowBelongModul);
|
| | | rowBelongModul.InitControl();
|
| | |
| | | bodyFrameLayout.AddChidren(btnFinish);
|
| | | btnFinish.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | string oldName = LocalDevice.Current.GetDeviceEpointName(device);
|
| | | string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | if (btnNote.Text.Trim() == string.Empty)
|
| | | {
|
| | | btnNote.Text = oldName;
|
| | |
| | | btnPic.InitControl(device.DeviceAddr, device.DeviceEpoint);
|
| | |
|
| | | //设备所属类型
|
| | | var infoType = LocalDevice.Current.GetDeviceBelongEnumInfo(device);
|
| | | var infoType = HdlDeviceCommonLogic.Current.GetDeviceBelongEnumInfo(device);
|
| | | var btnBelongType = new NormalViewControl(700, 62, true);
|
| | | btnBelongType.Y = btnPic.Bottom + Application.GetRealHeight(35);
|
| | | btnBelongType.Gravity = Gravity.CenterHorizontal;
|
| | |
| | |
|
| | | //功能名称
|
| | | string caption = Language.StringByID(R.MyInternationalizationString.FunctionName);
|
| | | string nameValue = LocalDevice.Current.GetDeviceEpointName(device);
|
| | | string nameValue = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | var btnNote = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
|
| | | btnNote.UseClickStatu = false;
|
| | | listview.AddChidren(btnNote);
|
| | |
| | |
|
| | | //所属模块
|
| | | caption = Language.StringByID(R.MyInternationalizationString.BelongDevice);
|
| | | nameValue = Common.LocalDevice.Current.GetDeviceMacName(device);
|
| | | nameValue = HdlDeviceCommonLogic.Current.GetDeviceMacName(device);
|
| | | var rowBelongModul = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
|
| | | rowBelongModul.UseClickStatu = false;
|
| | | listview.AddChidren(rowBelongModul);
|
| | |
| | | {
|
| | | //修改MAC名
|
| | | string deviceName = i_deviceName.Trim();
|
| | | var result = LocalDevice.Current.ReName(this.device, deviceName);
|
| | | var result = HdlDeviceCommonLogic.Current.ReName(this.device, deviceName);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|