// Static method to browse for texture // Returns null when cancelled. public static string Browse(IWin32Window parent, string select, bool browseflats) { TextureBrowserForm browser = new TextureBrowserForm(select, browseflats); if(browser.ShowDialog(parent) == DialogResult.OK) { // Return result return browser.SelectedName; } else { // Cancelled return select; } }
// Static method to browse for texture or flat. public static string Browse(IWin32Window parent, string select, bool browseflats) { TextureBrowserForm browser = new TextureBrowserForm(select, browseflats); return(browser.ShowDialog(parent) == DialogResult.OK ? browser.SelectedName : select); }