Commit 29107f0c authored by tr's avatar tr

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

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