Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ab17297e5 | ||
|
|
a0c759ea9d |
@@ -22,10 +22,10 @@
|
|||||||
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
||||||
|
|
||||||
<!-- версия и информация -->
|
<!-- версия и информация -->
|
||||||
<Version>0.9.0</Version>
|
<Version>0.9.1</Version>
|
||||||
<AssemblyVersion>0.9.0.0</AssemblyVersion>
|
<AssemblyVersion>0.9.1.0</AssemblyVersion>
|
||||||
<FileVersion>0.9.0.0</FileVersion>
|
<FileVersion>0.9.1.0</FileVersion>
|
||||||
<InformationalVersion>0.9.0</InformationalVersion>
|
<InformationalVersion>0.9.1</InformationalVersion>
|
||||||
<Product>Hearing Protector</Product>
|
<Product>Hearing Protector</Product>
|
||||||
<AssemblyTitle>Hearing Protector</AssemblyTitle>
|
<AssemblyTitle>Hearing Protector</AssemblyTitle>
|
||||||
<Company>QwertyKez</Company>
|
<Company>QwertyKez</Company>
|
||||||
|
|||||||
+2
-14
@@ -5,9 +5,7 @@ using Microsoft.UI.Windowing;
|
|||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using Windows.Graphics;
|
using Windows.Graphics;
|
||||||
using WinRT.Interop;
|
using WinRT.Interop;
|
||||||
|
|
||||||
@@ -54,7 +52,7 @@ public static class MicaWindowExt
|
|||||||
{
|
{
|
||||||
// Используем Acrylic на Windows 10
|
// Используем Acrylic на Windows 10
|
||||||
//SystemBackdrop = new DesktopAcrylicBackdrop();
|
//SystemBackdrop = new DesktopAcrylicBackdrop();
|
||||||
window.SystemBackdrop = new Windows10AcrylicBackdrop();
|
window.SystemBackdrop = new DesktopAcrylicBackdrop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +61,7 @@ public static class MicaWindowExt
|
|||||||
{
|
{
|
||||||
// Получаем AppWindow текущего окна
|
// Получаем AppWindow текущего окна
|
||||||
IntPtr hWnd = WindowNative.GetWindowHandle(window);
|
IntPtr hWnd = WindowNative.GetWindowHandle(window);
|
||||||
WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);
|
Microsoft.UI.WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);
|
||||||
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
|
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
|
||||||
|
|
||||||
// Получаем позицию курсора
|
// Получаем позицию курсора
|
||||||
@@ -131,14 +129,4 @@ public partial class Windows10AcrylicBackdrop : SystemBackdrop
|
|||||||
controller?.RemoveSystemBackdropTarget(disconnectedTarget);
|
controller?.RemoveSystemBackdropTarget(disconnectedTarget);
|
||||||
controller = default;
|
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