2022-01-07PX reordered program configuration in preparation to separate settings for local, db
This commit is contained in:
parent
d9d4d9c2be
commit
747fc9008e
17
Program.cs
17
Program.cs
|
@ -14,31 +14,16 @@ TODO
|
|||
- Documentation
|
||||
- ErrorLog for all errors
|
||||
- frmMain: Menu option to miss an MV for selected/checked users
|
||||
- FormMail: Add mail for automatic member type setting to "Foerdermitglied"
|
||||
- FormMail: Membership type was changed manually
|
||||
- FormMail: Cronjob found unassigned MoneyTransfers
|
||||
- frmEditEntry: Optional (checkbox) request for a comment on data changes, when hitting OK
|
||||
- frmMain: Indicator that the data was modified after import + messagebox to remind user to export on quitting.
|
||||
- add "database changed since last import/export" warning (e.g. you forgot to push your changes)
|
||||
- frmMain: Member List: Column "monthly fee", Column "Last payment", disabled by default
|
||||
- Configuration window: MoneyTransferRegEx
|
||||
- Bug: Generating testdata doesn't remove old xml files, thus the memberlist will be mixed after next restart
|
||||
- Bug: Member list not reloaded after ProcessCSV (balance display is wrong)
|
||||
- Bug: Import/Export gpg uses command line parameter for password - this can be read out by any system user via "ps uxa"
|
||||
- CronjobConfig
|
||||
- CustomListView: implement generic filtering
|
||||
|
||||
- Improve import/export handling, e.g. check for newer database on program start
|
||||
- Debt handling: Store explicit flags or status for "one month behind"
|
||||
or "two months behind", in order to have an escalation chain
|
||||
|
||||
- PGP for mails
|
||||
*/
|
||||
namespace dezentrale
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static uint VersionNumber { get; private set; } = 0x21052800;
|
||||
public static uint VersionNumber { get; private set; } = 0x22010700;
|
||||
public static string VersionString { get; private set; } = $"{VersionNumber:x}";
|
||||
|
||||
public static string AppData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
|
|
|
@ -8,19 +8,10 @@ namespace dezentrale.model
|
|||
{
|
||||
public class Configuration : XmlData
|
||||
{
|
||||
//Program-wide configuration (single-instance settings in main configuration)
|
||||
[XmlElement] public ConfigSmtp Smtp { get; set; } = new ConfigSmtp();
|
||||
[XmlElement] public ConfigVSMail VS { get; set; } = new ConfigVSMail();
|
||||
[XmlElement] public MemberImportExport ImportExport{ get; set; } = new MemberImportExport();
|
||||
|
||||
[XmlElement] public string DbDirectory { get; set; } = DefaultDbDirectory;
|
||||
//[XmlElement] public string DbBackupDirectory { get; set; } = DefaultDbBackupDirectory;
|
||||
//[XmlElement] public string ImportExportDirectory { get; set; } = DefaultImportExportDirectory;
|
||||
[XmlElement] public uint RegularPaymentAmount { get; set; } = 3200; //cents
|
||||
[XmlElement] public string RegularPaymentCurrency { get; set; } = "EUR";
|
||||
[XmlElement] public string LocalUser { get; set; } = "John Doe";
|
||||
[XmlElement] public string KeylockCombination { get; set; } = "0000";
|
||||
|
||||
|
||||
[XmlElement] public string LocalUser { get; set; } = "John Doe";
|
||||
|
||||
//UI: lstMembers: Columns
|
||||
[XmlElement("MemberListColumn")] public List<ConfigLVColumn> MemberListColumns { get; set; } = new List<ConfigLVColumn>();
|
||||
[XmlElement("MTListColumn")] public List<ConfigLVColumn> MTListColumns { get; set; } = new List<ConfigLVColumn>();
|
||||
|
@ -29,19 +20,42 @@ namespace dezentrale.model
|
|||
public List<ConfigLVColumn> MvInvitationsListColumns{ get; set; } = new List<ConfigLVColumn>();
|
||||
[XmlElement("AttachmentsColumn")]public List<ConfigLVColumn> AttachmentsColumns{ get; set; } = new List<ConfigLVColumn>();
|
||||
[XmlElement("SelectFieldsColumn")]public List<ConfigLVColumn> SelectFieldsColumns{ get; set; } = new List<ConfigLVColumn>();
|
||||
|
||||
public List<string> MemberCsvExportFields { get; set; } = new List<string>();
|
||||
|
||||
[XmlElement] public List<KeyValue> MoneyTransferRegEx { get; set; } = new List<KeyValue>(); //This doesn't belong here! Move to new file within db-data!
|
||||
[XmlElement] public DateTime LastCronjobRun { get; set; } = DateTime.Now; //This doesn't belong here! Move to new file within db-data!
|
||||
|
||||
[XmlIgnore] public static string DefaultDbDirectory { get; private set; } = "db-data";
|
||||
//[XmlIgnore] public static string DefaultDbBackupDirectory { get; private set; } = "db-backup";
|
||||
//[XmlIgnore] public static string DefaultImportExportDirectory { get; private set; } = "import-export";
|
||||
|
||||
|
||||
|
||||
|
||||
//Program-wide db metadata (multiple sub-objects in main configuration)
|
||||
[XmlElement] public string DbDirectory { get; set; } = DefaultDbDirectory;
|
||||
//[XmlElement] public string DbBackupDirectory { get; set; } = DefaultDbBackupDirectory;
|
||||
//[XmlElement] public string ImportExportDirectory { get; set; } = DefaultImportExportDirectory;
|
||||
|
||||
[XmlElement] public DateTime LastDbLocalChange { get; set; }
|
||||
[XmlElement] public DateTime LastDbExport { get; set; }
|
||||
[XmlElement] public DateTime LastDbImport { get; set; }
|
||||
[XmlElement] public bool DbChangedSinceExport { get; set; } = false;
|
||||
public List<string> MemberCsvExportFields { get; set; } = new List<string>();
|
||||
|
||||
|
||||
[XmlElement] public MemberImportExport ImportExport { get; set; } = new MemberImportExport();
|
||||
|
||||
|
||||
|
||||
|
||||
//db-wide configuration (in DB folder)
|
||||
[XmlElement("VS")] public ConfigVSMail VS { get; set; } = new ConfigVSMail();
|
||||
[XmlElement] public ConfigVSMail Schatzmeister { get; set; } = new ConfigVSMail();
|
||||
|
||||
[XmlElement] public uint RegularPaymentAmount { get; set; } = 3200; //cents
|
||||
[XmlElement] public string RegularPaymentCurrency { get; set; } = "EUR";
|
||||
[XmlElement] public string KeylockCombination { get; set; } = "0000";
|
||||
|
||||
[XmlElement] public List<KeyValue> MoneyTransferRegEx { get; set; } = new List<KeyValue>(); //This doesn't belong here! Move to new file within db-data!
|
||||
[XmlElement] public DateTime LastCronjobRun { get; set; } = DateTime.Now; //This doesn't belong here! Move to new file within db-data!
|
||||
|
||||
|
||||
[XmlIgnore] public static string DefaultDbDirectory { get; private set; } = "db-data";
|
||||
//[XmlIgnore] public static string DefaultDbBackupDirectory { get; private set; } = "db-backup";
|
||||
//[XmlIgnore] public static string DefaultImportExportDirectory { get; private set; } = "import-export";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue