-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainForm.cs
More file actions
25 lines (24 loc) · 886 Bytes
/
MainForm.cs
File metadata and controls
25 lines (24 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
namespace LoveMaker {
internal partial class MainForm: Form {
private static MTLib.Secure.DictionaryFile<String, String> settings = new("settings.mtdb");
private static MTLib.Secure.Salt secret_salt = new(8);
public MainForm() {
this.InitializeComponent();
}
private void MainForm_Load(Object sender, EventArgs e) {
settings.Read();
if (!settings.HasKey("secret")) {
settings["secret"] = secret_salt.ToString();
} else {
secret_salt = new(settings["secret"]);
}
}
private void MainForm_Closing(Object sender, EventArgs e) {
settings.Save();
}
private void LibraryStore_Click(Object sender, EventArgs e) {
using LibraryStore store = new();
_ = store.ShowDialog();
}
}
}