-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettingsBackup.cs
44 lines (41 loc) · 1.7 KB
/
SettingsBackup.cs
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LMItemTracker
{
class SettingsBackup
{
int backgroundColor { get; }
int textColor { get; }
int formWidth { get; }
int formHeight { get; }
bool alwaysOnTop { get; }
bool showLastItem { get; }
bool showAmmoCount { get; }
bool showDeathCount { get; }
public SettingsBackup()
{
backgroundColor = Properties.Settings.Default.BackgroundColor.ToArgb();
textColor = Properties.Settings.Default.TextColor.ToArgb();
formWidth = Properties.Settings.Default.FormWidth;
formHeight = Properties.Settings.Default.FormHeight;
showLastItem = Properties.Settings.Default.ShowLastItem;
alwaysOnTop = Properties.Settings.Default.AlwaysOnTop;
showAmmoCount = Properties.Settings.Default.ShowAmmoCount;
showDeathCount = Properties.Settings.Default.ShowDeathCount;
}
public void RestoreSettings()
{
Properties.Settings.Default.BackgroundColor = System.Drawing.Color.FromArgb(backgroundColor);
Properties.Settings.Default.TextColor = System.Drawing.Color.FromArgb(textColor);
Properties.Settings.Default.FormWidth = formWidth;
Properties.Settings.Default.FormHeight = formHeight;
Properties.Settings.Default.AlwaysOnTop = alwaysOnTop;
Properties.Settings.Default.ShowLastItem = showLastItem;
Properties.Settings.Default.ShowAmmoCount = showAmmoCount;
Properties.Settings.Default.ShowDeathCount = showDeathCount;
}
}
}