0.9.1 mica window acrylic debug
This commit is contained in:
+2
-14
@@ -5,9 +5,7 @@ using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Windows.Graphics;
|
||||
using WinRT.Interop;
|
||||
|
||||
@@ -54,7 +52,7 @@ public static class MicaWindowExt
|
||||
{
|
||||
// Используем Acrylic на Windows 10
|
||||
//SystemBackdrop = new DesktopAcrylicBackdrop();
|
||||
window.SystemBackdrop = new Windows10AcrylicBackdrop();
|
||||
window.SystemBackdrop = new DesktopAcrylicBackdrop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +61,7 @@ public static class MicaWindowExt
|
||||
{
|
||||
// Получаем AppWindow текущего окна
|
||||
IntPtr hWnd = WindowNative.GetWindowHandle(window);
|
||||
WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);
|
||||
Microsoft.UI.WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);
|
||||
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
|
||||
|
||||
// Получаем позицию курсора
|
||||
@@ -131,14 +129,4 @@ public partial class Windows10AcrylicBackdrop : SystemBackdrop
|
||||
controller?.RemoveSystemBackdropTarget(disconnectedTarget);
|
||||
controller = default;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ReadTextExt
|
||||
{
|
||||
public static string[] FileReadAllLines(this string filePath, Encoding? enc = null)
|
||||
{
|
||||
using var reader = new StreamReader(filePath, enc ?? Encoding.GetEncoding(1251), detectEncodingFromByteOrderMarks: true);
|
||||
string content = reader.ReadToEnd().Replace("\r", "");
|
||||
return content.Split("\n");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user