Пример #1
0
        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);
        }
Пример #2
0
 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);
     }
 }