Exemple #1
0
        private static string GetFilePath(RestoreWindowSettings settings, Window window)
        {
            if (!string.IsNullOrWhiteSpace(settings.FilePath))
            {
                return(settings.FilePath);
            }

            string windowName = window.GetType().FullName;

            return(FrameworkUtils.GetFullPathToExe(windowName.Replace('.', '_') + ".xml"));
        }
Exemple #2
0
 private static BitmapImage LoadPicture(string fileName)
 {
     try
     {
         string path = FrameworkUtils.GetFullPathToExe(fileName);
         return(new BitmapImage(new Uri(path)));
     }
     catch
     {
         return(new BitmapImage());
     }
 }
        private static ImageSource GetFileImage()
        {
            if (fileImg != null)
            {
                return(fileImg);
            }

            try
            {
                string fullPath = FrameworkUtils.GetFullPathToExe("Assets\\genericFileThumbnail.png");
                return(fileImg = new BitmapImage(new Uri(fullPath)));
            }
            catch
            {
                return(null);
            }
        }