| | |
| | | |
| | | var dev = new AddedDeviceBindResponseAllData(); |
| | | dev = await currentKey.AddDeviceBindAsync(addBindeDev); |
| | | if (dev != null || dev.addedDeviceBindResponseData == null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | }); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | return; |
| | | } |
| | | else |
| | | if (dev != null && dev.addedDeviceBindResponseData != null) |
| | | { |
| | | if (dev.addedDeviceBindResponseData.Result == 0) |
| | | { |
| | |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | }); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | return; |
| | | } |
| | | } |
| | | else |
| | |
| | | oldMode = btnChoose; |
| | | oldMode.IsSelected = true; |
| | | oldMode.Visible = true; |
| | | currentKey.CurrentSwitchMode = btnModeText.Text; |
| | | if (btnModeText.Text == Language.StringByID(R.MyInternationalizationString.OnOffOn)) |
| | | { |
| | | currentModeID = 100; |
| | |
| | | oldMode = btnChoose; |
| | | oldMode.IsSelected = true; |
| | | oldMode.Visible = true; |
| | | currentKey.CurrentSwitchMode = btnModeText.Text; |
| | | if (btnModeText.Text == Language.StringByID(R.MyInternationalizationString.DimmerMode1)) |
| | | { |
| | | currentModeID = 200; |
| | |
| | | oldMode = btnChoose; |
| | | oldMode.IsSelected = true; |
| | | oldMode.Visible = true; |
| | | currentKey.CurrentSwitchMode = btnModeText.Text; |
| | | if (btnModeText.Text == Language.StringByID(R.MyInternationalizationString.WcdUp)) |
| | | { |
| | | currentModeID = 300; |