@@ -12,13 +12,42 @@ public ConsolePatchForm() : base("PS3 Patch")
12
12
13
13
protected override void PathChanged ( object ? sender , EventArgs ev )
14
14
{
15
- this . Accessor = new ConsolePatchAccessor ( this . _remoteAddress . Text ) ;
15
+ this . InitializePatchAccessor ( ) ;
16
16
base . PathChanged ( sender , ev ) ;
17
+ this . DisposePatchAccessor ( ) ;
17
18
}
18
19
19
20
protected override void GameChanged ( object ? sender , EventArgs ev )
20
21
{
22
+ this . InitializePatchAccessor ( ) ;
21
23
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 ( ) ;
22
51
}
23
52
24
53
protected override TableRow AddRemoteField ( )
0 commit comments