old mode 100755
new mode 100644
| | |
| | | using System.Collections.Generic;
|
| | | using System.Threading.Tasks;
|
| | | using Shared.Common;
|
| | | using Shared.Phone.UserCenter.Device.Bind;
|
| | | using Shared.Phone.UserCenter.DeviceBind;
|
| | | using ZigBee.Device;
|
| | |
|
| | | namespace Shared.Phone.UserCenter.Device
|
| | |
| | | /// </summary>
|
| | | public class DeviceMacInfoEditorForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | #region ■ 变量声明___________________________ |
| | | /// <summary>
|
| | | /// 设备对象
|
| | | /// </summary>
|
| | |
| | | /// 中央空调的版本控件
|
| | | /// </summary>
|
| | | private NormalViewControl btnAirConditionerVersion = null;
|
| | |
|
| | | /// <summary>
|
| | | /// 简约面板绑定的温度目标名字
|
| | | /// </summary>
|
| | | private string bindTemperatureName = string.Empty;
|
| | | /// <summary>
|
| | | /// 简约面板绑定的湿度目标名字
|
| | | /// </summary>
|
| | | private string bindHumidityName = string.Empty;
|
| | | /// <summary>
|
| | | /// 简约面板绑定被绑目标是温度
|
| | | /// </summary>
|
| | | private CommonDevice bindTemperatureDev;
|
| | | /// <summary>
|
| | | /// 简约面板绑定被绑目标是湿度
|
| | | /// </summary>
|
| | | private CommonDevice bindHumidityDev;
|
| | | /// <summary>
|
| | | /// 简约面板当前Mac
|
| | | /// </summary>
|
| | | private string deviceMacTemp = string.Empty;
|
| | | // <summary>
|
| | | /// 简约面板中被绑定的温湿度目标列表
|
| | | /// </summary>
|
| | | private List<BindObj.BindListResponseObj> bindList = new List<BindObj.BindListResponseObj>();
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
| | | //针对单纯只有一个200端点的设备
|
| | | listNewDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac));
|
| | | }
|
| | |
|
| | | this.listDeviceType.Clear();
|
| | | deviceMacTemp = deviceMac;
|
| | | foreach (var device in listNewDevice)
|
| | | {
|
| | | //收集设备类型
|
| | |
| | |
|
| | | //重新获取硬件信息
|
| | | this.RefreshHardFirmwareInfo();
|
| | |
|
| | | //简约多功能面板获取绑定目标的显示
|
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
|
| | | {
|
| | | //简约面板随便一个回路来获取设备信息
|
| | | var dev = Common.LocalDevice.Current.GetDevice(deviceMac, 62);
|
| | | var key = new ZigBee.Device.Panel();
|
| | | key.DeviceAddr = deviceMac;
|
| | | key.CurrentGateWayId = dev.CurrentGateWayId;
|
| | | InitBindInfo(key);
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | //添加【室内机设置】行(空调专用)
|
| | | this.AddIndoorUnitSettionRow();
|
| | | }
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
|
| | | {
|
| | | //简约多功能面板
|
| | | this.AddIBindRow(deviceMacTemp);
|
| | | this.AddFunctionSettionRow();
|
| | | this.AddHumiditySourceRow(deviceMacTemp);
|
| | | this.AddTemperatureSensorRow(deviceMacTemp);
|
| | | }
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
|
| | | {
|
| | | //添加【绑定目标】行(简约环境面板用) |
| | | this.AddSimplePanelSettionRow();
|
| | | }
|
| | | else
|
| | | {
|
| | | //添加【工作模式】行(pir传感器专用)
|
| | |
| | | if (this.CheckCanShowFunctionSettionRow() == true)
|
| | | {
|
| | | //添加【功能设置】行
|
| | | this.AddFunctionSettionRow();
|
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.Sensor_PMTwoPointFive)
|
| | | {
|
| | | //PM传感器
|
| | | this.AddFunctionSettionRowPM();
|
| | | }
|
| | | else
|
| | | {
|
| | | this.AddFunctionSettionRow();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | //添加【干接点设置】行
|
| | |
| | | };
|
| | | }
|
| | |
|
| | | #region ■ 简约环境(面板)_____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加【按键设置】行简约环境(面板)
|
| | | /// </summary>
|
| | | private void AddSimplePanelSettionRow()
|
| | | {
|
| | | //按键设置
|
| | | string caption = Language.StringByID(R.MyInternationalizationString.uPanelSettion);
|
| | | var btnFunction = new FrameRowControl(listview.rowSpace / 2);
|
| | | listview.AddChidren(btnFunction);
|
| | | btnFunction.AddLeftCaption(caption, 600);
|
| | | //向右图标
|
| | | btnFunction.AddRightArrow();
|
| | | //底线
|
| | | btnFunction.AddBottomLine();
|
| | | btnFunction.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //简约环境面板的按键配置
|
| | | var form = new DevicePanel.PanelSimpleEnvironmentButtonSettionForm();
|
| | | form.AddForm(listNewDevice[0]);
|
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 按键设置(方悦)_____________________
|
| | |
| | | var form = new DevicePanel.PanelFangyueEnvironmentButtonSettionForm();
|
| | | form.AddForm(listNewDevice[0]);
|
| | | }
|
| | | else
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
|
| | | {
|
| | | //方悦新风面板的按键配置
|
| | | var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm();
|
| | | form.AddForm(listNewDevice[0]);
|
| | | }
|
| | | else
|
| | | {
|
| | | var form = new DevicePanel.PanelFangyueButtonSettionForm();
|
| | | form.AddForm(listNewDevice[0]);
|
| | | }
|
| | | };
|
| | |
| | | //只有回路数大于1才能有这个菜单
|
| | | if (Common.LocalDevice.Current.GetDevicesCountByMac(listNewDevice[0].DeviceAddr) == 1)
|
| | | {
|
| | | //要求新风小模块的新风有功能设置
|
| | | //新风小模块只有一个回路,但要求新风小模块的新风有功能设置
|
| | | if (deviceEnumInfo.ConcreteType != DeviceConcreteType.Relay_FangyueFreshAirModul)
|
| | | {
|
| | | return;
|
| | |
| | | || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEight)
|
| | | {
|
| | | var form = new DevicePanel.PanelFangyueFunctionSettionForm();
|
| | | form.AddForm(listNewDevice[0]);
|
| | | form.AddForm(listNewDevice[0], deviceEnumInfo);
|
| | | }
|
| | | //简约环境面板的按键配置
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
|
| | | {
|
| | | var form = new DeviceFunctionSettionForm();
|
| | | if (listNewDevice.Count > 62)
|
| | | {
|
| | | form.AddForm(listNewDevice[62], true);
|
| | | }
|
| | | }
|
| | | //河东的面板设备
|
| | | else if (deviceEnumInfo.BeloneType == DeviceBeloneType.A按键面板 && deviceEnumInfo.IsHdlDevice == true)
|
| | |
| | | var form = new DeviceFunctionSettionForm();
|
| | | form.AddForm(listNewDevice[0], false);
|
| | | }
|
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 添加传感器【功能设置】行
|
| | | /// </summary>
|
| | | private void AddFunctionSettionRowPM()
|
| | | {
|
| | | //功能设置
|
| | | string caption = Language.StringByID(R.MyInternationalizationString.uFunctionSettingUp);
|
| | | var btnFunction = new FrameRowControl(listview.rowSpace / 2);
|
| | | listview.AddChidren(btnFunction);
|
| | | btnFunction.AddLeftCaption(caption, 600);
|
| | | //向右图标
|
| | | btnFunction.AddRightArrow();
|
| | | //底线
|
| | | btnFunction.AddBottomLine();
|
| | | btnFunction.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new DeviceFunctionSettionForm();
|
| | | form.AddForm(listNewDevice[0], false);
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | btnFunction.AddLeftCaption(caption, 600);
|
| | | //开关图标
|
| | | var btnSwitch = btnFunction.AddMostRightSwitchIcon();
|
| | | //如果当前住宅是虚拟住宅的话,让所有菜单都不能点击
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | btnSwitch.CanClick = false;
|
| | | }
|
| | | //底线
|
| | | btnFunction.AddBottomLine();
|
| | | btnSwitch.ButtonClickEvent += async (sender, e) =>
|
| | | btnSwitch.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //切换模式
|
| | | bool statu = !btnSwitch.IsSelected;
|
| | | var result = await HdlDeviceCurtainLogic.Current.SetHandPullControl(deviceCurtain, statu);
|
| | | var result = HdlDeviceCurtainLogic.Current.SetHandPullControl(deviceCurtain, statu);
|
| | | if (result == true)
|
| | | {
|
| | | btnSwitch.IsSelected = statu;
|
| | | }
|
| | | };
|
| | | //如果是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | btnSwitch.IsSelected = ModelData.DeviceModelDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
|
| | | return;
|
| | | }
|
| | |
|
| | | //添加属性上报监听
|
| | | string mainkeys = LocalDevice.Current.GetDeviceMainKeys(this.listNewDevice[0]);
|
| | |
| | | form.AddForm(listNewDevice[0].DeviceAddr);
|
| | | };
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region ■ 简约多功能面板用___________________
|
| | | /// <summary>
|
| | | /// 添加【绑定目标】行
|
| | | /// </summary>
|
| | | private void AddIBindRow(string deviceMac)
|
| | | {
|
| | | string bindTargets = Language.StringByID(R.MyInternationalizationString.uBindTargets);
|
| | | var btnBindTargets = new FrameRowControl(listview.rowSpace / 2);
|
| | | listview.AddChidren(btnBindTargets);
|
| | | btnBindTargets.AddLeftCaption(bindTargets, 600);
|
| | | //向右图标
|
| | | btnBindTargets.AddRightArrow();
|
| | | //底线
|
| | | btnBindTargets.AddBottomLine();
|
| | | btnBindTargets.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var simpleMutilfunctionTargetsPage = new Shared.Phone.UserCenter.DeviceBind.PanelSimpleMutilfunctionTargetsForm(deviceMac);
|
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(simpleMutilfunctionTargetsPage);
|
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
| | | simpleMutilfunctionTargetsPage.Show();
|
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 湿度来源行
|
| | | /// </summary>
|
| | | private void AddHumiditySourceRow(string deviceMac)
|
| | | {
|
| | | //湿度
|
| | | var rowHumidity = new FrameRowControl(listview.rowSpace / 2);
|
| | | listview.AddChidren(rowHumidity);
|
| | | rowHumidity.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.HumiditySource), 600);
|
| | | //底线
|
| | | rowHumidity.AddBottomLine();
|
| | | //右箭头
|
| | | rowHumidity.AddRightArrow();
|
| | | var msg = Language.StringByID(R.MyInternationalizationString.nothing);
|
| | | if (!string.IsNullOrEmpty(bindHumidityName))
|
| | | {
|
| | | msg = bindHumidityName;
|
| | | }
|
| | | var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700);
|
| | | rowHumidity.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | |
|
| | | var dev = Common.LocalDevice.Current.GetDevice(deviceMac, 62);//简约面板随便一个回路来获取设备
|
| | | var device = new CommonDevice();
|
| | | if (dev != null)
|
| | | {
|
| | | device.CurrentGateWayId = dev.CurrentGateWayId;
|
| | | }
|
| | | device.Type = DeviceType.OnOffSwitch;
|
| | | device.DeviceAddr = deviceMac;
|
| | | device.DeviceEpoint = 65;//能绑定湿度的回路
|
| | | var paneTargetsBaseFormp = new PaneTargetsBaseForm(device, bindHumidityDev, BindInfo.BindType.Humidity);
|
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp);
|
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
| | | paneTargetsBaseFormp.Show();
|
| | | paneTargetsBaseFormp.actionHumidityTarget += (bindName) =>
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | if (string.IsNullOrEmpty(bindName))
|
| | | {
|
| | | btnHumidityStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
|
| | | }
|
| | | else
|
| | | {
|
| | | btnHumidityStatu.Text = bindName;
|
| | | }
|
| | | });
|
| | | };
|
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 温度来源行
|
| | | /// </summary>
|
| | | private void AddTemperatureSensorRow(string deviceMac)
|
| | | {
|
| | | //温度来源
|
| | | var rowTemPerature = new FrameRowControl(listview.rowSpace / 2);
|
| | | listview.AddChidren(rowTemPerature);
|
| | | rowTemPerature.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.TemperatureSource), 600);
|
| | | //底线
|
| | | rowTemPerature.AddBottomLine();
|
| | | //右箭头
|
| | | rowTemPerature.AddRightArrow();
|
| | | var msg = Language.StringByID(R.MyInternationalizationString.nothing);
|
| | | if (!string.IsNullOrEmpty(bindTemperatureName))
|
| | | {
|
| | | msg = bindTemperatureName;
|
| | | }
|
| | | var btnTemperatureStatu = rowTemPerature.AddMostRightView(msg, 700);
|
| | | rowTemPerature.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var dev = Common.LocalDevice.Current.GetDevice(deviceMac, 62);//简约面板随便一个回路来获取设备
|
| | | var device = new CommonDevice();
|
| | | if (dev != null)
|
| | | {
|
| | | device.CurrentGateWayId = dev.CurrentGateWayId;
|
| | | }
|
| | | device.Type = DeviceType.OnOffSwitch;
|
| | | device.DeviceAddr = deviceMac;
|
| | | device.DeviceEpoint = 64;//能绑定温度的回路
|
| | | var paneTargetsBaseFormp = new PaneTargetsBaseForm(device, bindTemperatureDev, BindInfo.BindType.Temperature);
|
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp);
|
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
| | | paneTargetsBaseFormp.Show();
|
| | | paneTargetsBaseFormp.actionTemperatureTarget += (bindName) =>
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | if (string.IsNullOrEmpty(bindName))
|
| | | {
|
| | | btnTemperatureStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
|
| | | }
|
| | | else
|
| | | {
|
| | | btnTemperatureStatu.Text = bindName;
|
| | | }
|
| | | });
|
| | | };
|
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | ///读温湿度数据
|
| | | /// </summary>
|
| | | void InitBindInfo(CommonDevice curControlDev)
|
| | | {
|
| | | System.Threading.Tasks.Task.Run(async () =>
|
| | | {
|
| | | try
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | CommonPage.Loading.Start("");
|
| | | });
|
| | | //1、获去绑定的温度传感器
|
| | | curControlDev.DeviceEpoint = 64;
|
| | | var result = await GetBindName(curControlDev);
|
| | | if (!result)
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
|
| | | });
|
| | | return;
|
| | | }
|
| | |
|
| | | //2、获去绑定的湿度度传感器
|
| | | curControlDev.DeviceEpoint = 65;
|
| | | var result2 = await GetBindName(curControlDev);
|
| | | if (!result2)
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
|
| | | });
|
| | | return;
|
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | var mess = ex.Message;
|
| | | }
|
| | | finally
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | //初始化中部控件
|
| | | this.InitMiddleFrame();
|
| | | CommonPage.Loading.Hide();
|
| | | });
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 获取绑定的温湿度目标
|
| | | /// </summary>
|
| | | /// <param name="curControlDev"></param>
|
| | | /// <returns></returns>
|
| | | private async System.Threading.Tasks.Task<bool> GetBindName(CommonDevice curControlDev)
|
| | | {
|
| | | bool result = false;
|
| | | var panelBindListRes = HdlDeviceBindLogic.Current.GetDeviceBindAsync(curControlDev);
|
| | | if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null)
|
| | | {
|
| | | bindList = panelBindListRes.getAllBindResponseData.BindList;
|
| | | foreach (var bDev in bindList)
|
| | | {
|
| | | var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
|
| | | if (device.Type == DeviceType.TemperatureSensor)
|
| | | {
|
| | | var bD = device as TemperatureSensor;
|
| | | if (bD.SensorDiv == 1 && bDev.BindCluster == 1026)
|
| | | {
|
| | | if (string.IsNullOrEmpty(bDev.ESName))
|
| | | {
|
| | | bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | }
|
| | | else
|
| | | {
|
| | | bindTemperatureName = bDev.ESName;
|
| | | }
|
| | | bindTemperatureDev = device;
|
| | | }
|
| | | if (bD.SensorDiv == 2 && bDev.BindCluster == 1029)
|
| | | {
|
| | | if (string.IsNullOrEmpty(bDev.ESName))
|
| | | {
|
| | | bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | }
|
| | | else
|
| | | {
|
| | | bindHumidityName = bDev.ESName;
|
| | | }
|
| | |
|
| | | bindHumidityDev = device;
|
| | | }
|
| | | }
|
| | | if (device.Type == DeviceType.FreshAirHumiditySensor)
|
| | | {
|
| | | if (string.IsNullOrEmpty(bDev.ESName))
|
| | | {
|
| | | bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | }
|
| | | else
|
| | | {
|
| | | bindHumidityName = bDev.ESName;
|
| | | }
|
| | |
|
| | | bindHumidityDev = device;
|
| | | }
|
| | | }
|
| | | result = true;
|
| | | }
|
| | | return result;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region ■ 功能类型(空气开关专用)_____________
|
| | |
| | | btnNewVersion.Visible = false;
|
| | | btnNewVersion.X = Application.GetRealWidth(242);
|
| | | btnNewVersion.Y = Application.GetRealHeight(23);
|
| | | rowUpDate.AddChidren(btnNewVersion, ChidrenBindMode.BindEventOnly);
|
| | | rowUpDate.AddChidren(btnNewVersion, ChidrenBindMode.BindEvent);
|
| | |
|
| | | rowUpDate.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | |
| | | /// 设备重命名
|
| | | /// </summary>
|
| | | /// <param name="i_deviceName">deviceName.</param>
|
| | | private async void DeviceReName(string i_deviceName, bool closeForm)
|
| | | private void DeviceReName(string i_deviceName, bool closeForm)
|
| | | {
|
| | | //修改MAC名
|
| | | string deviceName = i_deviceName.Trim();
|
| | | var result = await Common.LocalDevice.Current.ReMacName(this.listNewDevice, deviceName);
|
| | | var result = Common.LocalDevice.Current.ReMacName(this.listNewDevice, deviceName);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | |
| | | //检测此回路是否拥有定位功能(拿端点最小的那个回路去定位)
|
| | | bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
|
| | |
|
| | | var frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
|
| | | TopRightMenuControl frame = null; |
| | | |
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction) |
| | | { |
| | | frame = new TopRightMenuControl(3, 1); |
| | | } |
| | | else |
| | | { |
| | | frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1); |
| | | } |
| | |
|
| | | string deviceMenu = string.Empty;
|
| | | if (canTest == true)
|
| | | {
|
| | |
| | | //删除指定设备
|
| | | this.DoDeleteDevice();
|
| | | });
|
| | | });
|
| | | }); |
| | | |
| | | //同步 |
| | | deviceMenu = Language.StringByID(R.MyInternationalizationString.Synchronization);
|
| | | if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0])) |
| | | { |
| | | frame.AddRowMenu(deviceMenu, "", "Item/SynchronizationSelected.png", () => |
| | | { |
| | | //如果当前住宅是虚拟住宅,此功能无效 |
| | | if (Common.Config.Instance.Home.IsVirtually == true) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | //同步指定设备 |
| | | this.SynchronizationDevice(); |
| | | }); |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
| | | this.CloseForm();
|
| | | });
|
| | | });
|
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 同步指定设备
|
| | | /// </summary>
|
| | | private void SynchronizationDevice()
|
| | | {
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | //打开进度条
|
| | | this.ShowProgressBar();
|
| | |
|
| | | //同步设备
|
| | | bool result = await Common.LocalDevice.Current.SynchronizationDevice(listNewDevice);
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //关闭界面
|
| | | this.CloseForm();
|
| | | });
|
| | | });
|
| | | }
|
| | | #endregion
|
| | |
|