Skip to content

Commit

Permalink
WatchList.Core - Fixed warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stan-Kudri committed Jul 10, 2024
1 parent 6cc53eb commit 0c07004
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion WatchList.Core/Model/SmartEnumBaseWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace WatchList.Core.Model
{
public class SmartEnumBaseWrapper<T> : Wrapper<T?>
where T : class
where T : class?
{
protected static ObservableCollection<TWrapper> GetItems<TWrapper>(IEnumerable<T?> items, Func<T?, TWrapper> factory)
where TWrapper : Wrapper<T?>
Expand Down
8 changes: 2 additions & 6 deletions WatchList.WinForms/Control/CheckComboBox/Popup.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Windows.Forms.VisualStyles;
using VS = System.Windows.Forms.VisualStyles;

Expand All @@ -9,7 +8,6 @@ namespace TestTask.Controls.CheckComboBox
/// <summary>
/// Popup.
/// </summary>
[CLSCompliant(true)]
[ToolboxItem(false)]
public partial class Popup : ToolStripDropDown
{
Expand Down Expand Up @@ -404,7 +402,6 @@ private void SetOwnerItem(Control control)
}
}

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
private bool InternalProcessResizing(ref Message m, bool contentControl = true)
{
if (m.Msg == NativeMethods.WM_NCACTIVATE && m.WParam != IntPtr.Zero && ChildPopup != null && ChildPopup.Visible)
Expand All @@ -429,12 +426,11 @@ private bool InternalProcessResizing(ref Message m, bool contentControl = true)
return false;
}

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
private bool OnGetMinMaxInfo(ref Message m)
{
NativeMethods.MINMAXINFO minmax = (NativeMethods.MINMAXINFO)Marshal.PtrToStructure(m.LParam, typeof(NativeMethods.MINMAXINFO));
minmax.maxTrackSize = this.MaxSize;
minmax.minTrackSize = this.MinSize;
minmax.maxTrackSize = MaxSize;
minmax.minTrackSize = MinSize;
Marshal.StructureToPtr(minmax, m.LParam, false);
return true;
}
Expand Down

0 comments on commit 0c07004

Please sign in to comment.