コード例 #1
0
        public static swig.ReloadableImage LoadAppResource(swig.Native native, string path)
        {
            string appDirectory = GUI.Manager.GetEntryDirectory();
            string fullPath     = Path.Combine(appDirectory, path);

            return(native.CreateReloadableImage(fullPath));
        }
コード例 #2
0
        public static swig.ReloadableImage Load(swig.Native native, string path, bool isRequiredToReload = false)
        {
            if (tempImages.ContainsKey(path) && !isRequiredToReload)
            {
                return(tempImages[path]);
            }
            else
            {
                if (tempImages.ContainsKey(path))
                {
                    tempImages[path].Invalidate();
                    tempImages[path].Validate();
                    return(tempImages[path]);
                }

                var img = native.CreateReloadableImage(path);
                if (img != null)
                {
                    tempImages.Add(path, img);
                }
                return(img);
            }
        }