private void importAssetToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = "c:\\"; openFileDialog.Filter = "txt files (*.osa)|*.osa|All files (*.*)|*.*"; openFileDialog.FilterIndex = 2; openFileDialog.RestoreDirectory = true; if (openFileDialog.ShowDialog() == DialogResult.OK) { var filename = openFileDialog.FileName; var retValue = OSREWrapper.ImportAsset(filename, 0); if (0 == retValue) { string[] sepFolders = filename.Split('\\'); string name = sepFolders[sepFolders.Length - 1]; _projectTreeView.NewProjectView(name); } } }