Continue working on main menu screen and refactor

New method for storing information on report data; rework and migrate settings to version 2; Add new options to ConfirmViewModel; rework some class hierarchy (may change more later)
This commit is contained in:
2026-03-30 20:12:34 +09:00
parent 8be518e81c
commit a9674a3f45
9 changed files with 247 additions and 73 deletions
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using MayShow.Helpers;
using MayShows.Helpers;
namespace MayShow.Models;
class PDFReportInfo : ChangeNotifier
{
private string? _baseFolder; // might be null
private string _uuid;
private string _title;
private DateTime? _lastSaved;
public PDFReportInfo() : base()
{
_baseFolder = null;
_uuid = Guid.NewGuid().ToString();
_title = "";
_lastSaved = null;
}
public string? BaseFolder
{
get => _baseFolder;
set { _baseFolder = value; NotifyPropertyChanged(); }
}
public string UUID
{
get => _uuid;
set { _uuid = value; NotifyPropertyChanged(); }
}
public string Title
{
get => _title;
set { _title = value; NotifyPropertyChanged(); }
}
public DateTime? LastSaved
{
get => _lastSaved;
set { _lastSaved = value; NotifyPropertyChanged(); }
}
public void ResetUUID()
{
UUID = Guid.NewGuid().ToString();
}
public void DeleteInternalFolderFromDisk()
{
var path = Path.Combine(Utilities.GetInternalDataPath(), UUID);
if (Directory.Exists(path) && path != Utilities.GetInternalDataPath())
{
Directory.Delete(path, true);
}
}
}