2 Commits
Author SHA1 Message Date
QWERTYkez 9ab17297e5 0.9.1 version debug 2026-09-28 08:23:30 +07:00
melekhin a0c759ea9d 0.9.1 mica window acrylic debug 2026-09-28 08:19:48 +07:00
2 changed files with 6 additions and 18 deletions
+4 -4
View File
@@ -22,10 +22,10 @@
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
<!-- версия и информация -->
<Version>0.9.0</Version>
<AssemblyVersion>0.9.0.0</AssemblyVersion>
<FileVersion>0.9.0.0</FileVersion>
<InformationalVersion>0.9.0</InformationalVersion>
<Version>0.9.1</Version>
<AssemblyVersion>0.9.1.0</AssemblyVersion>
<FileVersion>0.9.1.0</FileVersion>
<InformationalVersion>0.9.1</InformationalVersion>
<Product>Hearing Protector</Product>
<AssemblyTitle>Hearing Protector</AssemblyTitle>
<Company>QwertyKez</Company>
+2 -14
View File
@@ -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);
// Получаем позицию курсора
@@ -132,13 +130,3 @@ public partial class Windows10AcrylicBackdrop : SystemBackdrop
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");
}
}