wxr
2020-07-01 53189866ba4012fec0b40990fd2281b836fa2668
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPage.cs
@@ -40,9 +40,17 @@
            }
        }
        public void LoadPage()
        public MemberFunctionPermissionPage(Room r)
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.PermissionToUse)).LoadTopView();
            bodyView = this;
            room = r;
            funs = new List<Function>();
            funs.AddRange(r.functions);
        }
        public void LoadPage(int titleId)
        {
            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
            allRoomView = new FrameLayout()
            {
@@ -56,7 +64,7 @@
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(280),
                TextID = StringId.All,
                TextID = StringId.SelectedAll,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
@@ -100,7 +108,7 @@
                BackgroundColor = CSS_Color.MainColor,
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.MainBackgroundColor,
                TextID = StringId.Confirm,
                TextID = titleId == StringId.PermissionToUse ? StringId.Confirm : StringId.Shared,
                TextSize = CSS_FontSize.SubheadingFontSize,
                IsBold = true,
                Radius = (uint) Application.GetRealWidth(22),
@@ -108,11 +116,23 @@
                BorderWidth = 0,
            };
            bodyView.AddChidren(btnOption);
            btnOption.MouseUpEventHandler = (sender, e) => {
            btnOption.MouseUpEventHandler = (sender, e) =>
            {
                if (titleId == StringId.PermissionToUse)
                {
                var act = TipLoadingMsg(Language.StringByID(StringId.SavingPleaseWait));
                memberInfo.CurShareData.ShareDataBytes = CommonPage.MyEncodingUTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(funs));
                EditShareData();
                    LoadEvent_EditShareData();
                act();
                }
                else
                {
                    var sharedBytes = CommonPage.MyEncodingUTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(funs));
                    var page = new ChooseShareMemberTargetListPage(sharedBytes);
                    MainPage.BasePageView.AddChidren(page);
                    page.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
            };
            LoadFunctionRow();
@@ -180,18 +200,6 @@
            }
        }
        void UpdataShareData()
        {
            ResponsePack responePack = new HttpServerRequest().EditShareData(memberInfo.CurShareData);
            if (responePack.StateCode.ToUpper() == "SUCCESS")
            {
                new PublicAssmebly().TipMsgAutoClose(Language.StringByID(StringId.SavedSuccessfully), true);
            }
            else
            {
                new PublicAssmebly().TipMsgAutoClose(Language.StringByID(StringId.OperationFailed), true);
            }
        }
        Action TipLoadingMsg(string msg)
        {