fix_WPF_switch_user_main_loop_conflict
This commit is contained in:
@@ -428,10 +428,19 @@ namespace Lskj.Main
|
|||||||
ERPInfo.Instance.UserId = userId;
|
ERPInfo.Instance.UserId = userId;
|
||||||
ERPInfo.Instance.UserName = userName;
|
ERPInfo.Instance.UserName = userName;
|
||||||
|
|
||||||
this.Close();
|
|
||||||
IniHelper.Write("isRefresh", "1");
|
IniHelper.Write("isRefresh", "1");
|
||||||
Manager.ReStartMain(true);
|
if (Manager.ExternalMainShell == null)
|
||||||
//this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
{
|
||||||
|
this.Close();
|
||||||
|
Manager.ReStartMain(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// WPF 已接管主窗口生命周期:只返回切换成功,
|
||||||
|
// 由 WPF 在当前模态窗体关闭后重建主框架。
|
||||||
|
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 1: // 密码不正确
|
case 1: // 密码不正确
|
||||||
MessageUtil.Show(ResourceKeys.NameOrPasswordError);
|
MessageUtil.Show(ResourceKeys.NameOrPasswordError);
|
||||||
|
|||||||
Reference in New Issue
Block a user