Skip to content

Commit

Permalink
Fix spaces versus tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrondeau committed Aug 6, 2019
1 parent 4bdf65c commit 4c1b97b
Show file tree
Hide file tree
Showing 35 changed files with 633 additions and 633 deletions.
2 changes: 1 addition & 1 deletion GoToWindow.Api.Tests/GivenAWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class GivenAnApp : IDisposable
public static string GetResourcePath(string filename)
{
var executablePath = Path.GetDirectoryName(typeof(WindowListFactoryTests).Assembly.Location);
return executablePath != null ? Path.Combine(executablePath, filename) : null;
return executablePath != null ? Path.Combine(executablePath, filename) : null;
}

public IWindowEntry ExpectedWindow { get; }
Expand Down
4 changes: 2 additions & 2 deletions GoToWindow.Api/MouseSend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace GoToWindow.Api
{
public static class MouseSend
{
// ReSharper disable InconsistentNaming
// ReSharper disable InconsistentNaming
private const uint MOUSEEVENTF_LEFTDOWN = 0x0002;
private const uint MOUSEEVENTF_LEFTUP = 0x0004;
// ReSharper restore InconsistentNaming
// ReSharper restore InconsistentNaming

[DllImport("user32.dll")]
private static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, IntPtr dwExtraInfo);
Expand Down
30 changes: 15 additions & 15 deletions GoToWindow.Api/WindowControlMenuDisabler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@

namespace GoToWindow.Api
{
public class WindowControlMenuDisabler
{
// ReSharper disable InconsistentNaming
private const int GWL_STYLE = -16; //WPF's Message code for Title Bar's Style
private const int WS_SYSMENU = 0x80000; //WPF's Message code for System Menu
// ReSharper restore InconsistentNaming
public class WindowControlMenuDisabler
{
// ReSharper disable InconsistentNaming
private const int GWL_STYLE = -16; //WPF's Message code for Title Bar's Style
private const int WS_SYSMENU = 0x80000; //WPF's Message code for System Menu
// ReSharper restore InconsistentNaming

[DllImport("user32.dll", SetLastError = true)]
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("user32.dll")]
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
[DllImport("user32.dll", SetLastError = true)]
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("user32.dll")]
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);

public static void DisableControlMenu(IntPtr hWnd)
{
SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) & ~WS_SYSMENU);
}
}
public static void DisableControlMenu(IntPtr hWnd)
{
SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) & ~WS_SYSMENU);
}
}
}
10 changes: 5 additions & 5 deletions GoToWindow.Api/WindowEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ public class WindowEntry : IWindowEntry
{
public IntPtr HWnd { get; set; }
public uint ProcessId { get; set; }
public string Title { get; set; }
public IntPtr IconHandle { get; set; }
public bool IsVisible { get; set; }
public string ProcessName { get; set; }
public string Title { get; set; }
public IntPtr IconHandle { get; set; }
public bool IsVisible { get; set; }
public string ProcessName { get; set; }

public bool Focus()
{
Expand All @@ -31,7 +31,7 @@ public bool IsSameWindow(IWindowEntry other)

public override string ToString()
{
return $"{ProcessName} ({ProcessId}): \"{Title}\"";
return $"{ProcessName} ({ProcessId}): \"{Title}\"";
}
}
}
14 changes: 7 additions & 7 deletions GoToWindow.Api/WindowEntryFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public static class WindowEntryFactory
[DllImport("user32.dll", SetLastError = true)]
private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);

[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool IsIconic(IntPtr hWnd);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool IsIconic(IntPtr hWnd);

public static WindowEntry Create(IntPtr hWnd)
{
Expand All @@ -30,16 +30,16 @@ public static WindowEntry Create(IntPtr hWnd, uint processId)
{
var windowTitle = GetWindowTitle(hWnd);

var iconHandle = WindowIcon.GetAppIcon(hWnd);
var isVisible = !IsIconic(hWnd);
var iconHandle = WindowIcon.GetAppIcon(hWnd);
var isVisible = !IsIconic(hWnd);

return new WindowEntry
return new WindowEntry
{
HWnd = hWnd,
Title = windowTitle,
ProcessId = processId,
IconHandle = iconHandle,
IsVisible = isVisible
IsVisible = isVisible
};
}

Expand Down
Loading

0 comments on commit 4c1b97b

Please sign in to comment.