private void Button_Click_1(object sender, RoutedEventArgs e)
{
string filetype = "文件(*.stm)|*.stm";
string imgpath = OpenFileDialog(filetype);
if (!string.IsNullOrEmpty(imgpath))
{
this.fileTextBox.Text = imgpath;
LoadText(imgpath);
}
}
public string OpenFileDialog(string _filetype)
{
Microsoft.Win32.OpenFileDialog op = new Microsoft.Win32.OpenFileDialog();
op.RestoreDirectory = true;
op.Filter = _filetype;
op.ShowDialog();
return op.FileName;
}
{
string filetype = "文件(*.stm)|*.stm";
string imgpath = OpenFileDialog(filetype);
if (!string.IsNullOrEmpty(imgpath))
{
this.fileTextBox.Text = imgpath;
LoadText(imgpath);
}
}
public string OpenFileDialog(string _filetype)
{
Microsoft.Win32.OpenFileDialog op = new Microsoft.Win32.OpenFileDialog();
op.RestoreDirectory = true;
op.Filter = _filetype;
op.ShowDialog();
return op.FileName;
}