Merge branch 'CJL' into NewFilePath
| | |
| | | #region **********网络请求封装********** |
| | | /// <summary> |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
old mode 100755
new mode 100644
| | |
| | | public const string API_POST_Member_UnbindWithAccount = "/smart-footstone/member/memberInfo/unbindWithAccount"; |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 查询功能介绍列表 |
| | | /// </summary> |
| | | public const string API_POST_FunctionIntroductionList = "/home-wisdom/app/functionIntroduction/list"; |
| | | #endregion |
| | | |
| | | #region ■ HomeCluster -- 住宅管理接口___________________________ |
| | |
| | | //public const string API_POST_GetAppVersion = "/smart-footstone/app/getAppVersion"; |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region ■ -- 房间场景背景图片上传下载接口___________________________ |
| | | /// <summary> |
| | | /// 上传图片 |
| | |
| | | public string Id; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// AppNameObj |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class AppNameObj |
| | | { |
| | | /// <summary> |
| | | /// 软件来源,Evoyo、ON、ON_Plus |
| | | /// </summary> |
| | | public string appName = SoftwareType.ON_Plus.ToString(); |
| | | } |
| | | |
| | | #region APP版本检测 |
| | | /// <summary> |
| | | /// AppVersionCheckObj |
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "1.0.0924"; |
| | | public static string VersionString = "1.0.0124"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
old mode 100755
new mode 100644
| | |
| | | X = btnCheckIcon.Right, |
| | | Y = Application.GetRealHeight(350), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(32), |
| | | Height = Application.GetRealWidth(32), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = msg, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
old mode 100755
new mode 100644
| | |
| | | |
| | | TextButton btnMes = new TextButton() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | //Gravity = Gravity.CenterHorizontal, |
| | | Width = mesView.Width, |
| | | //Height = mesView.Height, |
| | | Height = Application.GetRealWidth(20), |
| | |
| | | mesView.AddChidren(btnMes); |
| | | //动态计算高度 |
| | | var needHeight = btnMes.GetMoreLineNeedHeight(); |
| | | if(needHeight < mesView.Height) |
| | | { |
| | | needHeight = mesView.Height; |
| | | } |
| | | btnMes.IsMoreLines = true; |
| | | btnMes.Height = needHeight; |
| | | //mesView.AddChidren(btnMes); |
| | | |
| | | |
| | | Button btnLine = new Button() |
| | | { |
| | |
| | | X = contentView.Width - Width144, |
| | | Y = btnLine.Y, |
| | | Width = Width144, |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealHeight(45), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | { |
| | | Y = btnLine.Y, |
| | | Width = contentView.Width, |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealHeight(45), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
old mode 100755
new mode 100644
| | |
| | | }; |
| | | bodyView.AddChidren(webView); |
| | | |
| | | //加载网址 |
| | | webView.LoadRequest(url); |
| | | if (!string.IsNullOrEmpty(url)) |
| | | { |
| | | //加载网址 |
| | | webView.LoadRequest(url); |
| | | } |
| | | |
| | | this.Show(); |
| | | } |
| | | } |
old mode 100755
new mode 100644
| | |
| | | void GetPushMessageList(int queryType = 0) |
| | | { |
| | | bodyScrolView.RemoveAll(); |
| | | PushMessageInfoList.Clear(); |
| | | if(PushMessageInfoList == null) |
| | | { |
| | | PushMessageInfoList = new List<PushMessageInfo>(); |
| | | } |
| | | else |
| | | { |
| | | PushMessageInfoList.Clear(); |
| | | } |
| | | |
| | | YearMark = "";//标记清空 |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) |
| | | { |
| | |
| | | roomView.RemoveFromParent(); |
| | | }; |
| | | |
| | | var view = new RoomPage(room, ReloadRoomName, deleteAction); |
| | | //房间背景图修改事件回调 |
| | | Action modifyImageAction = () => |
| | | { |
| | | //roomViewbg.ImagePath = room.backgroundImage; |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages(room.backgroundImage, roomViewbg); |
| | | }; |
| | | |
| | | var view = new RoomPage(room, ReloadRoomName, deleteAction, modifyImageAction); |
| | | MainPage.BasePageView.AddChidren(view); |
| | | view.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
old mode 100755
new mode 100644
| | |
| | | /// 删除房间事件 |
| | | /// </summary> |
| | | Action deleteAction; |
| | | /// <summary> |
| | | /// 图片修改事件 |
| | | /// </summary> |
| | | Action modifyImageAction; |
| | | |
| | | #endregion |
| | | |
| | | public RoomPage(Room r, Action rrn, Action delAction) |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="r"></param> |
| | | /// <param name="rrn">编辑事件</param> |
| | | /// <param name="delAction">删除事件回调</param> |
| | | /// <param name="modifyImageAction">房间背景图修改事件回调</param> |
| | | public RoomPage(Room r, Action rrn, Action delAction, Action modifyImageAction) |
| | | { |
| | | bodyView = this; |
| | | room = r; |
| | |
| | | }; |
| | | ReloadRoomName = rrn; |
| | | deleteAction = delAction; |
| | | this.modifyImageAction = modifyImageAction; |
| | | } |
| | | /// <summary> |
| | | /// 重载界面 |
old mode 100755
new mode 100644
| | |
| | | deleteAction?.Invoke(); |
| | | }; |
| | | |
| | | var skipPage = new RoomEditPage(room, editBackAction, delAction); |
| | | var skipPage = new RoomEditPage(room, editBackAction, delAction, this.modifyImageAction); |
| | | MainPage.BasePageView.AddChidren(skipPage); |
| | | skipPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | pictureOptionView.Parent.RemoveFromParent(); |
| | | Action<string> action = (obj) => { |
| | | scene.ImagePath = obj; |
| | | addSceneImageView.ImageBytes = null;//解决有ImageBytes不加载ImagePath |
| | | addSceneImageView.ImagePath = scene.ImagePath; |
| | | }; |
| | | |
| | |
| | | pictureOptionView.Parent.RemoveFromParent(); |
| | | Action<string> action = (obj) => { |
| | | scene.ImagePath = obj; |
| | | addSceneImageView.ImageBytes = null;//解决有ImageBytes不加载ImagePath |
| | | addSceneImageView.ImagePath = scene.ImagePath; |
| | | scene.EditScene(); |
| | | }; |
old mode 100755
new mode 100644
| | |
| | | /// </summary> |
| | | public class ComplaintsPage : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | |
| | | /// <summary> |
| | | /// 当前 |
| | | /// |
| | | /// </summary> |
| | | VerticalScrolViewLayout bodyScrolView; |
| | | |
| | | public ComplaintsPage() |
| | | { |
| | | bodyView = this; |
| | | BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Complaints)).LoadTopView(); |
| | | |
| | | int bodyY = Application.GetRealHeight(64); |
| | | bodyScrolView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = bodyY, |
| | | Height = bodyView.Height - bodyY, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | |
| | | #region 投诉联系 |
| | | FrameLayout phoneRow = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(50), |
| | | Height = Application.GetRealWidth(50), |
| | | }; |
| | | bodyView.AddChidren(phoneRow); |
| | | |
| | |
| | | /// </summary> |
| | | var btnImage = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | X = Application.GetRealWidth(343), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | Width = Application.GetRealWidth(16), |
| | | Height = Application.GetRealWidth(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | phoneRow.AddChidren(btnImage); |
| | |
| | | FrameLayout emailRow = new FrameLayout() |
| | | { |
| | | Y = phoneRow.Bottom, |
| | | Height = Application.GetRealHeight(54), |
| | | Height = Application.GetRealWidth(54), |
| | | }; |
| | | bodyView.AddChidren(emailRow); |
| | | |
| | |
| | | Button btnEmailText = new Button() |
| | | { |
| | | X = btnEmailTitle.Right, |
| | | Y = Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(20), |
| | | Y = Application.GetRealWidth(8), |
| | | Height = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(266), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | |
| | | Button btnEmailTipText = new Button() |
| | | { |
| | | X = btnEmailTitle.Right, |
| | | Y = btnEmailText.Bottom + Application.GetRealHeight(4), |
| | | Height = Application.GetRealHeight(20), |
| | | Y = btnEmailText.Bottom + Application.GetRealWidth(4), |
| | | Height = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(266), |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | |
| | | /// </summary> |
| | | var btnImage2 = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | X = Application.GetRealWidth(343), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | Width = Application.GetRealWidth(16), |
| | | Height = Application.GetRealWidth(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | emailRow.AddChidren(btnImage2); |
old mode 100755
new mode 100644
| | |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | using System.Collections.Generic; |
| | | using System.Threading; |
| | | using HDL_ON.DAL.Server; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | /// <summary> |
| | | /// 内容为空提示View |
| | | /// </summary> |
| | | EmptyTipView emptyTipView; |
| | | FrameLayout emptyTipView; |
| | | /// <summary> |
| | | /// 功能介绍List |
| | | /// </summary> |
| | | List<APPFunctionURLInfo> functionURLInfoList = new List<APPFunctionURLInfo>(); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public FunctionIntroductionPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.FunctionIntroduced)).LoadTopView(); |
| | |
| | | }; |
| | | bodyView.AddChidren(bodyScrolView); |
| | | |
| | | AddEmptyTipView(); |
| | | |
| | | //TestLoad(); |
| | | //AddEmptyTipView(); |
| | | // |
| | | GetFunctionIntroductionList(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | void AddEmptyTipView() |
| | | { |
| | | emptyTipView = new EmptyTipView() |
| | | emptyTipView = new FrameLayout() |
| | | { |
| | | Height = bodyScrolView.Height, |
| | | Width = bodyScrolView.Width, |
| | | }; |
| | | bodyScrolView.AddChidren(emptyTipView); |
| | | |
| | | var tipView = new EmptyTipView() |
| | | { |
| | | Gravity = Gravity.Center |
| | | }; |
| | | bodyView.AddChidren(emptyTipView); |
| | | emptyTipView.AddChidren(tipView); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载区域选择RowView |
| | | /// 加载功能介绍列表查询 |
| | | /// </summary> |
| | | /// <param name="VerticalScrolViewMiddle"></param> |
| | | void AddRowView(VerticalScrolViewLayout VerticalScrolViewMiddle, APPFunctionURLInfo functionInfo) |
| | | { |
| | | var rowView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(54), |
| | | Height = Application.GetRealWidth(54), |
| | | }; |
| | | VerticalScrolViewMiddle.AddChidren(rowView); |
| | | |
| | |
| | | var btnTilte = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(8), |
| | | Y = Application.GetRealWidth(8), |
| | | Width = Application.GetRealWidth(320), |
| | | Height = Application.GetRealHeight(20), |
| | | Height = Application.GetRealWidth(20), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | |
| | | var btnSubtitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnTilte.Bottom + Application.GetRealHeight(4), |
| | | Y = btnTilte.Bottom + Application.GetRealWidth(4), |
| | | Width = Application.GetRealWidth(320), |
| | | Height = Application.GetRealHeight(14), |
| | | Height = Application.GetRealWidth(14), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | Text = functionInfo.CreateTime |
| | | //Text = functionInfo.CreateTime |
| | | }; |
| | | |
| | | rowView.AddChidren(btnSubtitle); |
| | |
| | | { |
| | | X = Application.GetRealWidth(343), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | Width = Application.GetRealWidth(16), |
| | | Height = Application.GetRealWidth(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | |
| | |
| | | btnTilte.MouseUpEventHandler = eventHandler; |
| | | btnSubtitle.MouseUpEventHandler = eventHandler; |
| | | btnGo.MouseUpEventHandler = eventHandler; |
| | | |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnSubtitle.Text = Utlis.UnixToDateTimeWithFormatMS(functionInfo.CreateTime, "MM月dd日"); |
| | | } |
| | | else |
| | | { |
| | | btnSubtitle.Text = Utlis.UnixToDateTimeWithFormatMS(functionInfo.CreateTime, "MM/dd"); |
| | | } |
| | | |
| | | } |
| | | |
| | | #region 测试 |
| | | List<APPFunctionURLInfo> list = new List<APPFunctionURLInfo>(); |
| | | /// <summary> |
| | | /// |
| | | /// 功能介绍列表查询 |
| | | /// </summary> |
| | | void TestLoad() |
| | | void GetFunctionIntroductionList() |
| | | { |
| | | list.Add(new APPFunctionURLInfo() |
| | | bodyScrolView.RemoveAll(); |
| | | if (functionURLInfoList == null) |
| | | { |
| | | Title = "HDL ON PRO 1.0.10 主要更新", |
| | | CreateTime = "11月26", |
| | | Url = Constant.URL_PRIVACYPOLICY, |
| | | }); |
| | | |
| | | list.Add(new APPFunctionURLInfo() |
| | | functionURLInfoList = new List<APPFunctionURLInfo>(); |
| | | } |
| | | else |
| | | { |
| | | Title = "HDL ON PRO 1.0.09 主要更新", |
| | | CreateTime = "10月26", |
| | | Url = Constant.URL_PRIVACYPOLICY, |
| | | }); |
| | | functionURLInfoList.Clear(); |
| | | } |
| | | |
| | | list.Add(new APPFunctionURLInfo() |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | |
| | | new Thread(() => |
| | | { |
| | | Title = "HDL ON PRO 1.0.08 主要更新", |
| | | CreateTime = "09月26", |
| | | Url = Constant.URL_PRIVACYPOLICY, |
| | | }); |
| | | try |
| | | { |
| | | |
| | | foreach (var info in list) |
| | | Dictionary<string, object> AppName = new Dictionary<string, object>(); |
| | | //ON_Plus 2 |
| | | AppName.Add("appName", 2); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(AppName); |
| | | |
| | | var result = HttpUtil.RequestHttpsPost(NewAPI.API_POST_FunctionIntroductionList, requestJson); |
| | | if (result.Code == StateCode.SUCCESS) |
| | | { |
| | | functionURLInfoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<APPFunctionURLInfo>>(result.Data.ToString()); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (functionURLInfoList != null && functionURLInfoList.Count > 0) |
| | | { |
| | | //加载刷新List |
| | | LoadAPPFunctionURLInfoView(functionURLInfoList); |
| | | } |
| | | else |
| | | { |
| | | AddEmptyTipView(); |
| | | } |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | AddEmptyTipView(); |
| | | }); |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result.Code); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载功能介绍CellView |
| | | /// </summary> |
| | | void LoadAPPFunctionURLInfoView(List<APPFunctionURLInfo> mList) |
| | | { |
| | | foreach (var info in mList) |
| | | { |
| | | AddRowView(bodyScrolView, info); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | //#region 测试 |
| | | //List<APPFunctionURLInfo> list = new List<APPFunctionURLInfo>(); |
| | | ///// <summary> |
| | | ///// |
| | | ///// </summary> |
| | | //void TestLoad() |
| | | //{ |
| | | // list.Add(new APPFunctionURLInfo() |
| | | // { |
| | | // Title = "HDL ON PRO 1.0.10 主要更新", |
| | | // CreateTime = "11月26", |
| | | // Url = Constant.URL_PRIVACYPOLICY, |
| | | // }); |
| | | |
| | | // list.Add(new APPFunctionURLInfo() |
| | | // { |
| | | // Title = "HDL ON PRO 1.0.09 主要更新", |
| | | // CreateTime = "10月26", |
| | | // Url = Constant.URL_PRIVACYPOLICY, |
| | | // }); |
| | | |
| | | // list.Add(new APPFunctionURLInfo() |
| | | // { |
| | | // Title = "HDL ON PRO 1.0.08 主要更新", |
| | | // CreateTime = "09月26", |
| | | // Url = Constant.URL_PRIVACYPOLICY, |
| | | // }); |
| | | |
| | | // foreach (var info in list) |
| | | // { |
| | | // AddRowView(bodyScrolView, info); |
| | | // } |
| | | //} |
| | | //#endregion |
| | | } |
| | | |
| | | |
| | |
| | | public class APPFunctionURLInfo |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// 功能介绍标题 |
| | | /// </summary> |
| | | public string Title; |
| | | /// <summary> |
| | | /// |
| | | /// 功能介绍发布事件 |
| | | /// </summary> |
| | | public string CreateTime; |
| | | public long CreateTime; |
| | | /// <summary> |
| | | /// |
| | | /// 功能介绍对应的HTML地址 |
| | | /// </summary> |
| | | public string Url; |
| | | } |
old mode 100755
new mode 100644
| | |
| | | |
| | | FrameLayout emailRow = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(114), |
| | | Y = phoneRow.Bottom, |
| | | Height = Application.GetRealWidth(50), |
| | | }; |
| | | bodyView.AddChidren(emailRow); |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="isStartCheckResidenceThread">是否开启住宅监听线程</param> |
| | | /// <param name="isStartCheckResidenceThread">是否开启住宅监听线程,没有住宅的时候别人扫码添加你为成员的时候调用</param> |
| | | public void LoadPage(bool isStartCheckResidenceThread = false) |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
old mode 100755
new mode 100644
| | |
| | | pictureOptionView.Parent.RemoveFromParent(); |
| | | Action<string> action = (obj) => { |
| | | room.backgroundImage = obj; |
| | | btnRoomBg.ImageBytes = null;//解决有ImageBytes不加载ImagePath |
| | | btnRoomBg.ImagePath = room.backgroundImage; |
| | | }; |
| | | |
old mode 100755
new mode 100644
| | |
| | | /// 2020-12-02 解决删除房间后,界面不刷新删除房间问题 |
| | | /// </summary> |
| | | Action deleteAction; |
| | | /// <summary> |
| | | /// 图片修改事件 |
| | | /// </summary> |
| | | Action modifyImageAction; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="r"></param> |
| | | /// <param name="tId"></param> |
| | | /// <param name="action"></param> |
| | | /// <param name="delAction">删除房间事件</param> |
| | | public RoomEditPage(Room r, Action action, Action delAction) |
| | | /// <param name="delAction">房间删除事件</param> |
| | | /// <param name="modifyImageAction">房间背景图修改事件回调</param> |
| | | public RoomEditPage(Room r, Action action, Action delAction, Action modifyImageAction) |
| | | { |
| | | bodyView = this; |
| | | room = r; |
| | | backAction = action; |
| | | this.deleteAction = delAction; |
| | | this.modifyImageAction = modifyImageAction; |
| | | } |
| | | |
| | | public void LoadPage() |
old mode 100755
new mode 100644
| | |
| | | Action<string> action = (obj) => |
| | | { |
| | | room.backgroundImage = obj; |
| | | btnRoomBg.ImageBytes = null;//解决有ImageBytes不加载ImagePath |
| | | btnRoomBg.ImagePath = room.backgroundImage; |
| | | room.SaveRoomData(); |
| | | modifyImageAction?.Invoke(); |
| | | }; |
| | | |
| | | var galleryPage = new RoomGalleryPage(room.backgroundImage, action); |
| | |
| | | //2020-12-03 需要讲最新的图片路径同步到云端 |
| | | room.backgroundImage = imageUrl; |
| | | room.SaveRoomData(); |
| | | modifyImageAction?.Invoke(); |
| | | }; |
| | | //上传图片到云端 |
| | | UploadImage(selectImagePath, btnRoomBg, room, uploadSuccessAction); |
old mode 100755
new mode 100644
| | |
| | | roomRow.RemoveFromParent(); |
| | | }; |
| | | |
| | | var skipPage = new RoomEditPage(r, editBackAction, deleteAction); |
| | | Action modifyImageAction = () => { |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages(r.backgroundImage, btnBg); |
| | | }; |
| | | |
| | | var skipPage = new RoomEditPage(r, editBackAction, deleteAction, modifyImageAction); |
| | | MainPage.BasePageView.AddChidren(skipPage); |
| | | skipPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |