Nu fungerar hela inläsningen och reorganisationen !

This commit is contained in:
2020-07-22 00:13:48 +02:00
parent f9437f04be
commit 6b27788721
6 changed files with 373 additions and 107 deletions

View File

@ -10,16 +10,57 @@ namespace PictureHandling
{
public class LocalPicture
{
public string PictureFileName { get; set; }
public string InitialPath { get; set; }
public string PictureFullPath {
get {
public string PictureFullPath
{
get
{
return Path.Combine(InitialPath, PictureFileName);
}
}
public Image AktImage { get; set; }
public int AktImWidth { get; set; }
public int AktImHeight { get; set; }
public string CreatedDate { get; set; }
public bool CreatedDateChanged { get; set; } = false;
public string AarManDir
{
get
{
if (string.IsNullOrEmpty(CreatedDate)) return RootPosition;
else
{
DateTime dttd = DateTime.Parse(CreatedDate.Substring(0, 10).Replace(":", "-"));
string subDir = dttd.Year.ToString("0000") + "-" + dttd.Month.ToString("00") + @"\";
return Path.Combine(RootPosition + subDir);
}
}
}
public string AarManDayDir
{
get
{
if (string.IsNullOrEmpty(CreatedDate)) return RootPosition;
else
{
DateTime dttd = DateTime.Parse(CreatedDate.Substring(0, 10).Replace(":", "-"));
string subDir = dttd.Year.ToString("0000") + "_" + dttd.Month.ToString("00") + "_" + dttd.Day.ToString("00") + @"\";
return Path.Combine(AarManDir + subDir);
}
}
}
public string ImageNewFullpath
{
get
{
return Path.Combine(AarManDayDir + PictureFileName);
}
}
public string RootPosition { get; set; }
}
}