66 lines
2.0 KiB
C#
66 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ImageHandlingLibrary.Models
|
|
{
|
|
public class LocalPicture
|
|
{
|
|
public string PictureFileName { get; set; }
|
|
public string InitialPath { get; set; }
|
|
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; }
|
|
|
|
|
|
}
|
|
}
|