Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
debug v 5.2.6 & upd/re notification manager
Greedeksc082782d947e
diff --git a/.Source/GTweak/GTweak.csproj b/.Source/GTweak/GTweak.csprojindex e19493a5..729064f2 100644--- a/.Source/GTweak/GTweak.csproj+++ b/.Source/GTweak/GTweak.csproj@@ -282,12 +282,11 @@<Compile Include="Utilities\Helpers\RegistryHelp.cs" /><Compile Include="Utilities\Controls\SettingsRepository.cs" /><Compile Include="Utilities\Helpers\TakingOwnership.cs" />- <Compile Include="Utilities\Helpers\Storage\NotifActionsStorage.cs" /><Compile Include="Utilities\Tweaks\ClearingMemory.cs" /><Compile Include="Utilities\Helpers\Managers\INIManager.cs" /><Compile Include="Utilities\Configuration\MonitoringSystem.cs" /><Compile Include="Utilities\Configuration\SystemDiagnostics.cs" />- <Compile Include="Utilities\Controls\ViewNotification.cs" />+ <Compile Include="Utilities\Helpers\Managers\NotificationManager.cs" /><Compile Include="Utilities\Helpers\TrustedInstaller.cs" /><Compile Include="Utilities\Tweaks\ConfidentialityTweaks.cs" /><Compile Include="Utilities\Tweaks\DefenderManager\BackupRights.cs" />diff --git a/.Source/GTweak/Languages/en/Localize.xaml b/.Source/GTweak/Languages/en/Localize.xamlindex 5c0af56b..a2357c65 100644--- a/.Source/GTweak/Languages/en/Localize.xaml+++ b/.Source/GTweak/Languages/en/Localize.xaml@@ -225,8 +225,8 @@<v:String x:Key="TglButton23_description_interface">By default, Windows uses the collected information to target ads, i.e. to display ads that match your interests. And literally, this advertisement is located wherever free space is available for display. If you don't want Windows to display personalized ads in all Store apps, Explorer, Options, and the Start menu, then you can disable this junk.</v:String><v:String x:Key="TglButton24_description_interface">By default, Windows does not save the positions of windows, as well as their state when turned off. This tweak will allow you to remember the type of open folders in order to restore them after Logging out, Rebooting and Shutting down.</v:String><v:String x:Key="TglButton25_description_interface">The tweak allows you to disable all Windows notifications with tips and suggestions, as well as disable Second Chance Out of Box Experience (SCOOBE) for Windows 11 users. SCOOBE is an unexpectedly appearing window with an offer to urgently complete device configuration and log in to your Microsoft account.</v:String>- <v:String x:Key="TglButton26_description_interface">Tweak will hide folders from «This PC»: Desktop, Videos, Documents, Downloads, Images, Music.</v:String>- <v:String x:Key="TglButton27_description_interface">Removes the 3D Objects item from the Explorer Overview in the left menu list (from the Explorer list tree).</v:String>+ <v:String x:Key="TglButton26_description_interface">Tweak will hide folders from «This PC»: Desktop, Videos, Documents, Downloads, Images, Music. Attention the screen may blink.</v:String>+ <v:String x:Key="TglButton27_description_interface">Removes the 3D Objects item from the Explorer Overview in the left menu list (from the Explorer list tree). Attention the screen may blink.</v:String><v:String x:Key="TglButton28_description_interface">By default, when you set a jpeg image as your desktop wallpaper, Windows automatically reduces its quality to 85%. This tweak will set the jpeg wallpaper quality to 100%.</v:String><v:String x:Key="TglButton29_description_interface">Tweak will disable tooltips for desktop elements when hovering the mouse cursor.</v:String><v:String x:Key="TglButton30_description_interface">By default, Windows sends everything you search for in the «Start» menu to its servers to provide you with Bing search results. If you don't need Bing integration in the «Start» menu, you can apply a tweak to disable web search. Attention the screen may blink.</v:String>diff --git a/.Source/GTweak/Languages/fr/Localize.xaml b/.Source/GTweak/Languages/fr/Localize.xamlindex b60d8092..01d29a27 100644--- a/.Source/GTweak/Languages/fr/Localize.xaml+++ b/.Source/GTweak/Languages/fr/Localize.xaml@@ -227,8 +227,8 @@<v:String x:Key="TglButton23_description_interface">Windows utilise par défaut les infos collectées pour cibler les publicités, affichées partout où il y a de la place. Désactive cette publicité personnalisée dans les applications Store, Explorateur, Options et menu Démarrer.</v:String><v:String x:Key="TglButton24_description_interface">Windows ne sauvegarde pas par défaut la position et l’état des fenêtres à l’arrêt. Ce tweak permet de restaurer les dossiers ouverts après déconnexion, redémarrage et extinction.</v:String><v:String x:Key="TglButton25_description_interface">Désactive toutes les notifications Windows avec astuces et suggestions, ainsi que le SCOOBE (Second Chance Out of Box Experience) pour Windows 11, qui propose de finir la configuration du périphérique.</v:String>- <v:String x:Key="TglButton26_description_interface">Cache les dossiers du menu « Ce PC » : Bureau, Vidéos, Documents, Téléchargements, Images, Musique.</v:String>- <v:String x:Key="TglButton27_description_interface">Supprime l’élément « Objets 3D » dans la liste de gauche de l’explorateur.</v:String>+ <v:String x:Key="TglButton26_description_interface">Cache les dossiers du menu « Ce PC » : Bureau, Vidéos, Documents, Téléchargements, Images, Musique. Attention, l’écran peut clignoter.</v:String>+ <v:String x:Key="TglButton27_description_interface">Supprime l’élément « Objets 3D » dans la liste de gauche de l’explorateur. Attention, l’écran peut clignoter.</v:String><v:String x:Key="TglButton28_description_interface">Par défaut, Windows réduit la qualité des fonds d’écran JPEG à 85 %. Ce tweak fixe la qualité à 100 %.</v:String><v:String x:Key="TglButton29_description_interface">Désactive les infobulles pour les éléments du bureau au survol du curseur.</v:String><v:String x:Key="TglButton30_description_interface">Windows envoie par défaut toutes vos recherches dans le menu Démarrer à ses serveurs pour Bing. Ce tweak désactive la recherche web. Attention, l’écran peut clignoter.</v:String>diff --git a/.Source/GTweak/Languages/it/Localize.xaml b/.Source/GTweak/Languages/it/Localize.xamlindex 7753bd71..fb9be514 100644--- a/.Source/GTweak/Languages/it/Localize.xaml+++ b/.Source/GTweak/Languages/it/Localize.xaml@@ -225,8 +225,8 @@<v:String x:Key="TglButton23_description_interface">Disattiva la pubblicità personalizzata che Windows mostra in varie aree come App Store, Esplora risorse e menu Start.</v:String><v:String x:Key="TglButton24_description_interface">Abilita il ripristino delle cartelle aperte e del loro stato dopo disconnessione, riavvio o spegnimento.</v:String><v:String x:Key="TglButton25_description_interface">Disattiva tutte le notifiche di consigli di Windows e la finestra SCOOBE (Seconda possibilità di configurazione) su Windows 11.</v:String>- <v:String x:Key="TglButton26_description_interface">Nasconde le cartelle Desktop, Video, Documenti, Download, Immagini e Musica dalla sezione «Questo PC».</v:String>- <v:String x:Key="TglButton27_description_interface">Rimuove la voce «Oggetti 3D» dal pannello laterale di Esplora risorse.</v:String>+ <v:String x:Key="TglButton26_description_interface">Nasconde le cartelle Desktop, Video, Documenti, Download, Immagini e Musica dalla sezione «Questo PC». Attenzione: lo schermo potrebbe lampeggiare.</v:String>+ <v:String x:Key="TglButton27_description_interface">Rimuove la voce «Oggetti 3D» dal pannello laterale di Esplora risorse. Attenzione: lo schermo potrebbe lampeggiare.</v:String><v:String x:Key="TglButton28_description_interface">Imposta la qualità dello sfondo in formato JPEG al 100%, evitando la compressione predefinita all’85%.</v:String><v:String x:Key="TglButton29_description_interface">Disattiva le descrizioni comandi (tooltip) per gli elementi sul desktop quando ci si passa sopra con il mouse.</v:String><v:String x:Key="TglButton30_description_interface">Disattiva l’invio delle ricerche effettuate nel menu Start ai server Microsoft per la ricerca Bing. Attenzione: lo schermo potrebbe lampeggiare.</v:String>diff --git a/.Source/GTweak/Languages/ko/Localize.xaml b/.Source/GTweak/Languages/ko/Localize.xamlindex 01a1eb36..aad2231d 100644--- a/.Source/GTweak/Languages/ko/Localize.xaml+++ b/.Source/GTweak/Languages/ko/Localize.xaml@@ -225,13 +225,13 @@<v:String x:Key="TglButton23_description_interface">기본적으로 Windows는 수집된 정보를 사용하여 광고를 타겟팅, 즉 사용자의 관심사와 일치하는 광고를 표시합니다. 그리고 말 그대로 이 광고는 표시할 수 있는 여유 공간이 있는 곳이면 어디든 배치됩니다. 모든 스토어 앱, 탐색기, 옵션 및 시작 메뉴에 개인 맞춤 광고를 표시하지 않으려면 이 정크를 비활성화하면 됩니다.</v:String><v:String x:Key="TglButton24_description_interface">기본적으로 Windows는 창이 꺼져 있을 때의 위치와 상태를 저장하지 않습니다. 이 수정을 통해 로그아웃, 재부팅 및 종료 후에 열린 폴더 유형을 기억하여 복원할 수 있습니다.</v:String><v:String x:Key="TglButton25_description_interface">이 조정을 통해 팁과 제안이 포함된 모든 Windows 알림을 비활성화할 수 있을 뿐만 아니라 Windows 11 사용자를 위한 두 번째 기회 즉시 사용 환경 (SCOOBE)을 비활성화할 수 있습니다. SCOOBE는 장치 구성을 긴급하게 완료하고 Microsoft 계정에 로그인하라는 제안과 함께 예기치 않게 표시되는 창입니다.</v:String>- <v:String x:Key="TglButton26_description_interface">조정을 통해 «내 PC»에서 폴더를 숨길 수 있습니다: 바탕화면, 동영상, 문서, 다운로드, 이미지, 음악.</v:String>- <v:String x:Key="TglButton27_description_interface">왼쪽 메뉴 목록의 탐색기 요약에서 3D 개체 항목을 제거합니다 (탐색기 목록 트리에서).</v:String>+ <v:String x:Key="TglButton26_description_interface">조정을 통해 «내 PC»에서 폴더를 숨길 수 있습니다: 바탕화면, 동영상, 문서, 다운로드, 이미지, 음악. 화면이 깜박일 수 있으니 주의하세요.</v:String>+ <v:String x:Key="TglButton27_description_interface">왼쪽 메뉴 목록의 탐색기 요약에서 3D 개체 항목을 제거합니다 (탐색기 목록 트리에서). 화면이 깜박일 수 있으니 주의하세요.</v:String><v:String x:Key="TglButton28_description_interface">기본적으로 jpeg 이미지를 바탕 화면 배경 화면으로 설정하면 Windows는 자동으로 품질을 85%로 낮춥니다. 이 조정은 jpeg 배경화면 품질을 100%로 설정합니다.</v:String><v:String x:Key="TglButton29_description_interface">조정은 마우스 커서를 마우스오버할 때 바탕화면 요소의 도구 설명을 비활성화합니다.</v:String><v:String x:Key="TglButton30_description_interface">기본적으로 Windows는 «시작» 메뉴에서 검색하는 모든 내용을 서버로 전송하여 Bing 검색 결과를 제공합니다. «시작» 메뉴에서 Bing 통합이 필요하지 않은 경우 웹 검색을 비활성화하도록 조정할 수 있습니다. 화면이 깜박일 수 있으니 주의하세요.</v:String><v:String x:Key="TglButton31_description_interface">기본적으로 탐색기를 열면 첫 번째 탭은 «빠른 액세스»입니다. 그리고 디스크를 열려면 불필요한 이동을 해야 합니다. 이 조정을 통해 디스크를 열면 '빠른 액세스'가 아닌 «내 PC»가 열리게 됩니다.</v:String>- <v:String x:Key="TglButton32_description_interface">기본적으로 Windows는 파일 확장자를 숨기므로 파일 탐색기 보기가 덜 복잡해집니다. 필요한 경우 이 조정을 사용하여 파일 확장자를 표시할 수 있으므로 검색하는 데 걸리는 시간을 절약할 수 있습니다. 화면이 깜빡일 수 있으니 주의하세요.</v:String>+ <v:String x:Key="TglButton32_description_interface">기본적으로 Windows는 파일 확장자를 숨기므로 파일 탐색기 보기가 덜 복잡해집니다. 필요한 경우 이 조정을 사용하여 파일 확장자를 표시할 수 있으므로 검색하는 데 걸리는 시간을 절약할 수 있습니다. 화면이 깜박일 수 있으니 주의하세요.</v:String><!--#endregion--><!--#region Applications Page -->diff --git a/.Source/GTweak/Languages/ru/Localize.xaml b/.Source/GTweak/Languages/ru/Localize.xamlindex 849fa953..a5207f7e 100644--- a/.Source/GTweak/Languages/ru/Localize.xaml+++ b/.Source/GTweak/Languages/ru/Localize.xaml@@ -225,8 +225,8 @@<v:String x:Key="TglButton23_description_interface">По умолчанию Windows использует собранную информацию для таргетинга рекламы, т. е. для показа рекламы, соответствующей вашим интересам. И буквально эта реклама размещена везде, где доступно свободное пространство для показа. Если вы не хотите, чтобы Windows отображала персонализированную рекламу во всех приложениях Магазина, Проводнике, Параметрах и меню Пуск, то вы можете отключить этот хлам.</v:String><v:String x:Key="TglButton24_description_interface">По умолчанию, Windows не сохраняет позиции окон, как и их состояние при Выключении. Этот твик позволит запомнить вид открытых папок, чтобы восстановить их после Выхода, Перезагрузки и Выключения.</v:String><v:String x:Key="TglButton25_description_interface">Твик позволяет отключить все уведомления Windows с советами и предложениями, а так же отключить Second Chance Out of Box Experience (SCOOBE) для пользователей Windows 11. SCOOBE - неожиданно появляющееся окно с предложением срочно завершить настройку устройства и войти в учётную запись Microsoft.</v:String>- <v:String x:Key="TglButton26_description_interface">Твик скроет из «Этот компьютер» папки: Рабочий стол, Видео, Документы, Загрузки, Изображения, Музыка.</v:String>- <v:String x:Key="TglButton27_description_interface">Уберёт из Обзора Проводника в левом списке меню (из дерева списка проводника) пункт 3D Objects (Объёмные объекты).</v:String>+ <v:String x:Key="TglButton26_description_interface">Твик скроет из «Этот компьютер» папки: Рабочий стол, Видео, Документы, Загрузки, Изображения, Музыка. Внимание может моргать экран.</v:String>+ <v:String x:Key="TglButton27_description_interface">Уберёт из Обзора Проводника в левом списке меню (из дерева списка проводника) пункт 3D Objects (Объёмные объекты). Внимание может моргать экран.</v:String><v:String x:Key="TglButton28_description_interface">По умолчанию, при установке jpeg изображения в качестве обоев рабочего стола, Windows автоматически уменьшает его качество до 85%. Данный твик выставит качество обоев jpeg на 100%.</v:String><v:String x:Key="TglButton29_description_interface">Твик отключит всплывающие подсказки для элементов рабочего стола при наведении курсора мыши.</v:String><v:String x:Key="TglButton30_description_interface">По умолчанию Windows отправляет всё, что вы ищете в меню «Пуск», на свои серверы, чтобы предоставить вам результаты поиска в Bing. Если вам не нужна интеграция с Bing в меню «Пуск», вы можете применить твик, чтобы отключить веб-поиск. Внимание может моргать экран.</v:String>diff --git a/.Source/GTweak/Languages/uk/Localize.xaml b/.Source/GTweak/Languages/uk/Localize.xamlindex c538e879..d3ff90e9 100644--- a/.Source/GTweak/Languages/uk/Localize.xaml+++ b/.Source/GTweak/Languages/uk/Localize.xaml@@ -225,8 +225,8 @@<v:String x:Key="TglButton23_description_interface">Як усталено, Windows використовує зібрану інформацію для цільової реклами - реклами, що відповідає вашим інтересам. Практично ця реклама розміщуватиметься там, де є вільне місце для відображення. Якщо ви не хочете, щоб Windows відображала персоналізовану рекламу у всіх додатках Магазину, в Провіднику, в Налаштуваннях та меню «Пуск», можете вимкнути це сміття.</v:String><v:String x:Key="TglButton24_description_interface">Як усталено, Windows не зберігає позиції вікон та їх стан після вимкнення комп'ютера. Це налаштування дозволить запам'ятати вигляд відкритих папок, щоб відновлювати його виходу з системи, перезавантаження та вимкнення комп'ютера.</v:String><v:String x:Key="TglButton25_description_interface">Це налаштування дозволяє вимкнути всі сповіщення Windows з порадами та пропозиціями, а також вимкнути Second Chance Out of Box Experience (SCOOBE) у Windows 11. SCOOBE - несподівана поява вікна з пропозицією терміново завершити налаштування системи та увійти в обліковий запис Microsoft.</v:String>- <v:String x:Key="TglButton26_description_interface">Це налаштування дозволяє приховати у вікні «Цей ПК» наступні папки: Робочий стіл, Відео, Документи, Завантаження, Зображення, Музика.</v:String>- <v:String x:Key="TglButton27_description_interface">Це налаштування видаляє елемент 3D Objects з області переходів провідника (деревоподібний список в лівій частині вікна).</v:String>+ <v:String x:Key="TglButton26_description_interface">Це налаштування дозволяє приховати у вікні «Цей ПК» наступні папки: Робочий стіл, Відео, Документи, Завантаження, Зображення, Музика. Увага, екран може мерехтіти.</v:String>+ <v:String x:Key="TglButton27_description_interface">Це налаштування видаляє елемент 3D Objects з області переходів провідника (деревоподібний список в лівій частині вікна). Увага, екран може мерехтіти.</v:String><v:String x:Key="TglButton28_description_interface">Як усталено, Windows знижує якість зображень шпалер робочого столу в форматі JPEG до 85%. Це налаштування встановлює для шпалер в форматі JPEG якість 100%.</v:String><v:String x:Key="TglButton29_description_interface">Це налаштування вимикає спливні підказки для елементів Робочого столу під час наведення на них вказівника миші.</v:String><v:String x:Key="TglButton30_description_interface">Як усталено, Windows надсилає все, що ви шукаєте у меню «Пуск», на свої сервери, щоб надавати вам результати пошуку в Bing. Якщо вам не потрібна інтеграція з Bing у меню «Пуск», застосуйте це налаштування, щоб вимкнути пошук у веб. Увага, екран може мерехтіти.</v:String>diff --git a/.Source/GTweak/Properties/AssemblyInfo.cs b/.Source/GTweak/Properties/AssemblyInfo.csindex 3ba0c00e..c50d6b4b 100644--- a/.Source/GTweak/Properties/AssemblyInfo.cs+++ b/.Source/GTweak/Properties/AssemblyInfo.cs@@ -7,9 +7,9 @@ using System.Windows;[assembly: AssemblyProduct("GTweak")][assembly: AssemblyCopyright("© 2024-2025 Greedeks")][assembly: AssemblyTrademark("Greedeks")]-[assembly: AssemblyInformationalVersion("Build: 5.2.5")]-[assembly: AssemblyVersion("5.2.46.2")]-[assembly: AssemblyFileVersion("5.2.46.2")]+[assembly: AssemblyInformationalVersion("Build: 5.2.6")]+[assembly: AssemblyVersion("5.2.27.327")]+[assembly: AssemblyFileVersion("5.2.27.327")][assembly: ComVisible(false)]diff --git a/.Source/GTweak/Properties/AssemblyInfo.tt b/.Source/GTweak/Properties/AssemblyInfo.ttindex dc1ff0a7..1bf4fb0a 100644--- a/.Source/GTweak/Properties/AssemblyInfo.tt+++ b/.Source/GTweak/Properties/AssemblyInfo.tt@@ -20,7 +20,7 @@ using System.Windows;ResourceDictionaryLocation.SourceAssembly)]<#+- private const string majorVersion = "Build: 5.2.5";+ private const string majorVersion = "Build: 5.2.6";private string GenerateVersion(){diff --git a/.Source/GTweak/Utilities/Controls/SettingsRepository.cs b/.Source/GTweak/Utilities/Controls/SettingsRepository.csindex 45ac5b20..873929b6 100644--- a/.Source/GTweak/Utilities/Controls/SettingsRepository.cs+++ b/.Source/GTweak/Utilities/Controls/SettingsRepository.cs@@ -95,7 +95,7 @@ namespace GTweak.Utilities.Controlsinternal static void SaveFileConfig(){if (INIManager.IsAllTempDictionaryEmpty)- new ViewNotification().Show("", "info", "export_warning_notification");+ new NotificationManager().Show("", "info", "export_warning_notification");else{VistaSaveFileDialog vistaSaveFileDialog = new VistaSaveFileDialog@@ -146,10 +146,10 @@ namespace GTweak.Utilities.Controlsif (File.ReadLines(StoragePaths.Config).Any(line => line.Contains("TglButton")) || File.ReadLines(StoragePaths.Config).Any(line => line.Contains("Slider")))new ImportWindow(Path.GetFileName(vistaOpenFileDialog.FileName)).ShowDialog();else- new ViewNotification().Show("", "info", "empty_import_notification");+ new NotificationManager().Show("", "info", "empty_import_notification");}else- new ViewNotification().Show("", "info", "warn_import_notification");+ new NotificationManager().Show("", "info", "warn_import_notification");}internal static void SelfRemoval()diff --git a/.Source/GTweak/Utilities/Controls/ViewNotification.cs b/.Source/GTweak/Utilities/Controls/ViewNotification.csdeleted file mode 100644index c693225c..00000000--- a/.Source/GTweak/Utilities/Controls/ViewNotification.cs+++ /dev/null@@ -1,41 +0,0 @@-using GTweak.Windows;-using System.Threading.Tasks;-using System.Windows;--namespace GTweak.Utilities.Controls-{- internal sealed class ViewNotification- {- private static bool _isAlreadyLaunch = false;- private readonly int _msec = default;-- internal ViewNotification(int delay = 100) => _msec = delay;-- internal async void Show(string action, string tittle = "", string content = "")- {- if (SettingsRepository.IsViewNotification && !_isAlreadyLaunch)- {- await Application.Current.Dispatcher.InvokeAsync(async delegate- {- _isAlreadyLaunch = true;-- NotificationWindow notificationWindow = new NotificationWindow- {- TitleNotice = tittle switch- {- "warn" => (string)Application.Current.Resources["title_warn_notification"],- "info" => (string)Application.Current.Resources["title_info_notification"],- _ => string.Empty,- },- TextNotice = (string)Application.Current.Resources[content],- ActionNotice = action,- };-- await Task.Delay(_msec);- notificationWindow.Show();- notificationWindow.Closed += delegate { _isAlreadyLaunch = false; };- });- }- }- }-}diff --git a/.Source/GTweak/Utilities/Helpers/Managers/ExplorerManager.cs b/.Source/GTweak/Utilities/Helpers/Managers/ExplorerManager.csindex 638590c5..9003b19e 100644--- a/.Source/GTweak/Utilities/Helpers/Managers/ExplorerManager.cs+++ b/.Source/GTweak/Utilities/Helpers/Managers/ExplorerManager.cs@@ -9,8 +9,6 @@ namespace GTweak.Utilities.Helpers.Managers{internal class ExplorerManager{- protected ExplorerManager() { }-internal static readonly Dictionary<string, bool> InterfBtnMapping = new[]{new { Button = "TglButton7", NeedRestart = true },@@ -19,6 +17,8 @@ namespace GTweak.Utilities.Helpers.Managersnew { Button = "TglButton17", NeedRestart = true },new { Button = "TglButton21", NeedRestart = true },new { Button = "TglButton22", NeedRestart = true },+ new { Button = "TglButton26", NeedRestart = true },+ new { Button = "TglButton27", NeedRestart = true },new { Button = "TglButton30", NeedRestart = true },new { Button = "TglButton32", NeedRestart = true },}.ToDictionary(x => x.Button, x => x.NeedRestart);diff --git a/.Source/GTweak/Utilities/Helpers/Managers/NotificationManager.cs b/.Source/GTweak/Utilities/Helpers/Managers/NotificationManager.csnew file mode 100644index 00000000..b1ad2198--- /dev/null+++ b/.Source/GTweak/Utilities/Helpers/Managers/NotificationManager.cs@@ -0,0 +1,92 @@+using GTweak.Utilities.Controls;+using GTweak.Windows;+using System.Collections.Generic;+using System.Linq;+using System.Threading.Tasks;+using System.Windows;++namespace GTweak.Utilities.Helpers.Managers+{+ internal sealed class NotificationManager+ {+ internal static readonly Dictionary<string, string> ConfActions = new[]+ {+ new { Button = "TglButton8", Action = "restart" },+ new { Button = "TglButton15", Action = "restart" }+ }.ToDictionary(x => x.Button, x => x.Action);++ internal static readonly Dictionary<string, string> IntfActions = new[]+ {+ new { Button = "TglButton1", Action = "logout" },+ new { Button = "TglButton2", Action = "logout" },+ new { Button = "TglButton3", Action = "logout" },+ new { Button = "TglButton4", Action = "logout" },+ new { Button = "TglButton5", Action = "logout" },+ new { Button = "TglButton10", Action = "logout" },+ new { Button = "TglButton11", Action = "logout" },+ new { Button = "TglButton12", Action = "logout" },+ new { Button = "TglButton22", Action = "restart" },+ new { Button = "TglButton20", Action = "restart" }+ }.ToDictionary(x => x.Button, x => x.Action);++ internal static readonly Dictionary<string, string> SysActions = new[]+ {+ new { Button = "TglButton2", Action = "logout" },+ new { Button = "TglButton7", Action = "restart" },+ new { Button = "TglButton9", Action = "restart" },+ new { Button = "TglButton10", Action = "restart" },+ new { Button = "TglButton12", Action = "restart" },+ new { Button = "TglButton13", Action = "restart" },+ new { Button = "TglButton14", Action = "restart" },+ new { Button = "TglButton15", Action = "restart" },+ new { Button = "TglButton20", Action = "restart" },+ new { Button = "TglButton23", Action = "restart" }+ }.ToDictionary(x => x.Button, x => x.Action);++ private readonly int _delayMs;+ private static bool _isNotificationOpen = false;++ internal NotificationManager(int delayMs = 100) => _delayMs = delayMs;++ internal async void Show(string action, string titleKey = "", string textKey = "")+ {+ if (SettingsRepository.IsViewNotification && !_isNotificationOpen)+ {+ await Application.Current.Dispatcher.InvokeAsync(async () =>+ {+ _isNotificationOpen = true;++ NotificationWindow window = new NotificationWindow+ {+ ActionNotice = action,+ TitleNotice = (string)Application.Current.TryFindResource($"title_{titleKey}_notification") ?? string.Empty,+ TextNotice = (string)Application.Current.TryFindResource(textKey) ?? string.Empty,+ };++ switch (window.ActionNotice)+ {+ case "logout":+ if (string.IsNullOrWhiteSpace(window.TitleNotice) || string.IsNullOrWhiteSpace(window.TextNotice))+ {+ window.TitleNotice = (string)Application.Current.Resources["title_warn_notification"];+ window.TextNotice = (string)Application.Current.Resources["logout_notification"];+ }+ break;+ case "restart":+ if (string.IsNullOrWhiteSpace(window.TitleNotice) || string.IsNullOrWhiteSpace(window.TextNotice))+ {+ window.TitleNotice = (string)Application.Current.Resources["title_warn_notification"];+ window.TextNotice = (string)Application.Current.Resources["restart_notification"];+ }+ break;+ }++ window.Closed += (s, e) => { _isNotificationOpen = false; };++ await Task.Delay(_delayMs).ContinueWith(_ => window.Show(), TaskScheduler.FromCurrentSynchronizationContext());+ });++ }+ }+ }+}diff --git a/.Source/GTweak/Utilities/Helpers/Storage/NotifActionsStorage.cs b/.Source/GTweak/Utilities/Helpers/Storage/NotifActionsStorage.csdeleted file mode 100644index b7cbe30e..00000000--- a/.Source/GTweak/Utilities/Helpers/Storage/NotifActionsStorage.cs+++ /dev/null@@ -1,44 +0,0 @@-using System.Collections.Generic;-using System.Linq;--namespace GTweak.Utilities.Helpers.Storage-{- internal static class NotifActionsStorage- {- internal static readonly Dictionary<string, string> ConfNotifActions = new[]- {- new { Button = "TglButton8", Action = "restart" },- new { Button = "TglButton15", Action = "restart" }- }.ToDictionary(x => x.Button, x => x.Action);-- internal static readonly Dictionary<string, string> IntfNotifActions = new[]- {- new { Button = "TglButton1", Action = "logout" },- new { Button = "TglButton2", Action = "logout" },- new { Button = "TglButton3", Action = "logout" },- new { Button = "TglButton4", Action = "logout" },- new { Button = "TglButton5", Action = "logout" },- new { Button = "TglButton10", Action = "logout" },- new { Button = "TglButton11", Action = "logout" },- new { Button = "TglButton12", Action = "logout" },- new { Button = "TglButton26", Action = "logout" },- new { Button = "TglButton27", Action = "logout" },- new { Button = "TglButton22", Action = "restart" },- new { Button = "TglButton20", Action = "restart" }- }.ToDictionary(x => x.Button, x => x.Action);-- internal static readonly Dictionary<string, string> SysNotifActions = new[]- {- new { Button = "TglButton2", Action = "logout" },- new { Button = "TglButton7", Action = "restart" },- new { Button = "TglButton9", Action = "restart" },- new { Button = "TglButton10", Action = "restart" },- new { Button = "TglButton12", Action = "restart" },- new { Button = "TglButton13", Action = "restart" },- new { Button = "TglButton14", Action = "restart" },- new { Button = "TglButton15", Action = "restart" },- new { Button = "TglButton20", Action = "restart" },- new { Button = "TglButton23", Action = "restart" }- }.ToDictionary(x => x.Button, x => x.Action);- }-}diff --git a/.Source/GTweak/Utilities/Tweaks/Firewall.cs b/.Source/GTweak/Utilities/Tweaks/Firewall.csindex 386e5615..a9968eae 100644--- a/.Source/GTweak/Utilities/Tweaks/Firewall.cs+++ b/.Source/GTweak/Utilities/Tweaks/Firewall.cs@@ -67,7 +67,7 @@ namespace GTweak.Utilities.TweaksChangeRules(isDisabled, executableFiles.Item1, executableFiles.Item2, NET_FW_RULE_DIRECTION_.NET_FW_RULE_DIR_OUT);});}- catch { new ViewNotification().Show("", "warn", "warn_firewall_notification"); }+ catch { new NotificationManager().Show("", "warn", "warn_firewall_notification"); }}@@ -98,7 +98,7 @@ namespace GTweak.Utilities.Tweaksprotected static void BlockSpyDomain(in bool isDisabled){try { RulesHosts(isDisabled); }- catch { new ViewNotification().Show("", "warn", "warn_firewall_notification"); }+ catch { new NotificationManager().Show("", "warn", "warn_firewall_notification"); }}private static void RulesHosts(in bool isDisabled)diff --git a/.Source/GTweak/Utilities/Tweaks/SystemMaintenance.cs b/.Source/GTweak/Utilities/Tweaks/SystemMaintenance.csindex 35d3e20e..af17a3c2 100644--- a/.Source/GTweak/Utilities/Tweaks/SystemMaintenance.cs+++ b/.Source/GTweak/Utilities/Tweaks/SystemMaintenance.cs@@ -33,10 +33,10 @@ namespace GTweak.Utilities.TweaksRegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\services\defragsvc", "Start", 2, RegistryValueKind.DWord);RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction", "Enable", "Y", RegistryValueKind.String);- new ViewNotification(300).Show("", "info", "success_defrag_on_notification");+ new NotificationManager(300).Show("", "info", "success_defrag_on_notification");}else- new ViewNotification().Show("", "info", "warn_defrag_on_notification");+ new NotificationManager().Show("", "info", "warn_defrag_on_notification");}else{@@ -46,13 +46,13 @@ namespace GTweak.Utilities.TweaksRegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\services\defragsvc", "Start", 4, RegistryValueKind.DWord);RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction", "Enable", "N", RegistryValueKind.String);- new ViewNotification(300).Show("", "info", "success_defrag_off_notification");+ new NotificationManager(300).Show("", "info", "success_defrag_off_notification");}else- new ViewNotification().Show("", "info", "warn_defrag_off_notification");+ new NotificationManager().Show("", "info", "warn_defrag_off_notification");}}- catch { new ViewNotification().Show("", "warn", "error_defrag_notification"); }+ catch { new NotificationManager().Show("", "warn", "error_defrag_notification"); }}@@ -80,9 +80,9 @@ namespace GTweak.Utilities.Tweaks_outParams = _restorePoint.InvokeMethod("CreateRestorePoint", _inParams, null);if ((uint)_outParams["ReturnValue"] == 0)- new ViewNotification(300).Show("", "info", "success_point_notification");+ new NotificationManager(300).Show("", "info", "success_point_notification");else- new ViewNotification(300).Show("", "warn", "error_point_notification");+ new NotificationManager(300).Show("", "warn", "error_point_notification");_isWorkingCreatePoint = false;RegistryHelp.DeleteValue(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore", "SystemRestorePointCreationFrequency");@@ -90,7 +90,7 @@ namespace GTweak.Utilities.Tweakscatch{_isWorkingCreatePoint = false;- new ViewNotification().Show("", "warn", "error_point_notification");+ new NotificationManager().Show("", "warn", "error_point_notification");}}@@ -101,7 +101,7 @@ namespace GTweak.Utilities.TweaksEnableRecovery();CommandExecutor.RunCommand("/c rstrui.exe");}- catch { new ViewNotification().Show("", "warn", "error_recovery_notification"); }+ catch { new NotificationManager().Show("", "warn", "error_recovery_notification"); }}internal static void DisableRestorePoint()@@ -120,7 +120,7 @@ namespace GTweak.Utilities.TweaksDisableSR(StoragePaths.SystemDisk + @"\\");}else- new ViewNotification().Show("", "info", "warn_recovery_notification");+ new NotificationManager().Show("", "info", "warn_recovery_notification");}private static void EnableRecovery()diff --git a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.csindex ae8ca4e6..4ea7b175 100644--- a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs+++ b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs@@ -271,7 +271,7 @@ namespace GTweak.Utilities.TweakselseWindowsDefender.Activate();});- await backgroundQueue.QueueTask(delegate { isTweakWorkingAntivirus = false; new ViewNotification(300).Show("restart"); });+ await backgroundQueue.QueueTask(delegate { isTweakWorkingAntivirus = false; new NotificationManager(300).Show("restart"); });waitingWindow.Close();}BlockWDefender(isDisabled);diff --git a/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs b/.Source/GTweak/Utilities/Tweaks/WindowsLicense.csindex dafb7540..fb7fcb68 100644--- a/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs+++ b/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs@@ -1,6 +1,7 @@using GTweak.Utilities.Configuration;using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;+using GTweak.Utilities.Helpers.Managers;using GTweak.Utilities.Helpers.Storage;using GTweak.Windows;using Microsoft.Win32;@@ -37,11 +38,11 @@ namespace GTweak.Utilities.Tweaksif (string.IsNullOrEmpty(keyWinHWID) && string.IsNullOrEmpty(keyWinKMS)){- new ViewNotification(300).Show("", "warn", "keynotfound_notification");+ new NotificationManager(300).Show("", "warn", "keynotfound_notification");return;}- new ViewNotification().Show("", "warn", "win_activate_notification");+ new NotificationManager().Show("", "warn", "win_activate_notification");WaitingWindow waitingWindow = new WaitingWindow();waitingWindow.Show();@@ -81,7 +82,7 @@ namespace GTweak.Utilities.Tweaksif (IsWindowsActivated){waitingWindow.Close();- new ViewNotification(300).Show("restart", "warn", "success_activate_notification");+ new NotificationManager(300).Show("restart", "warn", "success_activate_notification");}else{@@ -95,13 +96,13 @@ namespace GTweak.Utilities.TweakswaitingWindow.Close();- new ViewNotification(300).Show(IsWindowsActivated ? "restart" : "", "warn", IsWindowsActivated ? "success_activate_notification" : "error_activate_notification");+ new NotificationManager(300).Show(IsWindowsActivated ? "restart" : "", "warn", IsWindowsActivated ? "success_activate_notification" : "error_activate_notification");}}catch{waitingWindow.Close();- new ViewNotification(300).Show("", "warn", "error_activate_notification");+ new NotificationManager(300).Show("", "warn", "error_activate_notification");}}}diff --git a/.Source/GTweak/View/ConfidentialityView.xaml.cs b/.Source/GTweak/View/ConfidentialityView.xaml.csindex e44d4035..d7be471f 100644--- a/.Source/GTweak/View/ConfidentialityView.xaml.cs+++ b/.Source/GTweak/View/ConfidentialityView.xaml.cs@@ -1,5 +1,5 @@using GTweak.Assets.UserControl;-using GTweak.Utilities.Controls;+using GTweak.Utilities.Helpers.Managers;using GTweak.Utilities.Helpers.Storage;using GTweak.Utilities.Tweaks;using System;@@ -37,8 +37,8 @@ namespace GTweak.ViewConfidentialityTweaks.ApplyTweaks(toggleButton.Name, toggleButton.State);- if (NotifActionsStorage.ConfNotifActions.TryGetValue(toggleButton.Name, out string action))- new ViewNotification(300).Show(action);+ if (NotificationManager.ConfActions.TryGetValue(toggleButton.Name, out string action))+ new NotificationManager(300).Show(action);Parallel.Invoke(async delegate { await Task.Delay(1000); new ConfidentialityTweaks().AnalyzeAndUpdate(this); });}diff --git a/.Source/GTweak/View/InterfaceView.xaml.cs b/.Source/GTweak/View/InterfaceView.xaml.csindex d25c9627..2d940aaa 100644--- a/.Source/GTweak/View/InterfaceView.xaml.cs+++ b/.Source/GTweak/View/InterfaceView.xaml.cs@@ -1,6 +1,5 @@using GTweak.Assets.UserControl;using GTweak.Utilities.Configuration;-using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers.Animation;using GTweak.Utilities.Helpers.Managers;using GTweak.Utilities.Helpers.Storage;@@ -22,7 +21,7 @@ namespace GTweak.ViewInitializeComponent();if (!WindowsLicense.IsWindowsActivated)- new ViewNotification().Show("", "info", "warn_activate_notification");+ new NotificationManager().Show("", "info", "warn_activate_notification");if (SystemDiagnostics.HardwareData.OSBuild.CompareTo("22621.2361") < 0)TglButton21.IsEnabled = false;@@ -73,8 +72,8 @@ namespace GTweak.Viewif (ExplorerManager.InterfBtnMapping.TryGetValue(toggleButton.Name, out bool needRestart))ExplorerManager.Restart(new Process());- if (NotifActionsStorage.IntfNotifActions.TryGetValue(toggleButton.Name, out string action))- new ViewNotification(300).Show(action);+ if (NotificationManager.IntfActions.TryGetValue(toggleButton.Name, out string action))+ new NotificationManager(300).Show(action);Parallel.Invoke(async delegate { await Task.Delay(1000); new InterfaceTweaks().AnalyzeAndUpdate(this); });}diff --git a/.Source/GTweak/View/MoreView.xaml.cs b/.Source/GTweak/View/MoreView.xaml.csindex 4d5d81d2..eec4b2b1 100644--- a/.Source/GTweak/View/MoreView.xaml.cs+++ b/.Source/GTweak/View/MoreView.xaml.cs@@ -2,6 +2,7 @@using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;using GTweak.Utilities.Helpers.Animation;+using GTweak.Utilities.Helpers.Managers;using GTweak.Utilities.Tweaks;using GTweak.Windows;using Ookii.Dialogs.Wpf;@@ -25,13 +26,13 @@ namespace GTweak.Viewprivate async void BtnLicenseWindows_ClickButton(object sender, EventArgs e){if (WindowsLicense.IsWindowsActivated)- new ViewNotification().Show("", "info", "ready_activate_notification");+ new NotificationManager().Show("", "info", "ready_activate_notification");else{if (new SystemDiagnostics().IsNetworkAvailable())await WindowsLicense.StartActivation();else- new ViewNotification().Show("", "warn", "network_activate_notification");+ new NotificationManager().Show("", "warn", "network_activate_notification");}}@@ -39,7 +40,7 @@ namespace GTweak.View{WaitingWindow waitingWindow = new WaitingWindow();waitingWindow.Show();- new ViewNotification().Show("", "info", "createpoint_notification");+ new NotificationManager().Show("", "info", "createpoint_notification");BackgroundQueue backgroundQueue = new BackgroundQueue();await backgroundQueue.QueueTask(delegate { SystemMaintenance.CreateRestorePoint(); });waitingWindow.Close();@@ -83,7 +84,7 @@ namespace GTweak.ViewBackgroundQueue backgroundQueue = new BackgroundQueue();await backgroundQueue.QueueTask(delegate { ClearingMemory.StartMemoryCleanupAsync(_isWinOldRemoval); });- await backgroundQueue.QueueTask(delegate { new ViewNotification(500).Show("", "info", "clear_ram_notification"); });+ await backgroundQueue.QueueTask(delegate { new NotificationManager(500).Show("", "info", "clear_ram_notification"); });}private void BtnDisableDefrag_ClickButton(object sender, EventArgs e) => SystemMaintenance.SetDefragState(false);@@ -95,7 +96,7 @@ namespace GTweak.View{try { SystemMaintenance.DisableRestorePoint(); } catch (Exception ex) { ErrorLogging.LogDebug(ex); }});- await backgroundQueue.QueueTask(delegate { new ViewNotification(300).Show("", "info", "disable_recovery_notification"); });+ await backgroundQueue.QueueTask(delegate { new NotificationManager(300).Show("", "info", "disable_recovery_notification"); });}private void BtnEnableDefrag_ClickButton(object sender, EventArgs e) => SystemMaintenance.SetDefragState(true);@@ -116,15 +117,15 @@ namespace GTweak.Viewawait backgroundQueue.QueueTask(delegate{try { NTFSCompressor.SetCompression(selectedPath, true); }- catch { new ViewNotification().Show("", "warn", "error_compression_notification"); }+ catch { new NotificationManager().Show("", "warn", "error_compression_notification"); }});- await backgroundQueue.QueueTask(delegate { new ViewNotification(500).Show("", "info", "success_compression_notification"); });+ await backgroundQueue.QueueTask(delegate { new NotificationManager(500).Show("", "info", "success_compression_notification"); });}else- new ViewNotification().Show("", "info", "ready_compression_notification");+ new NotificationManager().Show("", "info", "ready_compression_notification");}else- new ViewNotification().Show("", "warn", "notsupport_ntfs_notification");+ new NotificationManager().Show("", "warn", "notsupport_ntfs_notification");}private async void BtnDecompression_ClickButton(object sender, EventArgs e)@@ -143,16 +144,16 @@ namespace GTweak.Viewawait backgroundQueue.QueueTask(delegate{try { NTFSCompressor.SetCompression(selectedPath, false); }- catch { new ViewNotification().Show("", "warn", "error_compression_notification"); }+ catch { new NotificationManager().Show("", "warn", "error_compression_notification"); }});- await backgroundQueue.QueueTask(delegate { new ViewNotification(500).Show("", "info", "success_decompression_notification"); });+ await backgroundQueue.QueueTask(delegate { new NotificationManager(500).Show("", "info", "success_decompression_notification"); });}else- new ViewNotification().Show("", "info", "ready_decompression_notification");+ new NotificationManager().Show("", "info", "ready_decompression_notification");}else- new ViewNotification().Show("", "warn", "notsupport_ntfs_notification");+ new NotificationManager().Show("", "warn", "notsupport_ntfs_notification");}}}diff --git a/.Source/GTweak/View/PakagesView.xaml.cs b/.Source/GTweak/View/PakagesView.xaml.csindex d3a61765..0940444c 100644--- a/.Source/GTweak/View/PakagesView.xaml.cs+++ b/.Source/GTweak/View/PakagesView.xaml.cs@@ -128,7 +128,7 @@ namespace GTweak.Viewcase MouseButtonState.Pressed when Equals(packageImage.Source, FindResource("DA_DI_" + packageName)) && packageName == "OneDrive":{- new ViewNotification().Show("", "info", "onedrive_notification");+ new NotificationManager().Show("", "info", "onedrive_notification");BackgroundQueue backgroundQueue = new BackgroundQueue();await backgroundQueue.QueueTask(async () =>diff --git a/.Source/GTweak/View/ServicesView.xaml.cs b/.Source/GTweak/View/ServicesView.xaml.csindex a800503d..ae9c81bf 100644--- a/.Source/GTweak/View/ServicesView.xaml.cs+++ b/.Source/GTweak/View/ServicesView.xaml.cs@@ -1,5 +1,5 @@using GTweak.Assets.UserControl;-using GTweak.Utilities.Controls;+using GTweak.Utilities.Helpers.Managers;using GTweak.Utilities.Tweaks;using System;using System.Threading.Tasks;@@ -33,7 +33,7 @@ namespace GTweak.View{ServicesTweaks.ApplyTweaks(((ToggleButton)sender).Name, ((ToggleButton)sender).State);- new ViewNotification(300).Show("restart");+ new NotificationManager(300).Show("restart");Parallel.Invoke(async delegate { await Task.Delay(((ToggleButton)sender).Name.Contains("15") ? 2000 : 1000); new ServicesTweaks().AnalyzeAndUpdate(this); });}diff --git a/.Source/GTweak/View/SystemView.xaml.cs b/.Source/GTweak/View/SystemView.xaml.csindex c0d825a3..c7ca3a1e 100644--- a/.Source/GTweak/View/SystemView.xaml.cs+++ b/.Source/GTweak/View/SystemView.xaml.cs@@ -1,5 +1,5 @@using GTweak.Assets.UserControl;-using GTweak.Utilities.Controls;+using GTweak.Utilities.Helpers.Managers;using GTweak.Utilities.Helpers.Storage;using GTweak.Utilities.Tweaks;using System;@@ -48,8 +48,8 @@ namespace GTweak.View{SystemTweaks.ApplyTweaks(toggleButton.Name, toggleButton.State);- if (NotifActionsStorage.SysNotifActions.TryGetValue(toggleButton.Name, out string action))- new ViewNotification(300).Show(action);+ if (NotificationManager.SysActions.TryGetValue(toggleButton.Name, out string action))+ new NotificationManager(300).Show(action);Parallel.Invoke(async delegate { await Task.Delay(1000); new SystemTweaks().AnalyzeAndUpdate(this); });}@@ -59,7 +59,7 @@ namespace GTweak.View{SystemTweaks.isTweakWorkingAntivirus = true;SystemTweaks.ApplyTweaks(toggleButton.Name, toggleButton.State);- new ViewNotification().Show("", "info", "defender_notification");+ new NotificationManager().Show("", "info", "defender_notification");}}}diff --git a/.Source/GTweak/Windows/ImportWindow.xaml.cs b/.Source/GTweak/Windows/ImportWindow.xaml.csindex 52378798..fe92a1ff 100644--- a/.Source/GTweak/Windows/ImportWindow.xaml.cs+++ b/.Source/GTweak/Windows/ImportWindow.xaml.cs@@ -48,9 +48,9 @@ namespace GTweak.WindowsExplorerManager.Restart(new Process());if (isRestartNeed)- new ViewNotification().Show("restart");+ new NotificationManager().Show("restart");else if (!isRestartNeed && isLogoutNeed)- new ViewNotification().Show("logout");+ new NotificationManager().Show("logout");App.UpdateImport();BeginAnimation(OpacityProperty, FadeAnimation.FadeTo(0.1, () => { Close(); }));}@@ -80,8 +80,8 @@ namespace GTweak.Windowsawait Task.Delay(700, _token);ConfidentialityTweaks.ApplyTweaks(set.Tweak, Convert.ToBoolean(set.Value));- isRestartNeed = NotifActionsStorage.ConfNotifActions.Any(get => get.Key == set.Tweak && get.Value == "restart");- isLogoutNeed = NotifActionsStorage.ConfNotifActions.Any(get => get.Key == set.Tweak && get.Value == "logout");+ isRestartNeed = NotificationManager.ConfActions.Any(get => get.Key == set.Tweak && get.Value == "restart");+ isLogoutNeed = NotificationManager.ConfActions.Any(get => get.Key == set.Tweak && get.Value == "logout");}}@@ -99,8 +99,8 @@ namespace GTweak.Windowsawait Task.Delay(700, _token);InterfaceTweaks.ApplyTweaks(set.Tweak, Convert.ToBoolean(set.Value));- isRestartNeed = NotifActionsStorage.IntfNotifActions.Any(get => get.Key == set.Tweak && get.Value == "restart");- isLogoutNeed = NotifActionsStorage.IntfNotifActions.Any(get => get.Key == set.Tweak && get.Value == "logout");+ isRestartNeed = NotificationManager.IntfActions.Any(get => get.Key == set.Tweak && get.Value == "restart");+ isLogoutNeed = NotificationManager.IntfActions.Any(get => get.Key == set.Tweak && get.Value == "logout");isExpRestartNeed = ExplorerManager.InterfBtnMapping.Any(get => get.Key == set.Tweak && get.Value == true);}}@@ -151,8 +151,8 @@ namespace GTweak.WindowselseSystemTweaks.ApplyTweaksSlider(set.Tweak, Convert.ToUInt32(set.Value));- isRestartNeed = NotifActionsStorage.SysNotifActions.Any(get => get.Key == set.Tweak && get.Value == "restart");- isLogoutNeed = NotifActionsStorage.SysNotifActions.Any(get => get.Key == set.Tweak && get.Value == "logout");+ isRestartNeed = NotificationManager.SysActions.Any(get => get.Key == set.Tweak && get.Value == "restart");+ isLogoutNeed = NotificationManager.SysActions.Any(get => get.Key == set.Tweak && get.Value == "logout");}}diff --git a/.Source/GTweak/Windows/NotificationWindow.xaml.cs b/.Source/GTweak/Windows/NotificationWindow.xaml.csindex fcff03f5..ce6b2ad3 100644--- a/.Source/GTweak/Windows/NotificationWindow.xaml.cs+++ b/.Source/GTweak/Windows/NotificationWindow.xaml.cs@@ -61,24 +61,6 @@ namespace GTweak.WindowsnotificationSound.Play();}- switch (ActionNotice)- {- case "logout":- if (TitleNotice == string.Empty || TextNotice == string.Empty)- {- TitleNotice = (string)FindResource("title_warn_notification");- TextNotice = (string)FindResource("logout_notification");- }- break;- case "restart":- if (TitleNotice == string.Empty || TextNotice == string.Empty)- {- TitleNotice = (string)FindResource("title_warn_notification");- TextNotice = (string)FindResource("restart_notification");- }- break;- }-Dispatcher.Invoke(() =>{Rect primaryMonitorArea = SystemParameters.WorkArea;diff --git a/.Source/GTweak/Windows/UpdateWindow.xaml.cs b/.Source/GTweak/Windows/UpdateWindow.xaml.csindex 3847edfe..827c57af 100644--- a/.Source/GTweak/Windows/UpdateWindow.xaml.cs+++ b/.Source/GTweak/Windows/UpdateWindow.xaml.cs@@ -2,6 +2,7 @@using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;using GTweak.Utilities.Helpers.Animation;+using GTweak.Utilities.Helpers.Managers;using System;using System.ComponentModel;using System.Diagnostics;@@ -72,7 +73,7 @@ namespace GTweak.Windowscatch{Close();- new ViewNotification().Show("", "warn", "warn_update_notification");+ new NotificationManager().Show("", "warn", "warn_update_notification");}}}