Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions RetailCoder.VBE/UI/Inspections/InspectionResultsControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -597,15 +597,15 @@
<controls:LinkButton Margin="4"
Visibility="{Binding CanExecuteQuickFixInModule, Converter={StaticResource BoolToVisibility}}"
Command="{Binding QuickFixInModuleCommand}"
Content="{Resx ResxName=Rubberduck.Inspections.InspectionsUI, Key=QuickFix_ThisModule}" />
Content="{Resx ResxName=Rubberduck.Inspections.Resources.InspectionsUI, Key=QuickFix_ThisModule}" />
<controls:LinkButton Margin="4"
Visibility="{Binding CanExecuteQuickFixInProject, Converter={StaticResource BoolToVisibility}}"
Command="{Binding QuickFixInProjectCommand}"
Content="{Resx ResxName=Rubberduck.Inspections.InspectionsUI, Key=QuickFix_ThisProject}" />
Content="{Resx ResxName=Rubberduck.Inspections.Resources.InspectionsUI, Key=QuickFix_ThisProject}" />
<controls:LinkButton Margin="4"
Visibility="{Binding CanDisableInspection, Converter={StaticResource BoolToVisibility}}"
Command="{Binding DisableInspectionCommand}"
Content="{Resx ResxName=Rubberduck.Inspections.InspectionsUI, Key=DisableThisInspection}" />
Content="{Resx ResxName=Rubberduck.Inspections.Resources.InspectionsUI, Key=DisableThisInspection}" />
</WrapPanel>
</StackPanel>
</Border>
Expand Down
226 changes: 0 additions & 226 deletions Rubberduck.VBEEditor/Native/WinEvents.cs

This file was deleted.

1 change: 0 additions & 1 deletion Rubberduck.VBEEditor/Rubberduck.VBEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
<Compile Include="Events\ProjectEventArgs.cs" />
<Compile Include="Events\ProjectRenamedEventArgs.cs" />
<Compile Include="Extensions\MSAccessComponentTypeExtensions.cs" />
<Compile Include="Native\WinEvents.cs" />
<Compile Include="SafeComWrappers\Abstract\ISafeComWrapper.cs" />
<Compile Include="SafeComWrappers\Abstract\IVBComponentsEventsSink.cs" />
<Compile Include="SafeComWrappers\Abstract\IVBProjectsEventsSink.cs" />
Expand Down
33 changes: 2 additions & 31 deletions Rubberduck.VBEEditor/SafeComWrappers/VBA/VBE.cs
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using Rubberduck.VBEditor.Native;
using Rubberduck.VBEditor.SafeComWrappers.Abstract;
using Rubberduck.VBEditor.SafeComWrappers.Office.Core;
using Rubberduck.VBEditor.SafeComWrappers.Office.Core.Abstract;
using IAddIns = Rubberduck.VBEditor.SafeComWrappers.Abstract.IAddIns;
using IWindow = Rubberduck.VBEditor.SafeComWrappers.Abstract.IWindow;
using IWindows = Rubberduck.VBEditor.SafeComWrappers.Abstract.IWindows;
using VB = Microsoft.Vbe.Interop;

namespace Rubberduck.VBEditor.SafeComWrappers.VBA
{
public class VBE : SafeComWrapper<VB.VBE>, IVBE
{
// ReSharper disable once PrivateFieldCanBeConvertedToLocalVariable
//private readonly WinEvents.WinEventDelegate _events;
//private static IntPtr _hook;

public VBE(VB.VBE target)
:base(target)
: base(target)
{
//_events = WinEventProc;
//uint proc;
//WinEvents.GetWindowThreadProcessId(new IntPtr(target.MainWindow.HWnd), out proc);
//_hook = WinEvents.SetWinEventHook((uint) WinEvents.EventConstant.EVENT_MIN,
// (uint) WinEvents.EventConstant.EVENT_MAX, IntPtr.Zero, Marshal.GetFunctionPointerForDelegate(_events), proc, 0,
// (uint) WinEvents.WinEventFlags.WINEVENT_OUTOFCONTEXT);
}

public string Version
Expand All @@ -44,7 +29,7 @@ public ICodePane ActiveCodePane
public IVBProject ActiveVBProject
{
get { return new VBProject(IsWrappingNullReference ? null : Target.ActiveVBProject); }
set { Target.ActiveVBProject = (VB.VBProject) value.Target; }
set { Target.ActiveVBProject = (VB.VBProject)value.Target; }
}

public IWindow ActiveWindow
Expand Down Expand Up @@ -101,7 +86,6 @@ public IWindows Windows

public override void Release(bool final = false)
{
//WinEvents.UnhookWinEvent(_hook);
if (!IsWrappingNullReference)
{
VBProjects.Release();
Expand Down Expand Up @@ -146,18 +130,5 @@ public static void SetSelection(IVBProject vbProject, Selection selection, strin
var pane = module.CodePane;
pane.Selection = selection;
}

//private void WinEventProc(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, uint idObject, uint idChild, uint dwEventThread, uint dwmsEventTime)
//{
////I don't care about the mouse pointer right now.
//if (idObject == (uint)WinEvents.ObjId.OBJID_CURSOR) return;

//Debug.WriteLine("Intercepted event {0} for hwnd {1:X8} ({4}), object {2}, child {3}.",
// eventType.ToEventIdString(),
// hwnd.ToInt32(),
// idObject.ToObjectIdString(),
// idChild,
// hwnd.ToClassName());
//}
}
}