| | |
| | | {
|
| | | //设置当前激活的画面ID
|
| | | UserCenterResourse.NowActionFormID = UserCenterResourse.listActionFormId[index];
|
| | | if (UserCenterResourse.DicActionForm.ContainsKey(UserCenterResourse.NowActionFormID) == true)
|
| | | //追加条件一:关闭的界面为EditorCommonForm的时候才处理
|
| | | if ((form is EditorCommonForm) && UserCenterResourse.DicActionForm.ContainsKey(UserCenterResourse.NowActionFormID) == true)
|
| | | {
|
| | | try
|
| | | {
|
| | | var Myform = UserCenterResourse.DicActionForm[UserCenterResourse.NowActionFormID];
|
| | | //触发界面再次激活的事件
|
| | | int value = Myform.FormActionAgainEvent();
|
| | | if (value == 1)
|
| | | if (Myform is EditorCommonForm)
|
| | | {
|
| | | //Log出力
|
| | | HdlLogLogic.Current.WriteLog(1, Myform.FormID + " 被激活");
|
| | | //触发界面再次激活的事件
|
| | | int value = ((EditorCommonForm)Myform).FormActionAgainEvent();
|
| | | if (value == 1)
|
| | | {
|
| | | //Log出力
|
| | | HdlLogLogic.Current.WriteLog(1, Myform.FormID + " 被激活");
|
| | | }
|
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | |
| | | {
|
| | | //设置当前激活的画面ID
|
| | | UserCenterResourse.NowActionFormID = UserCenterResourse.listActionFormId[index];
|
| | | if (UserCenterResourse.DicActionForm.ContainsKey(UserCenterResourse.NowActionFormID) == true)
|
| | | //追加条件一:关闭的界面为EditorCommonForm的时候才处理
|
| | | if ((form is EditorCommonForm) && UserCenterResourse.DicActionForm.ContainsKey(UserCenterResourse.NowActionFormID) == true)
|
| | | {
|
| | | try
|
| | | {
|
| | | var Myform = UserCenterResourse.DicActionForm[UserCenterResourse.NowActionFormID];
|
| | | //触发界面再次激活的事件
|
| | | int value = Myform.FormActionAgainEvent();
|
| | | if (value == 1)
|
| | | if (Myform is EditorCommonForm)
|
| | | {
|
| | | //Log出力
|
| | | HdlLogLogic.Current.WriteLog(1, Myform.FormID + " 被激活");
|
| | | //触发界面再次激活的事件
|
| | | int value = ((EditorCommonForm)Myform).FormActionAgainEvent();
|
| | | if (value == 1)
|
| | | {
|
| | | //Log出力
|
| | | HdlLogLogic.Current.WriteLog(1, Myform.FormID + " 被激活");
|
| | | }
|
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | |
| | |
|
| | | UserCenterResourse.UserInfo = userInfo;
|
| | | UserCenterResourse.UserInfo.UserIconFile = System.IO.Path.Combine(UserCenterResourse.Option.UserPictruePath, "Admin.png");
|
| | | if (UserCenterResourse.UserInfo.HeadImage != null)
|
| | | {
|
| | | //写入头像内容
|
| | | Shared.IO.FileUtils.WriteFileByBytes(UserCenterResourse.UserInfo.UserIconFile, UserCenterResourse.UserInfo.HeadImage);
|
| | | }
|
| | | UserCenterResourse.UserInfo.HeadImage = null;
|
| | |
|
| | | //初始化管理员控制主人的连接地址(因为这个连接Token是不会改变的,所以只需要初始化一次)
|
| | | await InitAdminConnectMainInfo();
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | string nowFile = System.IO.Path.Combine(UserCenterResourse.Option.UserPictruePath, "Admin.png");
|
| | | if (System.IO.File.Exists(nowFile) == true)
|
| | | if (System.IO.File.Exists(UserCenterResourse.UserInfo.UserIconFile) == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //复制过去
|
| | | System.IO.File.Copy(defultFile, nowFile);
|
| | | System.IO.File.Copy(defultFile, UserCenterResourse.UserInfo.UserIconFile);
|
| | | }
|
| | |
|
| | | #endregion
|