标签:
try { OpenFileDialog openFileDialog = new OpenFileDialog(); string str = comboBox_hexFilePath.Text; string file = str.Substring(0, str.LastIndexOf("\\") + 1);//去掉了路径 openFileDialog.InitialDirectory = file; openFileDialog.Filter = "Hex文件|*.hex"; openFileDialog.RestoreDirectory = true; openFileDialog.FilterIndex = 1; comboBox_hexFilePath.Text = openFileDialog.FileName;//文件名 } } catch { show_info("hex文件选择.."); }
标签:
原文地址:http://www.cnblogs.com/fx427103/p/4264226.html