Skip to content

Commit 48d62c2

Browse files
authored
Merge pull request #185 from rubberduck-vba/next
sync with main repo
2 parents 201125c + 56cc4be commit 48d62c2

File tree

4 files changed

+5
-261
lines changed

4 files changed

+5
-261
lines changed

RetailCoder.VBE/UI/Inspections/InspectionResultsControl.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,15 +597,15 @@
597597
<controls:LinkButton Margin="4"
598598
Visibility="{Binding CanExecuteQuickFixInModule, Converter={StaticResource BoolToVisibility}}"
599599
Command="{Binding QuickFixInModuleCommand}"
600-
Content="{Resx ResxName=Rubberduck.Inspections.InspectionsUI, Key=QuickFix_ThisModule}" />
600+
Content="{Resx ResxName=Rubberduck.Inspections.Resources.InspectionsUI, Key=QuickFix_ThisModule}" />
601601
<controls:LinkButton Margin="4"
602602
Visibility="{Binding CanExecuteQuickFixInProject, Converter={StaticResource BoolToVisibility}}"
603603
Command="{Binding QuickFixInProjectCommand}"
604-
Content="{Resx ResxName=Rubberduck.Inspections.InspectionsUI, Key=QuickFix_ThisProject}" />
604+
Content="{Resx ResxName=Rubberduck.Inspections.Resources.InspectionsUI, Key=QuickFix_ThisProject}" />
605605
<controls:LinkButton Margin="4"
606606
Visibility="{Binding CanDisableInspection, Converter={StaticResource BoolToVisibility}}"
607607
Command="{Binding DisableInspectionCommand}"
608-
Content="{Resx ResxName=Rubberduck.Inspections.InspectionsUI, Key=DisableThisInspection}" />
608+
Content="{Resx ResxName=Rubberduck.Inspections.Resources.InspectionsUI, Key=DisableThisInspection}" />
609609
</WrapPanel>
610610
</StackPanel>
611611
</Border>

Rubberduck.VBEEditor/Native/WinEvents.cs

Lines changed: 0 additions & 226 deletions
This file was deleted.

Rubberduck.VBEEditor/Rubberduck.VBEditor.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@
127127
<Compile Include="Events\ProjectEventArgs.cs" />
128128
<Compile Include="Events\ProjectRenamedEventArgs.cs" />
129129
<Compile Include="Extensions\MSAccessComponentTypeExtensions.cs" />
130-
<Compile Include="Native\WinEvents.cs" />
131130
<Compile Include="SafeComWrappers\Abstract\ISafeComWrapper.cs" />
132131
<Compile Include="SafeComWrappers\Abstract\IVBComponentsEventsSink.cs" />
133132
<Compile Include="SafeComWrappers\Abstract\IVBProjectsEventsSink.cs" />

Rubberduck.VBEEditor/SafeComWrappers/VBA/VBE.cs

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,18 @@
11
using System;
2-
using System.Diagnostics;
32
using System.Linq;
43
using System.Runtime.InteropServices;
5-
using Rubberduck.VBEditor.Native;
64
using Rubberduck.VBEditor.SafeComWrappers.Abstract;
75
using Rubberduck.VBEditor.SafeComWrappers.Office.Core;
86
using Rubberduck.VBEditor.SafeComWrappers.Office.Core.Abstract;
9-
using IAddIns = Rubberduck.VBEditor.SafeComWrappers.Abstract.IAddIns;
10-
using IWindow = Rubberduck.VBEditor.SafeComWrappers.Abstract.IWindow;
11-
using IWindows = Rubberduck.VBEditor.SafeComWrappers.Abstract.IWindows;
127
using VB = Microsoft.Vbe.Interop;
138

149
namespace Rubberduck.VBEditor.SafeComWrappers.VBA
1510
{
1611
public class VBE : SafeComWrapper<VB.VBE>, IVBE
1712
{
18-
// ReSharper disable once PrivateFieldCanBeConvertedToLocalVariable
19-
//private readonly WinEvents.WinEventDelegate _events;
20-
//private static IntPtr _hook;
21-
2213
public VBE(VB.VBE target)
23-
:base(target)
14+
: base(target)
2415
{
25-
//_events = WinEventProc;
26-
//uint proc;
27-
//WinEvents.GetWindowThreadProcessId(new IntPtr(target.MainWindow.HWnd), out proc);
28-
//_hook = WinEvents.SetWinEventHook((uint) WinEvents.EventConstant.EVENT_MIN,
29-
// (uint) WinEvents.EventConstant.EVENT_MAX, IntPtr.Zero, Marshal.GetFunctionPointerForDelegate(_events), proc, 0,
30-
// (uint) WinEvents.WinEventFlags.WINEVENT_OUTOFCONTEXT);
3116
}
3217

3318
public string Version
@@ -44,7 +29,7 @@ public ICodePane ActiveCodePane
4429
public IVBProject ActiveVBProject
4530
{
4631
get { return new VBProject(IsWrappingNullReference ? null : Target.ActiveVBProject); }
47-
set { Target.ActiveVBProject = (VB.VBProject) value.Target; }
32+
set { Target.ActiveVBProject = (VB.VBProject)value.Target; }
4833
}
4934

5035
public IWindow ActiveWindow
@@ -101,7 +86,6 @@ public IWindows Windows
10186

10287
public override void Release(bool final = false)
10388
{
104-
//WinEvents.UnhookWinEvent(_hook);
10589
if (!IsWrappingNullReference)
10690
{
10791
VBProjects.Release();
@@ -146,18 +130,5 @@ public static void SetSelection(IVBProject vbProject, Selection selection, strin
146130
var pane = module.CodePane;
147131
pane.Selection = selection;
148132
}
149-
150-
//private void WinEventProc(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, uint idObject, uint idChild, uint dwEventThread, uint dwmsEventTime)
151-
//{
152-
////I don't care about the mouse pointer right now.
153-
//if (idObject == (uint)WinEvents.ObjId.OBJID_CURSOR) return;
154-
155-
//Debug.WriteLine("Intercepted event {0} for hwnd {1:X8} ({4}), object {2}, child {3}.",
156-
// eventType.ToEventIdString(),
157-
// hwnd.ToInt32(),
158-
// idObject.ToObjectIdString(),
159-
// idChild,
160-
// hwnd.ToClassName());
161-
//}
162133
}
163134
}

0 commit comments

Comments
 (0)