Esempio n. 1
0
        public static swig.ImageResource LoadAppResource(swig.Native native, string path)
        {
            string appDirectory = GUI.Manager.GetEntryDirectory();
            string fullPath     = Path.Combine(appDirectory, path);

            return(native.LoadImageResource(fullPath));
        }
Esempio n. 2
0
        public static swig.ImageResource LoadAppResource(swig.Native native, string path)
        {
            string appDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
            string fullPath     = Path.Combine(appDirectory, path);

            return(native.LoadImageResource(fullPath));
        }
Esempio n. 3
0
 public static void Load(swig.Native native)
 {
     Icon     = native.LoadImageResource("resources/icon.png");
     Play     = native.LoadImageResource("resources/Play.png");
     Stop     = native.LoadImageResource("resources/Stop.png");
     Pause    = native.LoadImageResource("resources/Pause.png");
     Step     = native.LoadImageResource("resources/Step.png");
     BackStep = native.LoadImageResource("resources/BackStep.png");
 }
Esempio n. 4
0
 public static swig.ImageResource Load(swig.Native native, string path)
 {
     if (tempImages.ContainsKey(path))
     {
         return(tempImages[path]);
     }
     else
     {
         var img = native.LoadImageResource(path);
         if (img != null)
         {
             tempImages.Add(path, img);
         }
         return(img);
     }
 }
Esempio n. 5
0
        public static swig.ImageResource 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.LoadImageResource(path);
                if (img != null)
                {
                    tempImages.Add(path, img);
                }
                return(img);
            }
        }
Esempio n. 6
0
 public static void Load(swig.Native native)
 {
     Icon = native.LoadImageResource("resources/icon.png");
 }