Exemple #1
0
        public void delete_model(String model_name)
        {
            String folder_path = modelpath + model_name.Split('/')[0] + "/" + model_name.Split('/')[1].Substring(0, 1) + modelslotstring;

            if (Directory.Exists(folder_path))
            {
                foreach (String file in Directory.GetFiles(folder_path, "*", SearchOption.AllDirectories))
                {
                    FileInfo fi = new FileInfo(file);
                    if (fi.IsReadOnly)
                    {
                        fi.IsReadOnly = false;
                    }
                }
                Directory.Delete(folder_path, true);
            }

            Library.delete_skin_model(this.fullname, this.slot, model_name);
            this.models.Remove(model_name);
        }