/// <summary> /// 添加dll文件点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddDll_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFile = new OpenFileDialog(); openFile.Filter = "Dll文件 | *.dll;"; if (openFile.ShowDialog() == DialogResult.OK) { string goalPath = projectDll.OutPath + openFile.SafeFileName; if (!File.Exists(goalPath)) { File.Copy(openFile.FileName, goalPath); DllFile newDll = new DllFile(openFile.SafeFileName, goalPath); if (projectDll != null) { projectDll.AddDllFilePath(newDll); } } else { System.Windows.MessageBox.Show("该Dll文件已经存在请先删除"); } } }