Skip to content

Commit

Permalink
[Mouse Jump] - move code shared with FancyMouse into "Common" folder (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeclayton committed May 6, 2024
1 parent 3fe78fe commit d22e07e
Show file tree
Hide file tree
Showing 52 changed files with 81 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MouseJumpUI.Helpers;
using MouseJumpUI.Common.Helpers;
using MouseJumpUI.Models.Drawing;
using MouseJumpUI.Models.Layout;
using MouseJumpUI.Models.Screen;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.UnitTests.Helpers;
namespace MouseJumpUI.UnitTests.Common.Helpers;

[TestClass]
public static class DrawingHelperTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MouseJumpUI.Helpers;
using MouseJumpUI.Common.Helpers;
using MouseJumpUI.Models.Drawing;

namespace MouseJumpUI.UnitTests.Helpers;
namespace MouseJumpUI.UnitTests.Common.Helpers;

[TestClass]
public static class MouseHelperTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using MouseJumpUI.Common.NativeMethods;
using MouseJumpUI.Models.Drawing;
using MouseJumpUI.NativeMethods;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.Helpers;
namespace MouseJumpUI.Common.Helpers;

internal static class DrawingHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using MouseJumpUI.Models.Drawing;
using MouseJumpUI.Models.Layout;

namespace MouseJumpUI.Helpers;
namespace MouseJumpUI.Common.Helpers;

internal static class LayoutHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using MouseJumpUI.Common.NativeMethods;
using MouseJumpUI.Models.Drawing;
using MouseJumpUI.NativeMethods;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.Helpers;
namespace MouseJumpUI.Common.Helpers;

internal static class MouseHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using MouseJumpUI.Common.NativeMethods;
using MouseJumpUI.Models.Drawing;
using MouseJumpUI.Models.Screen;
using MouseJumpUI.NativeMethods;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.NativeMethods.User32;
using static MouseJumpUI.Common.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.User32;

namespace MouseJumpUI.Helpers;
namespace MouseJumpUI.Common.Helpers;

internal static class ScreenHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System;
using System.Runtime.InteropServices;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System;
using System.Runtime.InteropServices;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System;
using System.Runtime.InteropServices;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace MouseJumpUI.NativeMethods;

namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Core
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Gdi32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Gdi32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Gdi32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class Gdi32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static class Libraries
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class User32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class User32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class User32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System;
using System.Runtime.InteropServices;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class User32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class User32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class User32
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System.Diagnostics.CodeAnalysis;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

[SuppressMessage("SA1310", "SA1310:FieldNamesMustNotContainUnderscore", Justification = "Names match Win32 api")]
internal static partial class User32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System.Diagnostics.CodeAnalysis;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

[SuppressMessage("SA1310", "SA1310:FieldNamesMustNotContainUnderscore", Justification = "Names match Win32 api")]
internal static partial class User32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;
using static MouseJumpUI.NativeMethods.Core;
using static MouseJumpUI.Common.NativeMethods.Core;

namespace MouseJumpUI.NativeMethods;
namespace MouseJumpUI.Common.NativeMethods;

internal static partial class User32
{
Expand Down
Loading

0 comments on commit d22e07e

Please sign in to comment.