public void loadOrReloadMaterialFile(string name) { // see if its loaded MtrFile f = findMtrFile(name); if (f != null) { f.precacheMtrFile(); return; } // if not, load new loadNewMtrFile(name); }
public void loadNewMtrFile(string path) { try { MtrFile mf; mf = new MtrFile(path); matFiles.Add(mf); } catch (Exception ex) { MessageBox.Show("Precache failed.", "Failed to precache material file " + path, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } }