Browse Source

DllImport to LibraryImport in SharpTreeView

pull/3219/head
Christoph Wille 12 months ago
parent
commit
c269b99d67
  1. 2
      ILSpy/NativeMethods.cs
  2. 1
      SharpTreeView/ICSharpCode.TreeView.csproj
  3. 6
      SharpTreeView/SharpTreeViewTextSearch.cs

2
ILSpy/NativeMethods.cs

@ -26,7 +26,7 @@ namespace ICSharpCode.ILSpy @@ -26,7 +26,7 @@ namespace ICSharpCode.ILSpy
{
const int S_OK = 0;
[LibraryImport("dwmapi.dll", EntryPoint = "DwmSetWindowAttribute")]
[LibraryImport("dwmapi.dll")]
internal static partial int DwmSetWindowAttribute(IntPtr hwnd, DwmWindowAttribute attr, ref int attrValue, int attrSize);
public static bool UseImmersiveDarkMode(IntPtr hWnd, bool enable)

1
SharpTreeView/ICSharpCode.TreeView.csproj

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
<TargetFramework>net8.0-windows</TargetFramework>
<AssemblyOriginatorKeyFile>..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.snk</AssemblyOriginatorKeyFile>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">

6
SharpTreeView/SharpTreeViewTextSearch.cs

@ -28,10 +28,10 @@ namespace ICSharpCode.TreeView @@ -28,10 +28,10 @@ namespace ICSharpCode.TreeView
/// Custom TextSearch-implementation.
/// Fixes #67 - Moving to class member in tree view by typing in first character of member name selects parent assembly
/// </summary>
public class SharpTreeViewTextSearch : DependencyObject
public partial class SharpTreeViewTextSearch : DependencyObject
{
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
static extern int GetDoubleClickTime();
[LibraryImport("user32.dll")]
internal static partial int GetDoubleClickTime();
static readonly DependencyPropertyKey TextSearchInstancePropertyKey = DependencyProperty.RegisterAttachedReadOnly("TextSearchInstance",
typeof(SharpTreeViewTextSearch), typeof(SharpTreeViewTextSearch), new FrameworkPropertyMetadata(null));

Loading…
Cancel
Save