From efcffde735fa65ae34bae0bcc86313b74ed0e36c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 20 五月 2024 13:47:38 +0800
Subject: [PATCH] 优化离线数据

---
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs |  159 +++++++++++++++++++++++++++++-----------------------
 1 files changed, 88 insertions(+), 71 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
index f13369a..8f4ed6e 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
@@ -99,12 +99,14 @@
         public void LoadPage()
         {
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-            new TopViewDiv(bodyView, Language.StringByID(StringId.ResidenceManage)).LoadTopView();
+            var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.ResidenceManage));
+            topView.maginY = 10;
+            topView.LoadTopView();
 
             VerticalScrolViewLayout contentView = new VerticalScrolViewLayout()
             {
-                Y = Application.GetRealHeight(64),
-                Height = Application.GetRealHeight(667 - 64),
+                Y = Application.GetRealHeight(64+10),
+                Height = Application.GetRealHeight(667 - 64-10),
                 ScrollEnabled = false,
             };
             bodyView.AddChidren(contentView);
@@ -395,6 +397,80 @@
 
                     LoadEvent_SkipAdminMigrationConfirmPage();
                     LoadEvent_SkipTransferConfirmPage();
+
+
+
+                    var btnRollBack = new Button()
+                    {
+                        Y = Application.GetRealHeight(623),
+                        Height = Application.GetRealHeight(50),
+                        TextAlignment = TextAlignment.Center,
+                        TextSize = CSS_FontSize.SubheadingFontSize,
+                        TextColor = CSS_Color.AuxiliaryColor2,
+                        TextID = StringId.RollBack,
+                        BackgroundColor = CSS_Color.MainBackgroundColor,
+                    };
+                    bodyView.AddChidren(btnRollBack);
+
+                    if (MainPage.Increase)
+                    {
+                        btnRollBack.Y = Application.GetRealHeight(613);
+                        btnRollBack.Height = Application.GetRealHeight(50);
+                        bodyView.AddChidren(new Button() { Y = Application.GetRealHeight(663), Height = Application.GetRealHeight(20), BackgroundColor = CSS_Color.MainBackgroundColor });
+                    }
+                    btnRollBack.MouseUpEventHandler += (sender, e) =>
+                    {
+                        Action okAction = () =>
+                        {
+                            var waitPage = new Loading();
+                            this.AddChidren(waitPage);
+                            waitPage.Start("");
+                            new System.Threading.Thread(() => {
+                                try
+                                {
+                                    var pack = Common.ApiUtlis.Ins.HttpRequest.RollBack();
+                                    Application.RunOnMainThread(() =>
+                                    {
+                                        if (pack != null)
+                                        {
+                                            if (pack.Code == StateCode.SUCCESS)
+                                            {
+                                                new PublicAssmebly().TipMsg(StringId.Tip, StringId.SuccessfullyUnboundTheResidence, () =>
+                                                {
+                                                    Common.ApiUtlis.Ins.HttpRequest.GetHomePager();
+                                                });
+                                            }
+                                            else
+                                            {
+                                                IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+                                            }
+                                        }
+                                    });
+                                }
+                                catch (Exception ex)
+                                {
+                                    MainPage.Log($"浣忓畢鍥炴粴寮傚父锛歿ex.Message}");
+                                }
+                                finally
+                                {
+                                    Application.RunOnMainThread(() =>
+                                    {
+                                        try
+                                        {
+                                            waitPage.Hide();
+                                            waitPage.RemoveFromParent();
+                                            waitPage = null;
+                                        }
+                                        catch { }
+                                    });
+                                }
+                            })
+                            { IsBackground = true }.Start();
+                        };
+                        new ConfirmDialog().ShowDialog(StringId.Tip, StringId.RollBackTipMsg, okAction);
+                    };
+
+
                 }
                 #region 璋冭瘯鏉冮檺
 
@@ -469,8 +545,17 @@
                                         LoadPage();
                                     });
                                 }
+                                else
+                                {
+                                    Application.RunOnMainThread(() => {
+                                        IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+                                    });
+                                }
                             }
                         }catch(Exception ex)
+                        {
+                        }
+                        finally
                         {
                             Application.RunOnMainThread(() => {
                                 waitPage.Hide();
@@ -566,72 +651,6 @@
                     case "ACCEPTANCE"://楠屾敹
                         btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.ACCEPTANCE);
 
-                       var btnRollBack = new Button()
-                        {
-                            Y = Application.GetRealHeight(623),
-                            Height = Application.GetRealHeight(50),
-                            TextAlignment = TextAlignment.Center,
-                            TextSize = CSS_FontSize.SubheadingFontSize,
-                            TextColor = CSS_Color.AuxiliaryColor2,
-                            TextID = StringId.RollBack,
-                            BackgroundColor = CSS_Color.MainBackgroundColor,
-                        };
-                        bodyView.AddChidren(btnRollBack);
-
-                        if (MainPage.Increase)
-                        {
-                            btnRollBack.Y = Application.GetRealHeight(613);
-                            btnRollBack.Height = Application.GetRealHeight(50);
-                            bodyView.AddChidren(new Button() { Y = Application.GetRealHeight(663), Height = Application.GetRealHeight(20), BackgroundColor = CSS_Color.MainBackgroundColor });
-                        }
-                        btnRollBack.MouseUpEventHandler += (sender, e) =>
-                        {
-                            Action okAction = () =>
-                            {
-                                var waitPage = new Loading();
-                                this.AddChidren(waitPage);
-                                waitPage.Start("");
-                                new System.Threading.Thread(() => {
-                                    try
-                                    {
-                                        var pack = Common.ApiUtlis.Ins.HttpRequest.RollBack();
-                                        Application.RunOnMainThread(() =>
-                                        {
-                                            if (pack != null)
-                                            {
-                                                if (pack.Code == StateCode.SUCCESS)
-                                                {
-                                                    Common.ApiUtlis.Ins.HttpRequest.GetHomePager();
-                                                }
-                                                else
-                                                {
-                                                    IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
-                                                }
-                                            }
-                                        });
-                                    }
-                                    catch (Exception ex)
-                                    {
-                                        MainPage.Log($"浣忓畢鍥炴粴寮傚父锛歿ex.Message}");
-                                    }
-                                    finally
-                                    {
-                                        Application.RunOnMainThread(() =>
-                                        {
-                                            try
-                                            {
-                                                waitPage.Hide();
-                                                waitPage.RemoveFromParent();
-                                                waitPage = null;
-                                            }
-                                            catch { }
-                                        });
-                                    }
-                                }) { IsBackground = true }.Start();
-                            };
-                            new ConfirmDialog().ShowDialog(StringId.Tip, StringId.RollBackTipMsg, okAction);
-                        };
-
                         break;
                     case "To_Be_Accepted"://寰呴獙鏀�
                         btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.To_Be_Accepted);
@@ -644,8 +663,6 @@
 
 
                 #endregion
-
-
             }
             LoadEventList();
         }

--
Gitblit v1.8.0