@@ -12,13 +12,13 @@ internal sealed class Options {
1212 public Options ( Settings settings ) {
1313 this . settings = settings ;
1414
15- NetworkInterface = NetworkInterfaces . Fetch ( settings . LastNic ) ;
16- NicSpeeds = settings . NicSpeeds ;
17- Bounds = settings . Bounds ;
18- Topmost = settings . Topmost ;
19- Transparent = settings . Transparent ;
20- Docking = settings . Docking ;
21- LoadHidden = settings . LoadHidden ;
15+ // Import settings from previous version.
16+ if ( ! settings . Upgraded ) {
17+ settings . Upgrade ( ) ;
18+ settings . Upgraded = true ;
19+ }
20+
21+ Load ( ) ;
2222 }
2323
2424 public NetworkInterface NetworkInterface { get ; set ; }
@@ -42,6 +42,16 @@ public Options Clone() {
4242 return clone ;
4343 }
4444
45+ private void Load ( ) {
46+ NetworkInterface = NetworkInterfaces . Fetch ( settings . LastNic ) ;
47+ NicSpeeds = settings . NicSpeeds ;
48+ Bounds = settings . Bounds ;
49+ Topmost = settings . Topmost ;
50+ Transparent = settings . Transparent ;
51+ Docking = settings . Docking ;
52+ LoadHidden = settings . LoadHidden ;
53+ }
54+
4555 public void Save ( ) {
4656 settings . LastNic = NetworkInterface ? . Id ;
4757 settings . NicSpeeds = NicSpeeds ;
0 commit comments