Пример #1
0
 private static string LargestImagePath(string directory, Post post)
 {
     string[] files = Directory.GetFiles(directory, "*" + post.Md5 + "*");
     string previous = "";
     foreach (string file in files)
     {
         if (file.Contains(post.Md5 + "." + post.FileExt))
         {
             return file;
         }
         if (file.Contains("_meddef." + post.FileExt))
         {
             previous = file;
         }
         else if (file.Contains("_lowdef." + post.FileExt))
         {
             if (string.IsNullOrWhiteSpace(previous))
                 previous = file;
         }
     }
     return string.IsNullOrWhiteSpace(previous) ? null : previous;
 }
Пример #2
0
 public E621MimicPage(Post post, string imagePath)
 {
     _post = post;
     _imagePath = imagePath;
     InitializeComponent();
 }
Пример #3
0
 public DisplayPhoto(Post post, string directory)
 {
     _directory = directory;
     _post = post;
     InitializeComponent();
 }