private void ReplaceTexture(object sender, EventArgs e) { var selected = GetSelectedObjects <STGenericTexture>(); if (selected.Count == 0) { return; } OpenDialogCustom ofd = new OpenDialogCustom(); string name = selected[0].Name; foreach (var file in FileManager.GetImportableTextures()) { if (file is IFileFormat) { ofd.AddFilter((IFileFormat)file); } } ofd.MultiSelect = true; var result = ofd.ShowDialog(); if (result == OpenDialogCustom.Result.OK) { TextureImportDialog importer = new TextureImportDialog(); importer.LoadTextures(ofd.GetFiles(), selected[0]); if (importer.ShowDialog() == System.Windows.Forms.DialogResult.OK) { } } }
private void ReplaceTexture(object sender, EventArgs e) { var selected = GetSelectedObjects <ITextureContainer>(); if (selected.Count == 0) { return; } OpenDialogCustom ofd = new OpenDialogCustom(); ofd.FolderDialog = true; var result = ofd.ShowDialog(); if (result == OpenDialogCustom.Result.OK) { foreach (var file in ofd.GetFiles()) { } } }