Start major rework for DataGrid display

For editing of file properties, etc.
This commit is contained in:
2026-02-16 09:40:15 +09:00
parent 7ad1038b37
commit 7ea649850e
7 changed files with 267 additions and 32 deletions
+78
View File
@@ -0,0 +1,78 @@
using System;
using System.IO;
using ReceiptPDFBuilder.Helpers;
namespace ReceiptPDFBuilder.Models;
class ReportFile : ChangeNotifier
{
private string _title;
private DateOnly _date;
private DateTime _dateTime;
private DateTimeOffset _dto;
private string _notes;
private string _filePath;
public ReportFile()
{
_title = "";
_date = DateOnly.FromDateTime(DateTime.Now);
_notes = "";
_filePath = "";
}
public string Title
{
get => _title;
set { _title = value; NotifyPropertyChanged(); }
}
public DateOnly Date
{
get => _date;
set
{
_date = value;
DateTime = value.ToDateTime(TimeOnly.MinValue);
DTO = new DateTimeOffset(value.ToDateTime(TimeOnly.MinValue));
NotifyPropertyChanged();
}
}
public DateTime DateTime
{
get => _dateTime;
set
{
_dateTime = value;
NotifyPropertyChanged();
}
}
public DateTimeOffset DTO
{
get => _dto;
set
{
_dto = value;
NotifyPropertyChanged();
}
}
public string Notes
{
get => _notes;
set { _notes = value; NotifyPropertyChanged(); }
}
public string FilePath
{
get => _filePath;
set { _filePath = value; NotifyPropertyChanged(); }
}
public string FileName
{
get => Path.GetFileName(_filePath);
}
}