| | |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载获取住宅子账号信息线程 |
| | | /// </summary> |
| | |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | |
| | | #if DEBUG |
| | | residenceMemberInfos.Add(new ResidenceMemberInfo() |
| | | { |
| | | Account = "测试数据-账号", |
| | | UserName = "测试数据-用户名", |
| | | Nickname = "测试数据-昵称", |
| | | SubAccountDistributedMark = Guid.NewGuid().ToString(), |
| | | DistributedMark = Guid.NewGuid().ToString(), |
| | | AccountType = 0, |
| | | IsAllowRemoteCtrl = false, |
| | | }); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | LoadMemberRow(); |
| | | }); |
| | | #endif |
| | | |
| | | } |
| | | }) |
| | | { IsBackground = true }; |
| | |
| | | try |
| | | { |
| | | var headImageString = dataStr.GetValue("HeadImage").ToString(); |
| | | var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(headImageString); |
| | | var headImageBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<byte[]>(jsonString); |
| | | var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", mInfo.DistributedMark + ".png"); |
| | | fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); |
| | | fs.Write(headImageBytes, 0, headImageBytes.Length); |
| | | fs.Flush(); |
| | | mInfo.headImagePagePath = filePath; |
| | | if (!string.IsNullOrEmpty(headImageString)) |
| | | { |
| | | var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(headImageString); |
| | | var headImageBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<byte[]>(jsonString); |
| | | var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", mInfo.DistributedMark + ".png"); |
| | | fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); |
| | | fs.Write(headImageBytes, 0, headImageBytes.Length); |
| | | fs.Flush(); |
| | | mInfo.headImagePagePath = filePath; |
| | | } |
| | | if(string.IsNullOrEmpty(mInfo.Nickname)) |
| | | { |
| | | mInfo.Nickname = mInfo.UserName; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | { |
| | | fs.Close(); |
| | | } |
| | | //----------- |
| | | //-----------获取住宅下子账号的共享数据列表 |
| | | LoadMethod_GetMemberSharedDataList(mInfo); |
| | | } |
| | | residenceMemberInfos.Add(mInfo); |
| | |
| | | var tip = new Tip() |
| | | { |
| | | Text = tipStr, |
| | | CloseTime = 3, |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | waitPage?.Hide(); |
| | | }); |
| | | return result; |
| | | } |
| | |
| | | if (responePack.StateCode.ToUpper() == "SUCCESS") |
| | | { |
| | | var responeObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ShareData>>(responePack.ResponseData.ToString()); |
| | | info.sharedDatas = responeObj; |
| | | var sd = responeObj.Find((obj) => obj.HouseDistributedMark == DB_ResidenceData.residenceData.residecenInfo.RegionID ); |
| | | if (sd != null) |
| | | info.CurResidenceShareDate = responeObj; |
| | | foreach (var sd in info.CurResidenceShareDate) |
| | | { |
| | | LoadMethod_GetMemberSharedData(sd,info); |
| | | } |
| | | else |
| | | { |
| | | LoadMethod_GetMemberSharedData(new ShareData(),info); |
| | | LoadMethod_GetMemberSharedData(sd); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取住宅下子账号的共享数据 |
| | | /// </summary> |
| | | /// <param name="info"></param> |
| | | void LoadMethod_GetMemberSharedData(ShareData sd, ResidenceMemberInfo info) |
| | | bool LoadMethod_GetMemberSharedData(ShareData sd) |
| | | { |
| | | ResponsePack responePack = new HttpServerRequest().GetShareData(sd.DistributedMark,sd.HouseDistributedMark); |
| | | if (responePack.StateCode.ToUpper() == "SUCCESS") |
| | | { |
| | | info.CurShareData = Newtonsoft.Json.JsonConvert.DeserializeObject<ShareData>(responePack.ResponseData.ToString()); |
| | | sd.ShareDataBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<ShareData>(responePack.ResponseData.ToString()).ShareDataBytes; |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 3, |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.NicknameCannotBeEmpty), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | |
| | | var tip = new Tip() |
| | | { |
| | | Text = tipStr, |
| | | CloseTime = 3, |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceName, DB_ResidenceData.residenceData.residecenInfo.Name, callBack, StringId.HouseNameCannotBeEmpty, 0, new List<string>()); |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ModifyMemberNickname, mInfo.Nickname, callBack, StringId.HouseNameCannotBeEmpty, 0, new List<string>()); |
| | | }; |
| | | btn1.MouseUpEventHandler = eventHandler; |
| | | btn2.MouseUpEventHandler = eventHandler; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | var tip = new Tip() |
| | | { |
| | | Text = tipStr, |
| | | CloseTime = 3, |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | |
| | | btn2.MouseUpEventHandler = eventHandler; |
| | | |
| | | } |
| | | |
| | | } |
| | | } |