Commit 29107f0c authored by tr's avatar tr

1、系统模块:多次打开对象未刷新问题处理

parent adeff414
...@@ -54,7 +54,7 @@ namespace Tools.MyCommon ...@@ -54,7 +54,7 @@ namespace Tools.MyCommon
/// <summary> /// <summary>
/// 窗体对象 /// 窗体对象
/// </summary> /// </summary>
public System.Windows.Forms.Form FrmView { get; set; } public Type FrmView { get; set; }
/// <summary> /// <summary>
/// 显示名称 /// 显示名称
/// </summary> /// </summary>
......
...@@ -20,13 +20,13 @@ namespace Tools ...@@ -20,13 +20,13 @@ namespace Tools
//为保证显示效果:名称长度尽量少于9个汉字 //为保证显示效果:名称长度尽量少于9个汉字
return new List<ModuleInfo> return new List<ModuleInfo>
{ {
this.CreateModule(new UpdateExecuter.frmMain(), "更新执行工具"), this.CreateModule(typeof(UpdateExecuter.frmMain), "更新执行工具"),
this.CreateModule(new Ftt.PatchPack.FrmMain(), "自动打包工具"), this.CreateModule(typeof(Ftt.PatchPack.FrmMain), "自动打包工具"),
this.CreateModule(new UI.wDBTools(), "数据库开发工具"), this.CreateModule(typeof(UI.wDBTools), "数据库开发工具"),
this.CreateModule(new UI.wDbAnlysis(), "简易SQL效率分析"), this.CreateModule(typeof(UI.wDbAnlysis), "简易SQL效率分析"),
this.CreateModule(new UI.wSysChecker(), "系统检查配置工具"), this.CreateModule(typeof(UI.wSysChecker), "系统检查配置工具"),
this.CreateModule(new UI.wMonitorVisit(), "APP模块访问监控"), this.CreateModule(typeof(UI.wMonitorVisit), "APP模块访问监控"),
this.CreateModule(new UI.wAppModel(), "APP模块管理"), this.CreateModule(typeof(UI.wAppModel), "APP模块管理"),
}; };
} }
...@@ -38,7 +38,7 @@ namespace Tools ...@@ -38,7 +38,7 @@ namespace Tools
/// <param name="tip">提示信息</param> /// <param name="tip">提示信息</param>
/// <param name="imgPath">图片路径</param> /// <param name="imgPath">图片路径</param>
/// <returns></returns> /// <returns></returns>
private ModuleInfo CreateModule(Form frm, string text, string tip = "") private ModuleInfo CreateModule(Type frm, string text, string tip = "")
{ {
return new ModuleInfo { return new ModuleInfo {
FrmView = frm, FrmView = frm,
......
...@@ -54,7 +54,7 @@ namespace Tools ...@@ -54,7 +54,7 @@ namespace Tools
try try
{ {
var item = this.listView1.SelectedItems[0]; var item = this.listView1.SelectedItems[0];
var w = item.Tag as Form; var w = Activator.CreateInstance(item.Tag as Type) as Form;
w?.ShowDialog(); w?.ShowDialog();
} }
catch (Exception ex) catch (Exception ex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment