1. Beta-Version mit Korrekturanmerkungen

This commit is contained in:
Simon Martens
2023-05-11 17:15:04 +02:00
parent 0ef63bfde4
commit fdaffb2f91
20 changed files with 240 additions and 46 deletions

View File

@@ -1,9 +1,6 @@
namespace HaWeb.Models;
using System.ComponentModel.DataAnnotations;
public class StartEndYear {
[Required]
public int StartYear { get; set; }
public class YearSetting {
[Required]
public int EndYear { get; set; }
}

View File

@@ -10,7 +10,6 @@ public class XMLRootDocument {
private XElement? _Element;
private string? _filename;
private IFileInfo? _file;
private StringBuilder? _log;
[JsonIgnore]
@@ -31,9 +30,7 @@ public class XMLRootDocument {
}
set {
_file = value;
// After saving, we don't need to save the ELement anymore, it can get read in if it's used.
// We do this to prevent memory hogging. TODO: MAKE IT MORE EFFICIENT, EG ALL USED FILES HAVE SET ELEMENTS OR SO
// if (value != null) _Element = null;
_Element = null;
} }
public string Prefix { get; private set; }
public DateTime Date { get; private set; }
@@ -99,9 +96,9 @@ public class XMLRootDocument {
public void Log(string msg) {
if (_log == null) _log = new StringBuilder();
var prefix = DateTime.Now.ToString() + " ";
var prefix = DateTime.Now.ToShortTimeString() + " ";
if (File != null) prefix += File.Name + ": ";
_log.Append("<br>" + prefix + msg);
_log.AppendLine(prefix + msg);
}
public void ResetLog() {