private void LstFiles_MouseDoubleClick(object sender, MouseButtonEventArgs e) { try { TreeViewItem item = foldersItem.SelectedItem as TreeViewItem; if (LstFiles.SelectedIndex == -1) { return; } string openpath = (string)item.Tag + "\\" + LstFiles.SelectedItem; AcadFunctions.OpenDrawing(openpath); this.Close(); } catch { } }
private void openDwg() { try { TreeViewItem item = foldersItem.SelectedItem as TreeViewItem; if (LstFiles.SelectedIndex == -1) { return; } string openpath = (string)item.Tag + "\\" + LstFiles.SelectedItem; AcadFunctions.OpenDrawing(openpath); BtnClose_Click(null, null); } catch { } }