| | |
| | | /// </summary> |
| | | public Action FormCloseEvent = null;
|
| | | /// <summary>
|
| | | /// 成员账号信息
|
| | | /// </summary>
|
| | | private AccountInfoResult memberAccountResult = null;
|
| | | /// <summary>
|
| | | /// 成员信息
|
| | | /// </summary>
|
| | | private MemberInfoRes memberResult = null;
|
| | | /// <summary>
|
| | | /// 清空事件
|
| | | /// </summary>
|
| | | private bool clearEvent = true;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | /// <param name="i_accountInfoResult">成员账号信息</param> |
| | | /// </summary> |
| | | /// <param name="i_memberResult">成员信息</param> |
| | | public void ShowForm(AccountInfoResult i_accountInfoResult, MemberInfoRes i_memberResult) |
| | | public void ShowForm(MemberInfoRes i_memberResult) |
| | | { |
| | | this.memberAccountResult = i_accountInfoResult; |
| | | this.memberResult = i_memberResult; |
| | | |
| | | //初始化中部控件 |
| | |
| | | btnSuccess.TextSize = 20;
|
| | | frame.AddChidren(btnSuccess);
|
| | |
|
| | | //房间里面有设备才会显示共享设备菜单
|
| | | if (this.CheckIsCanShard() == true)
|
| | | {
|
| | | //配置共享内容
|
| | | var btnmsg = new NormalViewControl(frame.Width, Application.GetRealHeight(50), false);
|
| | | btnmsg.Y = Application.GetRealHeight(783);
|
| | | btnmsg.TextSize = 12;
|
| | | btnmsg.TextAlignment = TextAlignment.Center;
|
| | | btnmsg.TextColor = UserCenterColor.Current.TextOrangeColor;
|
| | | btnmsg.Text = Language.StringByID(R.MyInternationalizationString.uConfigureSharedContent);
|
| | | btnmsg.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //先清空共享文件夹
|
| | | HdlShardLogic.Current.ClearShardDirectory();
|
| | |
|
| | | var memberInfo = new MemberShardInfoData();
|
| | | var form = new SharedContent.ConfigureNewSharedListRoomForm();
|
| | | this.AddFromAndRemoveNowForm(form, memberResult, memberInfo);
|
| | | };
|
| | | frame.AddChidren(btnmsg);
|
| | |
|
| | | //底线
|
| | | int lineWidth = btnmsg.GetRealWidthByText(12);
|
| | | var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
|
| | | btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
|
| | | btnLine.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine.Y = btnmsg.Bottom - Application.GetRealHeight(10);
|
| | | frame.AddChidren(btnLine);
|
| | |
|
| | | }
|
| | |
|
| | | //完成
|
| | | var btnFinish = new BottomClickButton(688);
|
| | | btnFinish.Y = Application.GetRealHeight(867);
|
| | |
| | | frame.AddChidren(btnFinish);
|
| | | btnFinish.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | this.clearEvent = false;
|
| | |
|
| | | this.CloseForm();
|
| | | FormCloseEvent?.Invoke();
|
| | | FormCloseEvent = null;
|
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 一般方法___________________________
|
| | | #region ■ 界面关闭___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 检测能否分享
|
| | | /// 界面关闭
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | private bool CheckIsCanShard()
|
| | | public override void CloseForm()
|
| | | {
|
| | | //foreach (var room in Shared.Common.Room.Lists)
|
| | | //{
|
| | | // if (room.DeviceUIList.Count > 0)
|
| | | // {
|
| | | // return true;
|
| | | // }
|
| | | //}
|
| | | return false;
|
| | | if (clearEvent == true)
|
| | | {
|
| | | FormCloseEvent = null;
|
| | | }
|
| | | base.CloseForm();
|
| | | }
|
| | |
|
| | | #endregion
|