WJC
2019-11-07 2109463fab2eb1caed189e4f258e0e763c5cea7b
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/CommonFormBase.cs
@@ -28,6 +28,8 @@
        {
            //将当前的画面保存到内存当中
            UserCenterLogic.AddActionForm(this);
            //Log出力
            HdlLogLogic.Current.WriteLog(1, this.FormID + " 界面打开");
        }
        /// <summary>
@@ -74,6 +76,9 @@
        /// </summary>
        public virtual void CloseForm()
        {
            //Log出力
            HdlLogLogic.Current.WriteLog(1, this.FormID + " 界面关闭");
            //移除接受在线状态推送
            this.RemoveGatewayOnlinePush();
            //移除设备属性变更推送
@@ -88,7 +93,6 @@
            //从列表中移除(防止画面二重添加)
            UserCenterLogic.RemoveActionForm(this);
        }
        /// <summary>
@@ -267,8 +271,19 @@
                {
                    alert.ConfirmClickEvent += () =>
                    {
                        //回调函数
                        action?.Invoke();
                        try
                        {
                            //回调函数
                            action?.Invoke();
                        }
                        catch (Exception ex)
                        {
                            //出现未知错误,数据丢失
                            this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
                            //Log出力
                            HdlLogLogic.Current.WriteLog(ex);
                        }
                        action = null;
                    };
                }
@@ -353,13 +368,17 @@
                {
                    return null;
                }
                return form.GetType().InvokeMember(method, System.Reflection.BindingFlags.InvokeMethod, null, form, parameter);
                var myMethod = form.GetType().GetMethod(method);
                return myMethod.Invoke(form, parameter);
                //return form.GetType().InvokeMember(method, System.Reflection.BindingFlags.InvokeMethod, null, form, parameter);
            }
            catch (Exception ex)
            {
                string msg = ex.Message + "\r\n";
                msg += ex.TargetSite.ToString();
                this.ShowMassage(ShowMsgType.Error, msg);
                //出现未知错误,数据丢失
                this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
                //Log出力
                HdlLogLogic.Current.WriteLog(ex);
                return null;
            }
@@ -377,18 +396,6 @@
            form.AddForm(parameter);
        }
        #endregion
        #region ■ 界面重新激活事件___________________
        /// <summary>
        /// 自身的上层界面关闭后,它自身处于最上层时,触发的事件
        /// </summary>
        public virtual void FormActionAgainEvent()
        {
            return;
        }
        #endregion
    }
}