Exemple #1
0
 public static void AddResource()
 {
     if (form.openTexture.ShowDialog() == DialogResult.OK)
     {
         var toOpen = form.openTexture.FileNames;
         foreach (var file in toOpen)
         {
             var key = System.IO.Path.GetFileNameWithoutExtension(file);
             var res = new Resource();
             res.Smooth = true;
             res.Name   = key;
             res.ChangeBaseImage(new Image(file));
             res.AdaptFrameSize();
             DynamicObject.AddResource(res);
             selection = res;
         }
         form.UpdateInterface();
     }
 }