File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed
Rubberduck.VBEEditor/SafeComWrappers/Office.Core Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 31
31
// You can specify all the values or you can default the Build and Revision Numbers
32
32
// by using the '*' as shown below:
33
33
// [assembly: AssemblyVersion("1.0.*")]
34
- [ assembly: AssemblyVersion ( "2.0.8 .*" ) ]
35
- [ assembly: AssemblyFileVersion ( "2.0.8 .0" ) ]
34
+ [ assembly: AssemblyVersion ( "2.0.9 .*" ) ]
35
+ [ assembly: AssemblyFileVersion ( "2.0.9 .0" ) ]
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using Rubberduck . Parsing ;
3
2
using Rubberduck . Parsing . Symbols ;
4
3
using Rubberduck . Parsing . VBA ;
5
4
using Rubberduck . Properties ;
@@ -176,7 +175,22 @@ public void Dispose()
176
175
return ;
177
176
}
178
177
178
+ _refreshButton . Click -= refreshButton_Click ;
179
+ ( ( CommandBarButton ) _refreshButton ) . StopEvents ( ) ;
180
+
179
181
_state . StateChanged -= State_StateChanged ;
182
+ ( ( CommandBarButton ) _statusButton ) . StopEvents ( ) ;
183
+
184
+ _refreshButton . Delete ( ) ;
185
+ _statusButton . Delete ( ) ;
186
+ _selectionButton . Delete ( ) ;
187
+
188
+ _refreshButton . Release ( ) ;
189
+ _statusButton . Release ( ) ;
190
+ _selectionButton . Release ( ) ;
191
+
192
+ _commandbar . Delete ( ) ;
193
+
180
194
_isDisposed = true ;
181
195
}
182
196
}
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ public void HandleEvents()
20
20
( ( Microsoft . Office . Core . CommandBarButton ) Target ) . Click += Target_Click ;
21
21
}
22
22
23
+ public void StopEvents ( )
24
+ {
25
+ ( ( Microsoft . Office . Core . CommandBarButton ) Target ) . Click -= Target_Click ;
26
+ }
27
+
23
28
private Microsoft . Office . Core . CommandBarButton Button
24
29
{
25
30
get { return ( Microsoft . Office . Core . CommandBarButton ) Target ; }
You can’t perform that action at this time.
0 commit comments