| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string CodeIDString = "1.1.0120071701"; |
| | | public static string CodeIDString = "1.1.0120072102"; |
| | | /// <summary> |
| | | /// 注册来源(0:HDL On 1:Zigbee) |
| | | /// </summary> |
old mode 100644
new mode 100755
| | |
| | | {
|
| | | if (this.dicDeviceModelIdEnum.ContainsKey(strKey) == false)
|
| | | {
|
| | | return null;
|
| | | return new DeviceNameContent();
|
| | | }
|
| | | return this.dicDeviceModelIdEnum[strKey];
|
| | | }
|
| | |
| | | System.IO.StreamReader streamReader = null;
|
| | | var listText = new List<string>();
|
| | | try
|
| | | { |
| | | #if iOS |
| | | string textFile = Foundation.NSBundle.MainBundle.PathForResource("DeviceName.ini", null); |
| | | streamReader = new System.IO.StreamReader(textFile, Encoding.UTF8); |
| | | {
|
| | | #if iOS
|
| | | string textFile = Foundation.NSBundle.MainBundle.PathForResource("DeviceName.ini", null);
|
| | | streamReader = new System.IO.StreamReader(textFile, Encoding.UTF8);
|
| | | string text;
|
| | | while ((text = streamReader.ReadLine()) != null)
|
| | | {
|
| | | listText.Add(text.Trim());
|
| | | }
|
| | | return listText; |
| | | #endif |
| | | #if Android |
| | | return listText;
|
| | | #endif
|
| | | #if Android
|
| | | var stream = Application.Activity.Assets.Open("DeviceName.ini");
|
| | | streamReader = new System.IO.StreamReader(stream, Encoding.UTF8);
|
| | | string text;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | | #endregion
|
| | | }
|
| | |
|
| | | #region ■ 自定义设备类型_________________________
|
| | | #region ■ 自定义设备类型_________________________
|
| | |
|
| | | /// <summary>
|
| | | /// <para>设备的具体【设备类型】,变量名可以作为【设备类型】图片,这个值是瞎写的,没什么特殊意义</para>
|
| | |
| | | A干接点 = 16,
|
| | | }
|
| | |
|
| | | #endregion
|
| | | #endregion
|
| | | }
|
| | |
| | | /// <param name="comand"></param>
|
| | | private void SetCurtainCommand(int comand)
|
| | | {
|
| | | //2020.07.20变更:放开限制,不再等待网关回复,也能点击按钮
|
| | | //在没有接收到反馈之前,不能再点击
|
| | | this.btnClose.CanClick = false;
|
| | | this.btnOpen.CanClick = false;
|
| | | this.btnStop.CanClick = false;
|
| | | //this.btnClose.CanClick = false;
|
| | | //this.btnOpen.CanClick = false;
|
| | | //this.btnStop.CanClick = false;
|
| | |
|
| | | //检测是否获取网关反馈的结果,如果网关没有回复,则会弹出消息
|
| | | this.StartCheckResponeResult(new List<ButtonBase>(), (result) =>
|
| | | {
|
| | | //时间结束,可以再次点击
|
| | | this.btnClose.CanClick = true;
|
| | | this.btnOpen.CanClick = true;
|
| | | this.btnStop.CanClick = true;
|
| | | });
|
| | | //this.StartCheckResponeResult(new List<ButtonBase>(), (result) =>
|
| | | //{
|
| | | // //时间结束,可以再次点击
|
| | | // this.btnClose.CanClick = true;
|
| | | // this.btnOpen.CanClick = true;
|
| | | // this.btnStop.CanClick = true;
|
| | | //});
|
| | | //发送命令
|
| | | ((Rollershade)device).CurtainUpDownStopControl(comand);
|
| | | }
|
| | |
| | | btnHouseName.TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor;
|
| | | btnHouseName.IsBold = true;
|
| | | btnHouseName.Text = Config.Instance.Home.Name;
|
| | | btnHouseName.Width = btnHouseName.GetRealWidthByText();
|
| | | btnHouseName.Width = btnHouseName.GetRealWidthByText() + Application.GetRealWidth(100);
|
| | | this.listBodyContr.frameTable.AddChidren(btnHouseName);
|
| | |
|
| | | //切换住宅
|
| | |
| | | //设定一个时间
|
| | | Config.Instance.LoginDateTime = new DateTime(1970, 1, 1);
|
| | | Config.Instance.Save();
|
| | | //清空当前住宅id
|
| | | Config.Instance.HomeId = string.Empty;
|
| | | //收起左菜单
|
| | | CommonPage.Instance.CloseLeftMenu();
|
| | | //关闭全部弹窗
|
| | |
| | | }
|
| | | else if (view is UserView.UserPage)
|
| | | {
|
| | | var form = ((UserView.UserPage)view).GetNowActionForm();
|
| | | form?.FormActionAgainEvent();
|
| | | return;
|
| | | }
|
| | | else
|
| | |
| | | var myTip = new Tip(); |
| | | myTip.Direction = AMPopTipDirection.None; |
| | | myTip.CloseTime = 2; |
| | | myTip.Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime); |
| | | myTip.Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5006" + ")"; |
| | | myTip.Show(Common.CommonPage.Instance); |
| | | }); |
| | | return; |
| | |
| | | var myTip = new Tip(); |
| | | myTip.Direction = AMPopTipDirection.None; |
| | | myTip.CloseTime = 2; |
| | | myTip.Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime); |
| | | myTip.Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "120_ 6533" + ")"; |
| | | myTip.Show(Common.CommonPage.Instance); |
| | | }); |
| | | return; |
| | |
| | | btnFinish.Enable = true; |
| | | btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinish); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5001" + ")", Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinish); |
| | | }); |
| | | |
| | | return; |
| | |
| | | btnBackFrameLayout.AddChidren(btnBack); |
| | | titleFrameLayout.AddChidren(btnTitle); |
| | | btnTitle.Text = titleText; |
| | | |
| | | btnTitle.MouseLongEventHandler = (sender, e) => |
| | | { |
| | | var f1 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }; |
| | | this.titleFrameLayout.AddChidren(f1); |
| | | var btn1 = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealHeight(6), |
| | | Radius = (uint)Application.GetRealWidth(3), |
| | | BackgroundColor = 0xff000000, |
| | | }; |
| | | f1.AddChidren(btn1); |
| | | |
| | | f1.MouseLongEventHandler += (sender1, e1) => |
| | | { |
| | | ErrroInfoLayout(this); |
| | | f1.RemoveFromParent(); |
| | | }; |
| | | }; |
| | | } |
| | | /// <summary> |
| | | /// 中部布局 |
| | |
| | | sidelipFrameLayout.Height = Application.GetMinReal(780); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Layout |
| | | /// </summary> |
| | | public void ErrroInfoLayout(FrameLayout frameLayout) |
| | | { |
| | | // 准备加一需要输入密码才 dialog.Show(); |
| | | var editText = new EditText |
| | | { |
| | | Width = Application.GetRealWidth(800), |
| | | Height = Application.GetMinReal(100), |
| | | Text = "Bind", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = 12, |
| | | Gravity = Gravity.Center, |
| | | Radius = 10, |
| | | BorderColor = 0xffff00, |
| | | BorderWidth = 5, |
| | | BackgroundColor = 0xff000000, |
| | | }; |
| | | frameLayout.AddChidren(editText); |
| | | |
| | | |
| | | Action<Shared.View> action = (obj) => |
| | | { |
| | | if (editText.Text == "Bind") |
| | | { |
| | | editText.RemoveFromParent(); |
| | | |
| | | var dialog = new Dialog |
| | | { |
| | | }; |
| | | dialog.Show(); |
| | | |
| | | var flMain = new FrameLayout { BackgroundColor = 0xff000000 }; |
| | | dialog.AddChidren(flMain); |
| | | flMain.MouseUpEventHandler += (sender11, e11) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | |
| | | var titleFrameLayout = new FrameLayout |
| | | { |
| | | BackgroundColor = 0xff2f2f2f, |
| | | Height = Application.GetMinReal(80), |
| | | Y = Application.GetMinReal(80), |
| | | }; |
| | | dialog.AddChidren(titleFrameLayout); |
| | | |
| | | var title = new Button |
| | | { |
| | | Width = Application.GetRealWidth(1080 - 200), |
| | | Text = "Search Error Infomation", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = 12, |
| | | IsBold = true, |
| | | }; |
| | | titleFrameLayout.AddChidren(title); |
| | | title.MouseUpEventHandler += (sender11, e11) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | |
| | | var close = new Button |
| | | { |
| | | Height = Application.GetMinReal(80), |
| | | Width = Application.GetRealWidth(200), |
| | | X = Application.GetRealWidth(1080 - 200), |
| | | Text = "关闭", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 12, |
| | | Radius = 5, |
| | | }; |
| | | titleFrameLayout.AddChidren(close); |
| | | close.MouseUpEventHandler += (sender11, e11) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | |
| | | var contentLayout = new VerticalScrolViewLayout() |
| | | { |
| | | BackgroundColor = 0xff2f2f2f, |
| | | Y = titleFrameLayout.Bottom, |
| | | Height = Application.GetRealHeight(1710), |
| | | }; |
| | | flMain.AddChidren(contentLayout); |
| | | |
| | | var Info = GetErrorList(); |
| | | for (int i = 0; i < Info.Count; i++) |
| | | { |
| | | var mess = Info[i]; |
| | | var msgArry = mess.Split(new string[] { "[0]" }, StringSplitOptions.RemoveEmptyEntries); |
| | | |
| | | var row = new RowLayout() |
| | | { |
| | | Height = Application.GetRealHeight(90), |
| | | }; |
| | | contentLayout.AddChidren(row); |
| | | |
| | | var btnText1 = new Button |
| | | { |
| | | Height = Application.GetMinReal(80), |
| | | Width = Application.GetRealWidth(200), |
| | | X = Application.GetRealWidth(5), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 10, |
| | | Text = msgArry[0], |
| | | IsBold = true, |
| | | }; |
| | | row.AddChidren(btnText1); |
| | | |
| | | var btnText2 = new Button |
| | | { |
| | | Height = Application.GetMinReal(80), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 8, |
| | | X = btnText1.Right, |
| | | Text = msgArry[1], |
| | | }; |
| | | row.AddChidren(btnText2); |
| | | |
| | | if (msgArry.Length > 2) |
| | | { |
| | | btnText2.Height = Application.GetRealHeight(90 / 2); |
| | | |
| | | var btnText3 = new Button |
| | | { |
| | | X = btnText1.Right, |
| | | Y = Application.GetRealHeight(90 / 2), |
| | | Height = Application.GetRealHeight(90 / 2), |
| | | Text = msgArry[2], |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 8, |
| | | }; |
| | | row.AddChidren(btnText3); |
| | | } |
| | | } |
| | | } |
| | | |
| | | }; |
| | | editText.EditorEnterAction += action; |
| | | } |
| | | |
| | | /// <summary> |
| | | ///绑定错误表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private List<string> GetErrorList() |
| | | { |
| | | var sList = new List<string> { }; |
| | | sList.Add("0003:[0]获取按键支持的功能时,网关没回【 透传命令:0003 】"); |
| | | sList.Add("0003_switch:[0]获取开关具体类型时(私有功能第三级别),网关没回【透传命令:0003】"); |
| | | sList.Add("0003_dimmer:[0]获取调光具体类型时(私有功能第三级别),网关没回【透传命令:0003】"); |
| | | sList.Add("0003_curtain:[0]获取调光具体类型时(私有功能第三级别),网关没回【透传命令:0003】"); |
| | | sList.Add("108_ 6533:[0]读取面板的配置信息时,网关没回【命令108,属性6533】"); |
| | | sList.Add("120_ 6533:[0]配置面板功能时,网关没回【命令120,属性6533】"); |
| | | sList.Add("5001:[0]设备绑定时,网关没回【命令5001】"); |
| | | sList.Add("5001_1:[0]设备添加绑定目标时,网关绑定目标失败,绑定设备目标有漏掉【命令5001】"); |
| | | sList.Add("5001_2:[0]设备添加绑定目标时,网关回复未知错误【命令5001】"); |
| | | sList.Add("5003:[0]删除设备时,网关没回【命令5003】"); |
| | | sList.Add("5003_1:[0]当绑定空目标,发删除已经存在按键的目标时,[0]网关没回【命令5003】"); |
| | | sList.Add("5003_2:[0]当绑定空目标,发删除已经存在按键的目标时,[0]按键回复错误结果【命令5003】"); |
| | | sList.Add("5003_3:[0]当绑定空目标,发删除已经存在按键的目标时,[0]按键结果是空,网关回复错误结果【命令5003】"); |
| | | sList.Add("5003_4:[0]更换目标时,发删除按键旧的目标时,按键结果是空,[0]网关回复错误结果【命令5003】"); |
| | | sList.Add("5003_5:[0]更换目标时,发删除按键旧的目标时,[0]按键回复错误结果【命令5003】"); |
| | | sList.Add("5003_6:[0]更换目标时,发删除按键旧的目标时,按键结果是空,[0]网关回复错误结果【命令5003】"); |
| | | sList.Add("5003_7:[0]更换目标时,发删除按键旧的目标时,旧的同种类型的目标没有删除完,[0]不能绑定新的目标【命令5003】"); |
| | | sList.Add("5003_8:[0]删除单个设备,网关回复的结果是失败的【命令5003】"); |
| | | sList.Add("5003_9:[0]删除单个设备,网关回复错误单结果【命令5003】"); |
| | | sList.Add("5006:[0]删除按键所有绑定表时,网关没回【命令5006】"); |
| | | sList.Add("5007:[0]获取按键绑定表时, 网关没回【命令5007】"); |
| | | sList.Add("5007_1:[0]获取按键绑定表时,网关没回,结果是[0]获取多功能面板的目标个数不全【命令5007】"); |
| | | sList.Add("5007_2:[0]获取按键绑定的温度传感器失败【命令5007】"); |
| | | sList.Add("5007_3:[0]获取按键绑定的湿度度传感器失败【命令5007】"); |
| | | return sList; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | midVerticalRefreshLayout.EndHeaderRefreshing(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | return; |
| | | }); |
| | | } |
| | |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | midVerticalRefreshLayout.EndHeaderRefreshing(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "108_ 6533" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | return; |
| | | } |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnDel); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5006" + ")", Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnDel); |
| | | }); |
| | | } |
| | | } |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "0003" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | dialog.Close(); |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5003" + ")", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | }); |
| | | } |
| | | } |
| | |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5006" + ")", Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | }); |
| | | return; |
| | | } |
| | |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5001" + ")", Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | }); |
| | | return; |
| | | } |
| | |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnFinifh); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "120_ 6533" + ")", Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnFinifh); |
| | | }); |
| | | return; |
| | | } |
| | |
| | | typeDetailModeList = await GetAddSwitchMode(); |
| | | if (typeDetailModeList == null) |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "0003_switch" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | } |
| | | else |
| | | { |
| | |
| | | typeDetailModeList = await GetAddDimmerMode(); |
| | | if (typeDetailModeList == null) |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "0003_dimmer" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | } |
| | | else |
| | | { |
| | |
| | | typeDetailModeList = await GetAddCurtainMode(); |
| | | if (typeDetailModeList == null) |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "0003_curtain" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "0003_switch" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | return; |
| | | } |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "0003_dimmer" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | return; |
| | | } |
| | |
| | | if (typeDetailModeList == null) |
| | | { |
| | | //再次动态获取按键支持的类 |
| | | typeDetailModeList = await GetAddSwitchMode(); |
| | | typeDetailModeList = await GetAddCurtainMode(); |
| | | if (typeDetailModeList == null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "0003_curtain" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | return; |
| | | } |
| | |
| | | var tempList = new List<BindListAllInfo>(); |
| | | int count1 = 0; |
| | | int count2 = 0; |
| | | |
| | | switch (curBindType) |
| | | { |
| | | case 1: |
| | | curSwitchCount = 0; |
| | | break; |
| | | case 2: |
| | | curSocketCount = 0; |
| | | break; |
| | | case 3: |
| | | curLightFromRelayCount = 0; |
| | | curLightCount = 0; |
| | | break; |
| | | } |
| | | |
| | | foreach (var key in bindTargetsFromMutilfunctionPanelList.Keys) |
| | | { |
| | | var bList = bindTargetsFromMutilfunctionPanelList[key]; |
| | | foreach (var bDev in bList) |
| | | { |
| | | if (curBindType == 0) |
| | | { |
| | | if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51) |
| | | { |
| | | tempList.Add(bDev); |
| | | } |
| | | } |
| | | |
| | | var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint); |
| | | if (device == null) |
| | | { |
| | |
| | | } |
| | | switch (curBindType) |
| | | { |
| | | case 0: |
| | | if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51) |
| | | { |
| | | tempList.Add(bDev); |
| | | } |
| | | break; |
| | | case 1: |
| | | if (bDev.KeyEpoint >= 52 && bDev.KeyEpoint <= 61) |
| | | { |
| | |
| | | var bList = bindTargetsFromMutilfunctionPanelList[key]; |
| | | foreach (var bDev in bList) |
| | | { |
| | | if (curBindType == 0) |
| | | { |
| | | if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51) |
| | | { |
| | | tempList.Remove(bDev.KeyEpoint); |
| | | } |
| | | } |
| | | |
| | | var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint); |
| | | if (device == null) |
| | | { |
| | |
| | | } |
| | | switch (curBindType) |
| | | { |
| | | case 0: |
| | | if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51) |
| | | { |
| | | tempList.Remove(bDev.KeyEpoint); |
| | | } |
| | | break; |
| | | case 1: |
| | | case 2: |
| | | if (bDev.KeyEpoint >= 52 && bDev.KeyEpoint <= 61) |
| | |
| | | canFresh = false; |
| | | midVerticalScrolViewLayout.EndHeaderRefreshing(); |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | |
| | | this.midFrameLayout.RemoveAll(); |
| | | |
| | |
| | | Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); }); |
| | | if (btnTipPic.IsSelected) |
| | | { |
| | | //删除情况1:绑定空目标必须取消按键中已经存在的目标 |
| | | //当绑定空目标,要删除已经存在按键的目标 |
| | | if (oldTargetList.Count != 0) |
| | | { |
| | | //删除按键中已经绑定的目标个数【删除成功个数】 |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed) + "(" + "5003_1" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | CommonPage.Loading.Hide(); |
| | | |
| | | ShowReLoadView(); |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed) + "(" + "5003_3" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed) + "(" + "5003_2" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed) + "(" + "5003_4" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | CommonPage.Loading.Hide(); |
| | | |
| | | ShowReLoadView(); |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed) + "(" + "5003_6" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed) + "(" + "5003_5" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed) + "(" + "5003_7" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5001" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | |
| | | ShowReLoadView(); |
| | | ReLoadAction += () => |
| | |
| | | new Tip() |
| | | { |
| | | MaxWidth = 150, |
| | | Text = Language.StringByID(R.MyInternationalizationString.BindFailed), |
| | | Text = Language.StringByID(R.MyInternationalizationString.BindFailed) + "(" + "5001_1" + ")", |
| | | Direction = AMPopTipDirection.None, |
| | | CloseTime = 1 |
| | | }.Show(CommonPage.Instance); |
| | |
| | | new Tip() |
| | | { |
| | | MaxWidth = 150, |
| | | Text = Language.StringByID(R.MyInternationalizationString.BindUnknownError), |
| | | Text = Language.StringByID(R.MyInternationalizationString.BindUnknownError) + "(" + "5001_2" + ")", |
| | | Direction = AMPopTipDirection.None, |
| | | CloseTime = 1 |
| | | }.Show(CommonPage.Instance); |
| | |
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
|
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007_2" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
|
| | | });
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
|
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007_3" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
|
| | | });
|
| | | return;
|
| | | }
|
| | |
| | | device.CurrentGateWayId = this.realGateway.GwId;
|
| | | //将DeviceInfo的属性设置到主属性中
|
| | | Common.LocalDevice.Current.SetDeviceInfoToMain(device, device);
|
| | | Common.LocalDevice.Current.RefreshDeviceFunctionType(device, device, true);
|
| | |
|
| | | //添加设备的缓存
|
| | | device.IsOnline = 1;
|
| | |
| | |
|
| | | //刷新超时时间
|
| | | this.waitDeviceTimeOut = 20;
|
| | |
|
| | | //获取设备的固定属性
|
| | | HdlDeviceFixedAttributeLogic.Current.SetAllFixedAttributeToDevice(device);
|
| | |
|
| | | //不需要200端点的那个设备 2020.01.13 变更:ota也加进来
|
| | | this.listNewDevice.Add(device);
|
| | |
| | | this.realGateway.GwResDataAction -= this.AdjustGatewayResultData;
|
| | | System.Threading.Thread.Sleep(200);
|
| | |
|
| | | var listDevice = new List<CommonDevice>();
|
| | | for (int i = 0; i < this.listNewDevice.Count; i++)
|
| | | {
|
| | | var device = this.listNewDevice[i];
|
| | | if (device.DeviceAddr != this.listNewDevice[0].DeviceAddr)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | listDevice.Add(device);
|
| | | //重新变更UI
|
| | | if (device is OTADevice)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | device.IconPath = string.Empty;
|
| | | device.ReSave();
|
| | |
|
| | | //设置设备功能类型 (不能在接收回路的地方写入,不然网关可能会超负荷)
|
| | | Common.LocalDevice.Current.RefreshDeviceFunctionType(device, device, true);
|
| | | //获取设备的固定属性
|
| | | HdlDeviceFixedAttributeLogic.Current.SetAllFixedAttributeToDevice(device);
|
| | | System.Threading.Thread.Sleep(100);
|
| | | }
|
| | |
|
| | | //目前就弄一个
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | var listDevice = new List<CommonDevice>();
|
| | | for (int i = 0; i < this.listNewDevice.Count; i++)
|
| | | {
|
| | | var device = this.listNewDevice[i];
|
| | | if (device.DeviceAddr != this.listNewDevice[0].DeviceAddr)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | listDevice.Add(device);
|
| | | //重新变更UI
|
| | | if (device is OTADevice)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | device.IconPath = string.Empty;
|
| | | device.ReSave();
|
| | | }
|
| | | //显示设备信息画面
|
| | | this.ShowDeviceAddSuccessForm(listDevice);
|
| | | });
|
| | |
| | | else if (topic == gatewayId + "/DeviceInComingRespon")
|
| | | {
|
| | | this.topTimeOut = topMaxTime;
|
| | |
|
| | | //设备入网时,有时候网关会上报虚拟设备
|
| | | var jobject = Newtonsoft.Json.Linq.JObject.Parse(resultData);
|
| | | CommonDevice.DeviceInfoData info = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.DeviceInfoData>(jobject["Data"].ToString());
|
| | | if (info.DriveCode != 0)
|
| | | {
|
| | | //不需要虚拟设备
|
| | | return 0;
|
| | | }
|
| | | //网关最终上报节点设备信息
|
| | | this.btnProgressBar.SetValue(6, 6);
|
| | | return 1;
|
| | |
| | | int B1 = Convert.ToInt32(this.keyColorData.CloseColorB, 16);
|
| | | uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
|
| | |
|
| | | //颜色外框 |
| | | var btnColorLine = new FrameLayoutStatuControl();
|
| | | btnColorLine.Width = Application.GetRealHeight(79);
|
| | | btnColorLine.Height = this.GetPictrueRealSize(79);
|
| | | btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
|
| | | btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
|
| | | btnColorLine.BorderWidth = 1;
|
| | | btnColorLine.BorderColor = 0xffcccccc;
|
| | | frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEvent);
|
| | | //颜色外框
|
| | | var frameColorLine = new FrameLayoutStatuControl();
|
| | | frameColorLine.UseClickStatu = false;
|
| | | frameColorLine.Height = this.GetPictrueRealSize(79);
|
| | | frameColorLine.Width = this.GetPictrueRealSize(79);
|
| | | frameColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
|
| | | frameColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
|
| | | frameColorLine.BorderWidth = 1;
|
| | | frameColorLine.BorderColor = 0xffcccccc;
|
| | | frameColor.AddChidren(frameColorLine, ChidrenBindMode.NotBind);
|
| | |
|
| | | var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
|
| | | //分两步计算,不然有可能它得出的结果有误差导致不居中
|
| | | int btnColorWidth = frameColorLine.Height - this.GetPictrueRealSize(7) - this.GetPictrueRealSize(7);
|
| | | var btnColor = new NormalViewControl(btnColorWidth, btnColorWidth, false);
|
| | | btnColor.Gravity = Gravity.Center;
|
| | | btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
|
| | | btnColor.Radius = (uint)btnColorWidth / 2;
|
| | | btnColor.BackgroundColor = backColor;
|
| | | btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEvent);
|
| | | frameColorLine.AddChidren(btnColor, ChidrenBindMode.NotBind);
|
| | | frameColor.ChangedChidrenBindMode(frameColorLine, ChidrenBindMode.BindEvent);
|
| | |
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = backColor;
|
| | |
| | |
|
| | | frameColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColorView.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColorLine.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnRight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | }
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | |
|
| | | /// <summary>
|
| | | /// PanelColorBefore
|
| | | /// </summary>
|
| | | private void PanelColor(NormalViewControl btnColor, SeekBarControl seekBar1, int R1, int G1, int B1)
|
| | | {
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | | this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = btnColor.BackgroundColor;
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = btnColor.BackgroundColor;
|
| | | };
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | btnClick.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnClick.TextID = R.MyInternationalizationString.uAfterClick;
|
| | | listview.AddChidren(btnClick);
|
| | |
|
| | | //背景
|
| | | var frameBack = new FrameLayout();
|
| | | frameBack.Y = Application.GetRealHeight(608);
|
| | |
| | | uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
|
| | |
|
| | | //颜色外框
|
| | | var btnColorLine = new FrameLayoutStatuControl();
|
| | | btnColorLine.Width = Application.GetRealHeight(79);
|
| | | btnColorLine.Height = this.GetPictrueRealSize(79);
|
| | | btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
|
| | | btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
|
| | | btnColorLine.BorderWidth = 1;
|
| | | btnColorLine.BorderColor = 0xffcccccc;
|
| | | frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEvent);
|
| | | var frameColorLine = new FrameLayoutStatuControl();
|
| | | frameColorLine.UseClickStatu = false;
|
| | | frameColorLine.Height = this.GetPictrueRealSize(79);
|
| | | frameColorLine.Width = this.GetPictrueRealSize(79);
|
| | | frameColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
|
| | | frameColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
|
| | | frameColorLine.BorderWidth = 1;
|
| | | frameColorLine.BorderColor = 0xffcccccc;
|
| | | frameColor.AddChidren(frameColorLine, ChidrenBindMode.NotBind);
|
| | |
|
| | | var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
|
| | | //分两步计算,不然有可能它得出的结果有误差导致不居中
|
| | | int btnColorWidth = frameColorLine.Height - this.GetPictrueRealSize(7) - this.GetPictrueRealSize(7);
|
| | | var btnColor = new NormalViewControl(btnColorWidth, btnColorWidth, false);
|
| | | btnColor.Gravity = Gravity.Center;
|
| | | btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
|
| | | btnColor.Radius = (uint)btnColorWidth / 2;
|
| | | btnColor.BackgroundColor = backColor;
|
| | | btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEvent);
|
| | | frameColorLine.AddChidren(btnColor, ChidrenBindMode.NotBind);
|
| | | frameColor.ChangedChidrenBindMode(frameColorLine, ChidrenBindMode.BindEvent);
|
| | |
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = backColor;
|
| | |
| | |
|
| | | frameColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColorView.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColorLine.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnRight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | }
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | |
|
| | | /// <summary>
|
| | | /// PanelColorBefore
|
| | | /// </summary>
|
| | | private void PanelAfterColor(NormalViewControl btnColor, SeekBarControl seekBar1, int R1, int G1, int B1)
|
| | | {
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | | this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = btnColor.BackgroundColor;
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = btnColor.BackgroundColor;
|
| | | };
|
| | | };
|
| | | }
|
| | | #endregion
|
| | |
| | | frameColor.UseClickStatu = false;
|
| | | frameColor.Width = Application.GetRealHeight(262);
|
| | | frameColor.Height = this.GetPictrueRealSize(79);
|
| | | frameColor.Gravity = Gravity.CenterVertical;
|
| | | frameColor.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
|
| | | frameColor.Y = Application.GetRealHeight(26);
|
| | | frameColor.X = listview.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
|
| | | frameBack.AddChidren(frameColor);
|
| | |
|
| | | //颜色
|
| | |
| | | int B1 = Convert.ToInt32(this.keyColorData.OpenColorB, 16);
|
| | | uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
|
| | |
|
| | | //颜色外框 |
| | | var btnColorLine = new FrameLayoutStatuControl();
|
| | | btnColorLine.Width = Application.GetRealHeight(79);
|
| | | btnColorLine.Height = this.GetPictrueRealSize(79);
|
| | | btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
|
| | | btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
|
| | | btnColorLine.BorderWidth = 1;
|
| | | btnColorLine.BorderColor = 0xffcccccc;
|
| | | frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEvent);
|
| | | //颜色外框
|
| | | var frameColorLine = new FrameLayoutStatuControl();
|
| | | frameColorLine.UseClickStatu = false;
|
| | | frameColorLine.Height = this.GetPictrueRealSize(79);
|
| | | frameColorLine.Width = this.GetPictrueRealSize(79);
|
| | | frameColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
|
| | | frameColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
|
| | | frameColorLine.BorderWidth = 1;
|
| | | frameColorLine.BorderColor = 0xffcccccc;
|
| | | frameColor.AddChidren(frameColorLine, ChidrenBindMode.NotBind);
|
| | |
|
| | | var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
|
| | | //分两步计算,不然有可能它得出的结果有误差导致不居中
|
| | | int btnColorWidth = frameColorLine.Height - this.GetPictrueRealSize(7) - this.GetPictrueRealSize(7);
|
| | | var btnColor = new NormalViewControl(btnColorWidth, btnColorWidth, false);
|
| | | btnColor.Gravity = Gravity.Center;
|
| | | btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
|
| | | btnColor.Radius = (uint)btnColorWidth / 2;
|
| | | btnColor.BackgroundColor = backColor;
|
| | | btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEvent);
|
| | | frameColorLine.AddChidren(btnColor, ChidrenBindMode.NotBind);
|
| | | frameColor.ChangedChidrenBindMode(frameColorLine, ChidrenBindMode.BindEvent);
|
| | |
|
| | | var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
|
| | | btnRight.UnSelectedImagePath = "Item/RightNext.png";
|
| | |
| | |
|
| | | frameColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, R1, G1, B1);
|
| | | };
|
| | | btnColorView.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, R1, G1, B1);
|
| | | };
|
| | | btnColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, R1, G1, B1);
|
| | | };
|
| | | btnColorLine.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, R1, G1, B1);
|
| | | };
|
| | | btnRight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, R1, G1, B1);
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | |
|
| | | this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | };
|
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// PanelColorSelectForm
|
| | | /// </summary>
|
| | | private void PanelColor(NormalViewControl btnColor, int R1, int G1, int B1)
|
| | | {
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | |
|
| | | this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 节能模式行_________________________
|
| | |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | } |
| | | } |
| | |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | } |
| | | } |
| | |
| | | new Tip() |
| | | { |
| | | MaxWidth = 150, |
| | | Text = Language.StringByID(R.MyInternationalizationString.BindFailed), |
| | | Text = Language.StringByID(R.MyInternationalizationString.BindFailed) + "(" + "5001_1" + ")", |
| | | Direction = AMPopTipDirection.Up, |
| | | CloseTime = 1 |
| | | }.Show(btnFinifh); |
| | |
| | | new Tip() |
| | | { |
| | | MaxWidth = 150, |
| | | Text = Language.StringByID(R.MyInternationalizationString.BindUnknownError), |
| | | Text = Language.StringByID(R.MyInternationalizationString.BindUnknownError) + "(" + "5001_2" + ")", |
| | | Direction = AMPopTipDirection.Up, |
| | | CloseTime = 1 |
| | | }.Show(btnFinifh); |
| | |
| | | RefreshBindListUI(); |
| | | midVerticalScrolViewLayout.EndHeaderRefreshing(); |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007_1" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | break; |
| | | } |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5003" + ")", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.uDeviceDeleteFail) + "(" + "5003_8" + ")", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5003_9" + ")", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | |
| | | #if DEBUG |
| | | if (flage == true) |
| | | { |
| | | //if (msg.Contains("DeviceStatusReport") == false) |
| | | if (msg.Contains("DeviceStatusReport") == false) |
| | | { |
| | | System.Console.WriteLine(msg + " " + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond); |
| | | } |