| | |
| | | |
| | | |
| | | #region ---进入后台---DeviceManagementView--- |
| | | //if (true) {//调试账号 |
| | | if (MainPage.LoginUser.AccountType == 0) {//调试账号 |
| | | if (true) {//调试账号 |
| | | //if (MainPage.LoginUser.AccountType == 0) {//调试账号 |
| | | FrameLayout DeviceManagementView = new FrameLayout () { |
| | | Width = Application.GetRealWidth (640), |
| | | Height = Application.GetRealHeight (100), |
| | |
| | | #endregion |
| | | |
| | | #region subaccount |
| | | if (MainPage.LoginUser.AccountType == 0) { |
| | | //if (MainPage.LoginUser.AccountType == 0) { |
| | | FrameLayout subaccountView = new FrameLayout () { |
| | | Width = Application.GetRealWidth (640), |
| | | Height = Application.GetRealHeight (100), |
| | |
| | | UserMiddle.SettingView.AddChidren (btnNullSubaccount); |
| | | |
| | | EventHandler<MouseEventArgs> SubaccountEventHandler = (sender, e) => { |
| | | if (UserConfig.Instance.CurrentRegion.IsOthreShare) { |
| | | //提示没有分享住宅的权限 |
| | | new Alert ("", ErrorCode.InsufficientAuthority, "Close").Show (); |
| | | return; |
| | | } |
| | | |
| | | if (UserConfig.Instance.internetStatus == 0) { |
| | | new Alert ("", "Unable to save data, please check the network.", "Close").Show (); |
| | | return; |
| | |
| | | }; |
| | | //var requestObj = new GetSubAccountListObj (); |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj); |
| | | var revertObj = MainPage.RequestHttps (API.GetSubAccountByDistributedMark, requestJson, true); |
| | | var revertObj = MainPage.RequestHttps (API.GetSubAccountByDistributedMark, requestJson); |
| | | if (revertObj.StateCode.ToUpper() == "SUCCESS") { |
| | | Application.RunOnMainThread (() => { |
| | | var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SubAccountRes>> (revertObj.ResponseData.ToString ()); |
| | |
| | | subaccountView.MouseUpEventHandler += SubaccountEventHandler; |
| | | btnSubaccountIcon.MouseUpEventHandler += SubaccountEventHandler; |
| | | btnSubaccountTitle.MouseUpEventHandler += SubaccountEventHandler; |
| | | } |
| | | //} |
| | | #endregion |
| | | |
| | | |
| | |
| | | btnhelpTitle.MouseLongEventHandler += (sd, ds) => { |
| | | //var uc = UserConfig.Instance.RometoUserInfoKeys.Find ((obj) => obj.Contains ("HiddenJson")); |
| | | //new Alert ("", uc, "close").Show (); |
| | | |
| | | }; |
| | | |
| | | EventHandler<MouseEventArgs> helpEventHandler = (sender, e) => { |