| | |
| | | row1.AddBottomLine();
|
| | | row1.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //检测住宅经纬度
|
| | | if (this.CheckResidencePoint() == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var form = new WiredGatewayDirectionForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
| | | row2.AddRightArrow();
|
| | | row2.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //检测住宅经纬度
|
| | | if (this.CheckResidencePoint() == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var menuContr = new BottomMenuSelectForm();
|
| | | menuContr.AddForm(2);
|
| | | //UDP模式(推荐)
|
| | |
| | | });
|
| | | }; |
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 检测住宅经纬度
|
| | | /// </summary>
|
| | | /// <returns></returns> |
| | | private bool CheckResidencePoint()
|
| | | {
|
| | | if (Common.Config.Instance.Home.Latitude == 0 && Common.Config.Instance.Home.Longitude == 0)
|
| | | {
|
| | | //请前往住宅管理{0}设置住宅的地理位置
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uGotoResidenceAndSetLocation).Replace("{0}", "\r\n");
|
| | | this.ShowMassage(ShowMsgType.Confirm, msg, () =>
|
| | | {
|
| | | var form = new Residence.ResidenceManagementForm();
|
| | | form.AddForm(false);
|
| | |
|
| | | }, Language.StringByID(R.MyInternationalizationString.uGotoSettion));
|
| | | return false;
|
| | | }
|
| | | return true;
|
| | | } |
| | | } |
| | | } |