This repository was archived by the owner on Jun 23, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ private static Container defaultContainer()
2828 x . ForSingletonOf < IInstaller > ( ) . Use < Installer > ( ) ;
2929 x . ForSingletonOf < IPrompts > ( ) . Use < Prompts > ( ) ;
3030 x . For < IBsaDiff > ( ) . Use < BsaDiff > ( ) ;
31- x . For < IPathStore > ( ) . Use < RegistryPathStore > ( ) ;
31+ x . For < IPathStore > ( ) . Use < SettingsPathStore > ( ) ;
3232 } ) ;
3333 }
3434 }
Original file line number Diff line number Diff line change 11using System ;
22using System . Diagnostics ;
33using Microsoft . Win32 ;
4+ using TaleOfTwoWastelands . Properties ;
45
56namespace TaleOfTwoWastelands
67{
78 public class SettingsPathStore : IPathStore
89 {
910 public string GetPathFromKey ( string keyName )
1011 {
11- throw new NotImplementedException ( ) ;
12- }
12+ return ( string ) Settings . Default [ keyName ] ;
13+ }
1314
14- public void SetPathFromKey ( string keyName , string path )
15+ public void SetPathFromKey ( string keyName , string path )
1516 {
16- throw new NotImplementedException ( ) ;
17+ Settings . Default [ keyName ] = path ;
18+ Settings . Default . Save ( ) ;
1719 }
18- }
20+ }
1921}
Original file line number Diff line number Diff line change 123123 <DependentUpon >Game.resx</DependentUpon >
124124 </Compile >
125125 <Compile Include =" SettingsPathStore.cs" />
126- <Compile Include =" RegistryPathStore.cs" />
126+ <Compile Include =" RegistryPathStore.cs" Condition = " '$(Configuration)'=='Debug' " />
127127 <Compile Include =" Properties\Localization.Designer.cs" >
128128 <AutoGen >True</AutoGen >
129129 <DesignTime >True</DesignTime >
You can’t perform that action at this time.
0 commit comments