Commit 8845f191 authored by tr's avatar tr

1、主界面增加异常捕获-防止子窗口异常直接退出

parent dd03730a
......@@ -51,9 +51,17 @@ namespace Tools
if (this.listView1.Items.Count == 0)
return;
//打开窗口
var item = this.listView1.SelectedItems[0];
var w = item.Tag as Form;
w?.ShowDialog();
try
{
var item = this.listView1.SelectedItems[0];
var w = item.Tag as Form;
w?.ShowDialog();
}
catch (Exception ex)
{
var msg = $"错误消息:{ex.Message}\r\n堆栈信息:{ex.StackTrace}";
MyUtils.Utils.Tip(msg, 1200, 800);
}
}
private void ListView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
{
......
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