File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 139
139
<Compile Include =" Events\VBENativeServices.cs" />
140
140
<Compile Include =" Events\WindowChangedEventArgs.cs" />
141
141
<Compile Include =" Extensions\MSAccessComponentTypeExtensions.cs" />
142
+ <Compile Include =" SafeComWrappers\Office.Core\Abstract\IUserForm.cs" />
142
143
<Compile Include =" SafeComWrappers\Abstract\ISafeComWrapper.cs" />
143
144
<Compile Include =" SafeComWrappers\DispatcherEventArgs.cs" />
144
145
<Compile Include =" SafeComWrappers\MSAccessComponentType.cs" />
196
197
<Compile Include =" SafeComWrappers\VBA\AddIn.cs" />
197
198
<Compile Include =" SafeComWrappers\VBA\AddIns.cs" />
198
199
<Compile Include =" SafeComWrappers\VBA\Application.cs" />
200
+ <Compile Include =" SafeComWrappers\VBA\UserForm.cs" />
199
201
<Compile Include =" SafeComWrappers\VBA\CodeModule.cs" />
200
202
<Compile Include =" SafeComWrappers\VBA\CodePane.cs" />
201
203
<Compile Include =" SafeComWrappers\VBA\CodePanes.cs" />
Original file line number Diff line number Diff line change
1
+ namespace Rubberduck . VBEditor . SafeComWrappers . Office . Core . Abstract
2
+ {
3
+ public interface IUserForm
4
+ {
5
+ IControls Controls { get ; }
6
+ IControls Selected { get ; }
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ using Rubberduck . VBEditor . SafeComWrappers . Abstract ;
2
+ using Rubberduck . VBEditor . SafeComWrappers . Office . Core . Abstract ;
3
+
4
+ namespace Rubberduck . VBEditor . SafeComWrappers . VBA
5
+ {
6
+ public class UserForm : SafeComWrapper < Microsoft . Vbe . Interop . Forms . UserForm > , IUserForm
7
+ {
8
+ public UserForm ( Microsoft . Vbe . Interop . Forms . UserForm target , bool rewrapping = false )
9
+ : base ( target , rewrapping )
10
+ {
11
+ }
12
+
13
+ public IControls Controls => new Controls ( Target . Controls ) ;
14
+
15
+ public IControls Selected => new Controls ( Target . Selected ) ;
16
+
17
+ public override bool Equals ( ISafeComWrapper < Microsoft . Vbe . Interop . Forms . UserForm > other )
18
+ {
19
+ return IsEqualIfNull ( other ) || ( other != null && ReferenceEquals ( other . Target , Target ) ) ;
20
+ }
21
+
22
+ public bool Equals ( IUserForm other )
23
+ {
24
+ return Equals ( other as SafeComWrapper < Microsoft . Vbe . Interop . Forms . UserForm > ) ;
25
+ }
26
+
27
+ public override int GetHashCode ( )
28
+ {
29
+ return IsWrappingNullReference ? 0 : Target . GetHashCode ( ) ;
30
+ }
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments