-
Notifications
You must be signed in to change notification settings - Fork 42
/
MoreSettings.cs
36 lines (32 loc) · 1.06 KB
/
MoreSettings.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Drawing.Printing;
namespace MyNotepad.Properties {
partial class Settings {
// If you used [ApplicationScopedSetting()] instead of [UserScopedSetting()] you would NOT be able to persist any data changes!
[UserScopedSetting]
[SettingsSerializeAs(System.Configuration.SettingsSerializeAs.Binary)]
public MoreSettings MoreSettings {
get {
var MoreSettings = ((MoreSettings)this["MoreSettings"]);
if (MoreSettings == null) {
this["MoreSettings"] = MoreSettings = new MoreSettings();
}
return MoreSettings;
}
set {
this["MoreSettings"] = (MoreSettings)value;
}
}
}
}
namespace MyNotepad {
[Serializable]
public class MoreSettings {
public PrinterSettings PrinterSettings { get; set; }
public PageSettings PageSettings { get; set; }
}
}