Skip to content

Commit

Permalink
Large cleanup and organization in MainForm
Browse files Browse the repository at this point in the history
  • Loading branch information
FenPhoenix committed Sep 28, 2020
1 parent d9751cb commit f3a7b5c
Show file tree
Hide file tree
Showing 6 changed files with 2,277 additions and 2,264 deletions.
10 changes: 9 additions & 1 deletion AngelLoader/Forms/ControlExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Drawing;
using System;
using System.Drawing;
using System.Windows.Forms;
using AngelLoader.WinAPI;
using JetBrains.Annotations;
using static AngelLoader.WinAPI.InteropMisc;

Expand Down Expand Up @@ -145,5 +147,11 @@ internal static void RemoveAndSelectNearest(this ListBox listBox)
}

internal static bool EqualsIfNotNull(this object? sender, object? equals) => sender != null && equals != null && sender == equals;

internal static void HideFocusRectangle(this Control control) => SendMessage(
control.Handle,
WM_CHANGEUISTATE,
new IntPtr(SetControlFocusToHidden),
new IntPtr(0));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public sealed partial class DataGridViewCustom

#region FM context menu fields

#pragma warning disable IDE0069 // Disposable fields should be disposed

// These are disposed by adding them to an array and iterating through it in Dispose()
// TODO: This probably doesn't even need to happen, as they prolly get dumped with everything else on app exit

Expand Down Expand Up @@ -96,8 +94,6 @@ public sealed partial class DataGridViewCustom

private ToolStripMenuItem? WebSearchMenuItem;

#pragma warning restore IDE0069 // Disposable fields should be disposed

#endregion

#region Private methods
Expand Down
2 changes: 1 addition & 1 deletion AngelLoader/Forms/IView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace AngelLoader.Forms
{
internal interface IView : ILocalizable, IEventDisabler
internal interface IView : ILocalizable, IEventDisabler, IKeyPressDisabler, IMessageFilter
{
#region Progress box

Expand Down
Loading

0 comments on commit f3a7b5c

Please sign in to comment.