@@ -12,13 +12,42 @@ public ConsolePatchForm() : base("PS3 Patch")
1212
1313 protected override void PathChanged ( object ? sender , EventArgs ev )
1414 {
15- this . Accessor = new ConsolePatchAccessor ( this . _remoteAddress . Text ) ;
15+ this . InitializePatchAccessor ( ) ;
1616 base . PathChanged ( sender , ev ) ;
17+ this . DisposePatchAccessor ( ) ;
1718 }
1819
1920 protected override void GameChanged ( object ? sender , EventArgs ev )
2021 {
22+ this . InitializePatchAccessor ( ) ;
2123 base . GameChanged ( sender , ev ) ;
24+ this . DisposePatchAccessor ( ) ;
25+ }
26+
27+ public override void CompletePatch ( object ? sender , EventArgs e )
28+ {
29+ this . InitializePatchAccessor ( ) ;
30+ base . CompletePatch ( sender , e ) ;
31+ this . DisposePatchAccessor ( ) ;
32+ }
33+
34+ protected override void RevertToOriginalExecutable ( object ? sender , EventArgs e )
35+ {
36+ this . InitializePatchAccessor ( ) ;
37+ base . RevertToOriginalExecutable ( sender , e ) ;
38+ this . DisposePatchAccessor ( ) ;
39+ }
40+
41+ private void InitializePatchAccessor ( )
42+ {
43+ this . DisposePatchAccessor ( ) ;
44+ this . Accessor = new ConsolePatchAccessor ( this . _remoteAddress . Text ) ;
45+ }
46+
47+ private void DisposePatchAccessor ( )
48+ {
49+ if ( this . Accessor is IDisposable disposable )
50+ disposable . Dispose ( ) ;
2251 }
2352
2453 protected override TableRow AddRemoteField ( )
0 commit comments