注销修改

This commit is contained in:
leomon 2023-08-30 22:48:34 +08:00
parent 6985599614
commit ee9a20f4f9
2 changed files with 17 additions and 23 deletions

View File

@ -370,8 +370,8 @@ namespace AIMS
public Form GetForm(string Path) public Form GetForm(string Path)
{ {
object result = null; object result = null;
Type type = Type.GetType(Path); Type type = Type.GetType(Path);
result = (Form)Activator.CreateInstance(type); result = (Form)Activator.CreateInstance(type);
return (Form)result; return (Form)result;
} }
@ -384,29 +384,23 @@ namespace AIMS
private void btnOk_Click(object sender, EventArgs e) private void btnOk_Click(object sender, EventArgs e)
{ {
try foreach (Form frm in Application.OpenForms)
{ {
foreach (Form frm in Application.OpenForms) if (frm.Name != "FormLogin" && frm.Name != this.Name)
{ {
if (frm.Name != "frmLogin" && frm.Name != this.Name) frm.Close();
{ break;
frm.Close();
break;
}
}
foreach (Form frm in Application.OpenForms)
{
if (frm.Name == "frmLogin")
{
frm.Show();
isClose = true;
this.Close();
break;
}
} }
} }
catch (Exception) foreach (Form frm in Application.OpenForms)
{ {
if (frm.Name == "FormLogin")
{
frm.Show();
isClose = true;
this.Close();
break;
}
} }
} }
bool isClose = false; bool isClose = false;

View File

@ -196,9 +196,9 @@ namespace DrawGraph
} }
} }
} }
catch (Exception) catch (Exception ex)
{ {
//PublicMethod.WriteLog(new Exception("回写数据出错:" + propertyName + " 值:" + value + " 错误:" + ex.Message)); PublicMethod.WriteLog(new Exception("回写数据出错:" + propertyName + " 值:" + value + " 错误:" + ex.Message));
} }
return i; return i;
} }