Skip to content

Portable Tool for an Ideal Windows Setup

-re & optimize

Greedeksb208cf1335bf
diff --git a/.Source/GTweak/App.xaml b/.Source/GTweak/App.xaml
index fd69a6d4..ee5faeaf 100644
--- a/.Source/GTweak/App.xaml
+++ b/.Source/GTweak/App.xaml
@@ -7,7 +7,7 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="Languages/en/Lang.xaml" />
+ <ResourceDictionary Source="Languages/en/Localize.xaml" />
<ResourceDictionary Source="Core/DataTemplate.xaml" />
<ResourceDictionary Source="Assets/Font/Font.xaml" />
<ResourceDictionary Source="Assets/DrawingImages/Deleted/Applications.xaml" />
diff --git a/.Source/GTweak/App.xaml.cs b/.Source/GTweak/App.xaml.cs
index 580c70da..9cebf412 100644
--- a/.Source/GTweak/App.xaml.cs
+++ b/.Source/GTweak/App.xaml.cs
@@ -38,9 +38,9 @@ namespace GTweak
{
Source = value switch
{
- "ru" => new Uri("Languages/ru/Lang.xaml", UriKind.Relative),
- "en" => new Uri("Languages/en/Lang.xaml", UriKind.Relative),
- _ => GettingSystemLanguage.Contains("ru") ? new Uri("Languages/ru/Lang.xaml", UriKind.Relative) : new Uri("Languages/en/Lang.xaml", UriKind.Relative)
+ "ru" => new Uri("Languages/ru/Localize.xaml", UriKind.Relative),
+ "en" => new Uri("Languages/en/Localize.xaml", UriKind.Relative),
+ _ => GettingSystemLanguage.Contains("ru") ? new Uri("Languages/ru/Localize.xaml", UriKind.Relative) : new Uri("Languages/en/Localize.xaml", UriKind.Relative)
}
};
diff --git a/.Source/GTweak/Core/DataTemplate.xaml b/.Source/GTweak/Core/DataTemplate.xaml
index 6b49f89f..d06895c0 100644
--- a/.Source/GTweak/Core/DataTemplate.xaml
+++ b/.Source/GTweak/Core/DataTemplate.xaml
@@ -11,8 +11,8 @@
<view:InterfaceView />
</DataTemplate>
- <DataTemplate DataType="{x:Type vm:ApplicationsVM}">
- <view:ApplicationsView />
+ <DataTemplate DataType="{x:Type vm:PakagesVM}">
+ <view:PakagesView />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:ServicesVM}">
@@ -23,8 +23,8 @@
<view:SystemView />
</DataTemplate>
- <DataTemplate DataType="{x:Type vm:InformationSystemVM}">
- <view:InformationSystemView />
+ <DataTemplate DataType="{x:Type vm:DataSystemVM}">
+ <view:DataSystemView />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:MoreVM}">
diff --git a/.Source/GTweak/Core/Model/DataSystemModel.cs b/.Source/GTweak/Core/Model/DataSystemModel.cs
new file mode 100644
index 00000000..f62d672e
--- /dev/null
+++ b/.Source/GTweak/Core/Model/DataSystemModel.cs
@@ -0,0 +1,21 @@
+using System.Windows;
+
+namespace GTweak.Core.Model
+{
+ internal sealed class DataSystemModel
+ {
+ internal string WindowsDescriptions { get; set; }
+ internal string BiosDescriptions { get; set; }
+ internal string MotherBrDescriptions { get; set; }
+ internal string CpuDescriptions { get; set; }
+ internal string GpuDescriptions { get; set; }
+ internal string RamDescriptions { get; set; }
+ internal string StorageDescriptions { get; set; }
+ internal string AudioDescriptions { get; set; }
+ internal string NetworkDescriptions { get; set; }
+ internal string UserIpAddress { get; set; }
+ internal string NumberProcesses { get; set; }
+ internal int BlurValue { get; set; }
+ internal Visibility IpVisibility { get; set; }
+ }
+}
diff --git a/.Source/GTweak/Core/Model/MainModel.cs b/.Source/GTweak/Core/Model/MainModel.cs
deleted file mode 100644
index 0a160764..00000000
--- a/.Source/GTweak/Core/Model/MainModel.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-
-namespace GTweak.Core.Model
-{
- internal class MainModel
- {
- internal sealed class InformationSystemModel
- {
- internal string WindowsDescriptions { get; set; }
- internal string BiosDescriptions { get; set; }
- internal string MotherBrDescriptions { get; set; }
- internal string CpuDescriptions { get; set; }
- internal string GpuDescriptions { get; set; }
- internal string RamDescriptions { get; set; }
- internal string StorageDescriptions { get; set; }
- internal string AudioDescriptions { get; set; }
- internal string NetworkDescriptions { get; set; }
- internal string UserIpAddress { get; set; }
- internal string NumberProcesses { get; set; }
- internal int BlurValue { get; set; }
- internal Visibility IpVisibility { get; set; }
- }
- }
-}
diff --git a/.Source/GTweak/Core/ViewModel/PagesViewModel.cs b/.Source/GTweak/Core/ViewModel/DataSystemVM.cs
similarity index 88%
rename from .Source/GTweak/Core/ViewModel/PagesViewModel.cs
rename to .Source/GTweak/Core/ViewModel/DataSystemVM.cs
index ef5b7d94..ba995807 100644
--- a/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
+++ b/.Source/GTweak/Core/ViewModel/DataSystemVM.cs
@@ -1,25 +1,13 @@
-using GTweak.Utilities;
+using GTweak.Core.Model;
+using GTweak.Utilities;
using GTweak.Utilities.Tweaks;
using System.Windows;
namespace GTweak.Core.ViewModel
{
- internal class ConfidentialityVM : ViewModelBase { }
- internal class ApplicationsVM : ViewModelBase { }
- internal class ServicesVM : ViewModelBase { }
- internal class SystemVM : ViewModelBase { }
- internal class MoreVM : ViewModelBase { }
-
-
- internal class InterfaceVM : ViewModelBase
- {
- public bool IsBlockForWin10 => SystemData.СomputerСonfiguration.WindowsClientVersion.Contains("11");
- public bool IsBlockWithoutLicense => WindowsLicense.IsWindowsActivated;
- }
-
- internal class InformationSystemVM : ViewModelBase
+ internal class DataSystemVM : ViewModelBase
{
- private readonly InformationSystemModel model;
+ private readonly DataSystemModel model;
public string DisplayWindows
{
@@ -105,9 +93,9 @@ namespace GTweak.Core.ViewModel
set { Settings.IsHiddenIpAddress = value; OnPropertyChanged(); }
}
- public InformationSystemVM()
+ public DataSystemVM()
{
- model = new InformationSystemModel();
+ model = new DataSystemModel();
DisplayWindows = SystemData.СomputerСonfiguration.СonfigurationData["Windows"];
DisplayNumberProcesses = new SystemData.MonitoringSystem().CountProcess.ToString();
diff --git a/.Source/GTweak/Core/ViewModel/InterfaceVM.cs b/.Source/GTweak/Core/ViewModel/InterfaceVM.cs
new file mode 100644
index 00000000..2e072fec
--- /dev/null
+++ b/.Source/GTweak/Core/ViewModel/InterfaceVM.cs
@@ -0,0 +1,10 @@
+using GTweak.Utilities.Tweaks;
+
+namespace GTweak.Core.ViewModel
+{
+ internal class InterfaceVM : ViewModelBase
+ {
+ public bool IsBlockForWin10 => SystemData.СomputerСonfiguration.WindowsClientVersion.Contains("11");
+ public bool IsBlockWithoutLicense => WindowsLicense.IsWindowsActivated;
+ }
+}
diff --git a/.Source/GTweak/Core/ViewModel/MainViewModel.cs b/.Source/GTweak/Core/ViewModel/MainViewModel.cs
index aa99381d..a768e72c 100644
--- a/.Source/GTweak/Core/ViewModel/MainViewModel.cs
+++ b/.Source/GTweak/Core/ViewModel/MainViewModel.cs
@@ -25,29 +25,28 @@ namespace GTweak.Core.ViewModel
public ICommand ConfidentialityCommand { get; set; }
public ICommand InterfaceCommand { get; set; }
- public ICommand ApplicationsCommand { get; set; }
+ public ICommand PakagesCommand { get; set; }
public ICommand ServicesCommand { get; set; }
public ICommand SystemCommand { get; set; }
- public ICommand InformationSystemCommand { get; set; }
+ public ICommand DataSystemCommand { get; set; }
public ICommand MoreCommand { get; set; }
-
private void Confidentiality(object obj) => CurrentView = new ConfidentialityVM();
private void Interface(object obj) => CurrentView = new InterfaceVM();
- private void Apps(object obj) => CurrentView = new ApplicationsVM();
+ private void Pakages(object obj) => CurrentView = new PakagesVM();
private void Services(object obj) => CurrentView = new ServicesVM();
private void System(object obj) => CurrentView = new SystemVM();
- private void InformationSystem(object obj) => CurrentView = new InformationSystemVM();
+ private void DataSystem(object obj) => CurrentView = new DataSystemVM();
private void More(object obj) => CurrentView = new MoreVM();
public MainViewModel()
{
ConfidentialityCommand = new RelayCommand(Confidentiality);
InterfaceCommand = new RelayCommand(Interface);
- ApplicationsCommand = new RelayCommand(Apps);
+ PakagesCommand = new RelayCommand(Pakages);
ServicesCommand = new RelayCommand(Services);
SystemCommand = new RelayCommand(System);
- InformationSystemCommand = new RelayCommand(InformationSystem);
+ DataSystemCommand = new RelayCommand(DataSystem);
MoreCommand = new RelayCommand(More);
CurrentView = new MoreVM();
diff --git a/.Source/GTweak/Core/ViewModel/OtherContextVM.cs b/.Source/GTweak/Core/ViewModel/OtherContextVM.cs
new file mode 100644
index 00000000..3957170b
--- /dev/null
+++ b/.Source/GTweak/Core/ViewModel/OtherContextVM.cs
@@ -0,0 +1,8 @@
+namespace GTweak.Core.ViewModel
+{
+ internal class ConfidentialityVM : ViewModelBase { }
+ internal class PakagesVM : ViewModelBase { }
+ internal class ServicesVM : ViewModelBase { }
+ internal class SystemVM : ViewModelBase { }
+ internal class MoreVM : ViewModelBase { }
+}
diff --git a/.Source/GTweak/Core/ViewModelBase.cs b/.Source/GTweak/Core/ViewModelBase.cs
index 2ee99b85..29796c53 100644
--- a/.Source/GTweak/Core/ViewModelBase.cs
+++ b/.Source/GTweak/Core/ViewModelBase.cs
@@ -1,10 +1,9 @@
-using GTweak.Core.Model;
-using System.ComponentModel;
+using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace GTweak.Core
{
- internal class ViewModelBase : MainModel, INotifyPropertyChanged
+ internal class ViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public void OnPropertyChanged([CallerMemberName] string propName = null)
diff --git a/.Source/GTweak/GTweak.csproj b/.Source/GTweak/GTweak.csproj
index 5e3c48cd..b9782bc2 100644
--- a/.Source/GTweak/GTweak.csproj
+++ b/.Source/GTweak/GTweak.csproj
@@ -245,6 +245,8 @@
<Compile Include="Assets\UserControl\ProggressRing.xaml.cs">
<DependentUpon>ProggressRing.xaml</DependentUpon>
</Compile>
+ <Compile Include="Core\ViewModel\DataSystemVM.cs" />
+ <Compile Include="Core\ViewModel\InterfaceVM.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@@ -253,7 +255,7 @@
<Compile Include="Assets\UserControl\Card.xaml.cs">
<DependentUpon>Card.xaml</DependentUpon>
</Compile>
- <Compile Include="Core\Model\MainModel.cs" />
+ <Compile Include="Core\Model\DataSystemModel.cs" />
<Compile Include="Utilities\BlockRunTweaker.cs" />
<Compile Include="Utilities\DisablingWinKeys.cs" />
<Compile Include="Utilities\Helpers\TaskSchedulerManager.cs" />
@@ -276,7 +278,7 @@
<Compile Include="Utilities\Tweaks\WindowsLicense.cs" />
<Compile Include="Utilities\Tweaks\RecoveryPoint.cs" />
<Compile Include="Utilities\Helpers\TypewriterAnimation.cs" />
- <Compile Include="Core\ViewModel\PagesViewModel.cs" />
+ <Compile Include="Core\ViewModel\OtherContextVM.cs" />
<Compile Include="Windows\ImportWindow.xaml.cs">
<DependentUpon>ImportWindow.xaml</DependentUpon>
</Compile>
@@ -326,11 +328,11 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Languages\ru\Lang.xaml">
+ <Page Include="Languages\ru\Localize.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Languages\en\Lang.xaml">
+ <Page Include="Languages\en\Localize.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -390,7 +392,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="View\ApplicationsView.xaml">
+ <Page Include="View\PakagesView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -398,7 +400,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="View\InformationSystemView.xaml">
+ <Page Include="View\DataSystemView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -443,14 +445,14 @@
<Compile Include="Utilities\Tweaks\SystemData.cs" />
<Compile Include="Core\ViewModelBase.cs" />
<Compile Include="Core\ViewModel\MainViewModel.cs" />
- <Compile Include="View\ApplicationsView.xaml.cs">
- <DependentUpon>ApplicationsView.xaml</DependentUpon>
+ <Compile Include="View\PakagesView.xaml.cs">
+ <DependentUpon>PakagesView.xaml</DependentUpon>
</Compile>
<Compile Include="View\ConfidentialityView.xaml.cs">
<DependentUpon>ConfidentialityView.xaml</DependentUpon>
</Compile>
- <Compile Include="View\InformationSystemView.xaml.cs">
- <DependentUpon>InformationSystemView.xaml</DependentUpon>
+ <Compile Include="View\DataSystemView.xaml.cs">
+ <DependentUpon>DataSystemView.xaml</DependentUpon>
</Compile>
<Compile Include="View\InterfaceView.xaml.cs">
<DependentUpon>InterfaceView.xaml</DependentUpon>
diff --git a/.Source/GTweak/Languages/en/Lang.xaml b/.Source/GTweak/Languages/en/Localize.xaml
similarity index 99%
rename from .Source/GTweak/Languages/en/Lang.xaml
rename to .Source/GTweak/Languages/en/Localize.xaml
index dfb3d1ba..9c7dd4c6 100644
--- a/.Source/GTweak/Languages/en/Lang.xaml
+++ b/.Source/GTweak/Languages/en/Localize.xaml
@@ -34,8 +34,8 @@
<!--#region Notification Window -->
<v:String x:Key="title_win_notification">Notification</v:String>
- <v:String x:Key="title0_notification">Attention</v:String>
- <v:String x:Key="title1_notification">Information</v:String>
+ <v:String x:Key="title_warn_notification">Attention</v:String>
+ <v:String x:Key="title_info_notification">Information</v:String>
<v:String x:Key="logout_notification">An exit is required, click on this text to produce it</v:String>
<v:String x:Key="restart_notification">A reboot is required, click on this text to perform it</v:String>
<v:String x:Key="onedrive_notification">The OneDrive recovery process has started, it will take some time</v:String>
diff --git a/.Source/GTweak/Languages/ru/Lang.xaml b/.Source/GTweak/Languages/ru/Localize.xaml
similarity index 99%
rename from .Source/GTweak/Languages/ru/Lang.xaml
rename to .Source/GTweak/Languages/ru/Localize.xaml
index e8f452f4..e3278abe 100644
--- a/.Source/GTweak/Languages/ru/Lang.xaml
+++ b/.Source/GTweak/Languages/ru/Localize.xaml
@@ -34,8 +34,8 @@
<!--#region Notification Window -->
<v:String x:Key="title_win_notification">Уведомление</v:String>
- <v:String x:Key="title0_notification">Внимание</v:String>
- <v:String x:Key="title1_notification">Информация</v:String>
+ <v:String x:Key="title_warn_notification">Внимание</v:String>
+ <v:String x:Key="title_info_notification">Информация</v:String>
<v:String x:Key="logout_notification">Требуется выход, нажмите на данный текст, чтобы произвести его</v:String>
<v:String x:Key="restart_notification">Требуется перезагрузка, нажмите на данный текст, чтобы произвести её</v:String>
<v:String x:Key="onedrive_notification">Процесс восстановления OneDrive начался, это займет некоторое время</v:String>
diff --git a/.Source/GTweak/Utilities/Settings.cs b/.Source/GTweak/Utilities/Settings.cs
index 1be02fd1..3e2325f8 100644
--- a/.Source/GTweak/Utilities/Settings.cs
+++ b/.Source/GTweak/Utilities/Settings.cs
@@ -125,7 +125,7 @@ namespace GTweak.Utilities
internal static void SaveFileConfig()
{
if (INIManager.UserTweaksConfidentiality.Count == 0 && INIManager.UserTweaksInterface.Count == 0 && INIManager.UserTweaksServices.Count == 0 && INIManager.UserTweaksSystem.Count == 0)
- new ViewNotification().Show("", (string)Application.Current.Resources["title1_notification"], (string)Application.Current.Resources["export_warning_notification"]);
+ new ViewNotification().Show("", "info", (string)Application.Current.Resources["export_warning_notification"]);
else
{
SaveFileDialog saveFileDialog = new SaveFileDialog
@@ -177,10 +177,10 @@ namespace GTweak.Utilities
if (File.ReadLines(UsePath.Config).Any(line => line.Contains("TglButton")) || File.ReadLines(UsePath.Config).Any(line => line.Contains("Slider")))
new ImportWindow(openFileDialog.SafeFileName).ShowDialog();
else
- new ViewNotification().Show("", (string)Application.Current.Resources["title1_notification"], (string)Application.Current.Resources["import_empty_notification"]);
+ new ViewNotification().Show("", "info", (string)Application.Current.Resources["import_empty_notification"]);
}
else
- new ViewNotification().Show("", (string)Application.Current.Resources["title1_notification"], (string)Application.Current.Resources["import_warning_notification"]);
+ new ViewNotification().Show("", "info", (string)Application.Current.Resources["import_warning_notification"]);
}
internal static void SelfRemoval()
diff --git a/.Source/GTweak/Utilities/Tweaks/ClearingMemory.cs b/.Source/GTweak/Utilities/Tweaks/ClearingMemory.cs
index ec66bf7d..e416aa82 100644
--- a/.Source/GTweak/Utilities/Tweaks/ClearingMemory.cs
+++ b/.Source/GTweak/Utilities/Tweaks/ClearingMemory.cs
@@ -226,7 +226,7 @@ namespace GTweak.Utilities.Tweaks
if (backgroundQueue.IsQueueCompleted)
{
await Task.Delay(1000);
- new ViewNotification().Show("", (string)Application.Current.Resources["title1_notification"], (string)Application.Current.Resources["clear_ram_notification"]);
+ new ViewNotification().Show("", "info", (string)Application.Current.Resources["clear_ram_notification"]);
}
}
}
diff --git a/.Source/GTweak/Utilities/Tweaks/Firewall.cs b/.Source/GTweak/Utilities/Tweaks/Firewall.cs
index d815b655..0b1a7efc 100644
--- a/.Source/GTweak/Utilities/Tweaks/Firewall.cs
+++ b/.Source/GTweak/Utilities/Tweaks/Firewall.cs
@@ -47,7 +47,7 @@ namespace GTweak.Utilities.Tweaks
ChangeRulesIn(isChoose, PathsForPrograms["Uso"], string.Concat(NameRules["Update"], " (Update Orchestrator)"));
});
}
- catch { new ViewNotification().Show("", (string)Application.Current.Resources["title0_notification"], (string)Application.Current.Resources["firewalloff_notification"]); }
+ catch { new ViewNotification().Show("", "warn", (string)Application.Current.Resources["firewalloff_notification"]); }
try
{
@@ -57,7 +57,7 @@ namespace GTweak.Utilities.Tweaks
ChangeRulesOut(isChoose, PathsForPrograms["Uso"], string.Concat(NameRules["Update"], " (Update Orchestrator)"));
});
}
- catch { new ViewNotification().Show("", (string)Application.Current.Resources["title0_notification"], (string)Application.Current.Resources["firewalloff_notification"]); }
+ catch { new ViewNotification().Show("", "warn", (string)Application.Current.Resources["firewalloff_notification"]); }
}
private static void ChangeRulesIn(in bool isChoose, in string pathProgram, in string nameRule, in string description = "Windows update blocking")
@@ -109,7 +109,7 @@ namespace GTweak.Utilities.Tweaks
protected static void BlockSpyDomain(in bool isChoose)
{
try { RulesHosts(isChoose); }
- catch { new ViewNotification().Show("", (string)Application.Current.Resources["title0_notification"], (string)Application.Current.Resources["firewalloff_notification"]); }
+ catch { new ViewNotification().Show("", "warn", (string)Application.Current.Resources["firewalloff_notification"]); }
}
private static void RulesHosts(in bool isChoose)
@@ -154,7 +154,7 @@ namespace GTweak.Utilities.Tweaks
protected static void BlockWDefender(bool isChoose)
{
try { Parallel.Invoke(() => { ChangeRulesOut(isChoose, PathsForPrograms["WD"], NameRules["WDefender"], "blocking Windows Defender database updates"); }); }
- catch { new ViewNotification().Show("", (string)Application.Current.Resources["title0_notification"], (string)Application.Current.Resources["firewalloff_notification"]); }
+ catch { new ViewNotification().Show("", "warn", (string)Application.Current.Resources["firewalloff_notification"]); }
}
}
}
diff --git a/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs b/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs
index 882f325e..ba1b4460 100644
--- a/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs
+++ b/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs
@@ -95,9 +95,9 @@ namespace GTweak.Utilities.Tweaks
waitingWindow.Close();
if (IsWindowsActivated)
- new ViewNotification().Show("restart", (string)Application.Current.Resources["title0_notification"], (string)Application.Current.Resources["successactivate_notification"]);
+ new ViewNotification().Show("restart", "warn", (string)Application.Current.Resources["successactivate_notification"]);
else
- new ViewNotification().Show("", (string)Application.Current.Resources["title0_notification"], (string)Application.Current.Resources["notsuccessactivate_notification"]);
+ new ViewNotification().Show("", "warn", (string)Application.Current.Resources["notsuccessactivate_notification"]);
}
}
diff --git a/.Source/GTweak/Utilities/ViewNotification.cs b/.Source/GTweak/Utilities/ViewNotification.cs
index a97a6817..f36da26f 100644
--- a/.Source/GTweak/Utilities/ViewNotification.cs
+++ b/.Source/GTweak/Utilities/ViewNotification.cs
@@ -16,7 +16,7 @@ namespace GTweak.Utilities
Thread _thread = new Thread(() => new Settings().CheckingTempFiles()) { IsBackground = true };
_thread.Start();
- await Task.Delay(300);
+ await Task.Delay(200);
Application.Current.Dispatcher.Invoke(delegate
{
@@ -31,9 +31,14 @@ namespace GTweak.Utilities
notificationWindow = new NotificationWindow
{
- TitleNotice = tittle,
+ TitleNotice = tittle switch
+ {
+ "warn" => (string)Application.Current.Resources["title_warn_notification"],
+ "info" => (string)Application.Current.Resources["title_info_notification"],
+ _ => string.Empty,
+ },
TextNotice = content,
- ActionChoice = action,
+ ActionNotice = action,
};
await Task.Delay(100);
notificationWindow.Show();
diff --git a/.Source/GTweak/View/InformationSystemView.xaml b/.Source/GTweak/View/DataSystemView.xaml
similarity index 99%
rename from .Source/GTweak/View/InformationSystemView.xaml
rename to .Source/GTweak/View/DataSystemView.xaml
index 1cdfcef7..167d1ab0 100644
--- a/.Source/GTweak/View/InformationSystemView.xaml
+++ b/.Source/GTweak/View/DataSystemView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="GTweak.View.InformationSystemView"
+<UserControl x:Class="GTweak.View.DataSystemView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -10,7 +10,7 @@
d:DesignHeight="550" d:DesignWidth="1100"
Style="{StaticResource LaunchPage}" Unloaded="Page_Unloaded" Loaded="Page_Loaded">
<UserControl.DataContext>
- <vm:InformationSystemVM />
+ <vm:DataSystemVM />
</UserControl.DataContext>
<Grid>
diff --git a/.Source/GTweak/View/InformationSystemView.xaml.cs b/.Source/GTweak/View/DataSystemView.xaml.cs
similarity index 97%
rename from .Source/GTweak/View/InformationSystemView.xaml.cs
rename to .Source/GTweak/View/DataSystemView.xaml.cs
index 89602cee..d38fb5cd 100644
--- a/.Source/GTweak/View/InformationSystemView.xaml.cs
+++ b/.Source/GTweak/View/DataSystemView.xaml.cs
@@ -16,12 +16,12 @@ using System.Windows.Threading;
namespace GTweak.View
{
- public partial class InformationSystemView : UserControl
+ public partial class DataSystemView : UserControl
{
private readonly DispatcherTimer timer = default;
private TimeSpan time = TimeSpan.FromSeconds(0);
- public InformationSystemView()
+ public DataSystemView()
{
InitializeComponent();
@@ -39,7 +39,7 @@ namespace GTweak.View
SystemData.СomputerСonfiguration.СonfigurationData["UserIpAddress"] = (string)FindResource("limited_systemInformation");
break;
}
- DataContext = new InformationSystemVM();
+ DataContext = new DataSystemVM();
};
timer = new DispatcherTimer(new TimeSpan(0, 0, 1), DispatcherPriority.Normal, delegate
@@ -74,7 +74,7 @@ namespace GTweak.View
BackgroundWorker backgroundWorker = new BackgroundWorker();
backgroundWorker.RunWorkerAsync();
backgroundWorker.DoWork += delegate { SystemData.СomputerСonfiguration.GettingUserIP(); };
- backgroundWorker.RunWorkerCompleted += delegate { DataContext = new InformationSystemVM(); };
+ backgroundWorker.RunWorkerCompleted += delegate { DataContext = new DataSystemVM(); };
}
time = time.Add(TimeSpan.FromSeconds(+1));
diff --git a/.Source/GTweak/View/InterfaceView.xaml.cs b/.Source/GTweak/View/InterfaceView.xaml.cs
index 48cafc6a..88085a77 100644
--- a/.Source/GTweak/View/InterfaceView.xaml.cs
+++ b/.Source/GTweak/View/InterfaceView.xaml.cs
@@ -20,7 +20,7 @@ namespace GTweak.View
App.LanguageChanged += delegate { new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(0)); };
if (!WindowsLicense.IsWindowsActivated)
- new ViewNotification().Show("", (string)Application.Current.Resources["title1_notification"], (string)Application.Current.Resources["viewlicense_notification"]);
+ new ViewNotification().Show("", "info", (string)Application.Current.Resources["viewlicense_notification"]);
}
private void Tweak_MouseEnter(object sender, MouseEventArgs e)
diff --git a/.Source/GTweak/View/MoreView.xaml.cs b/.Source/GTweak/View/MoreView.xaml.cs
index a177feb7..f5f096ee 100644
--- a/.Source/GTweak/View/MoreView.xaml.cs
+++ b/.Source/GTweak/View/MoreView.xaml.cs
@@ -18,10 +18,10 @@ namespace GTweak.View
private void BtnLicenseWindows_ClickButton(object sender, EventArgs e)
{
if (WindowsLicense.IsWindowsActivated)
- new ViewNotification().Show("", (string)FindResource("title1_notification"), (string)FindResource("readyactivate_notification"));
+ new ViewNotification().Show("", "info", (string)FindResource("readyactivate_notification"));
else
{
- new ViewNotification().Show("", (string)FindResource("title0_notification"), (string)FindResource("activatewin_notification"));
+ new ViewNotification().Show("", "warn", (string)FindResource("activatewin_notification"));
WindowsLicense.StartActivation();
}
}
@@ -30,7 +30,7 @@ namespace GTweak.View
{
if (RecoveryPoint.IsAlreadyPoint() == false)
{
- new ViewNotification().Show("", (string)FindResource("title1_notification"), (string)FindResource("createpoint_notification"));
+ new ViewNotification().Show("", "info", (string)FindResource("createpoint_notification"));
await Task.Delay(100);
@@ -38,23 +38,23 @@ namespace GTweak.View
backgroundWorker.DoWork += delegate
{
try { RecoveryPoint.Create((string)FindResource("textpoint_more")); }
- catch { new ViewNotification().Show("", (string)FindResource("title0_notification"), (string)FindResource("notsuccessfulpoint_notification")); }
- finally { new ViewNotification().Show("", (string)FindResource("title1_notification"), (string)FindResource("successpoint_notification")); };
+ catch { new ViewNotification().Show("", "warn", (string)FindResource("notsuccessfulpoint_notification")); }
+ finally { new ViewNotification().Show("", "info", (string)FindResource("successpoint_notification")); };
};
backgroundWorker.RunWorkerCompleted += delegate
{
- new ViewNotification().Show("", (string)FindResource("title1_notification"), (string)FindResource("successpoint_notification"));
+ new ViewNotification().Show("", "info", (string)FindResource("successpoint_notification"));
};
backgroundWorker.RunWorkerAsync();
}
else
- new ViewNotification().Show("", (string)FindResource("title1_notification"), (string)FindResource("readypoint_notification"));
+ new ViewNotification().Show("", "info", (string)FindResource("readypoint_notification"));
}
private void BtnRecoveyLaunch_ClickButton(object sender, EventArgs e)
{
try { RecoveryPoint.Run(); }
- catch { new ViewNotification().Show("", (string)FindResource("title0_notification"), (string)FindResource("notsuccessfulrecovery_notification")); }
+ catch { new ViewNotification().Show("", "warn", (string)FindResource("notsuccessfulrecovery_notification")); }
}
private void BtnClear_ClickButton(object sender, EventArgs e) => new ClearingMemory().StartMemoryCleanup();
@@ -70,12 +70,12 @@ namespace GTweak.View
};
backgroundWorker.RunWorkerCompleted += delegate
{
- new ViewNotification().Show("", (string)FindResource("title1_notification"), (string)FindResource("disable_recovery_notification"));
+ new ViewNotification().Show("", "info", (string)FindResource("disable_recovery_notification"));
};
backgroundWorker.RunWorkerAsync();
}
else
- new ViewNotification().Show("", (string)FindResource("title1_notification"), (string)FindResource("warndisable_recovery_notification"));
+ new ViewNotification().Show("", "info", (string)FindResource("warndisable_recovery_notification"));
}
}
}
diff --git a/.Source/GTweak/View/ApplicationsView.xaml b/.Source/GTweak/View/PakagesView.xaml
similarity index 99%
rename from .Source/GTweak/View/ApplicationsView.xaml
rename to .Source/GTweak/View/PakagesView.xaml
index 0d8d94b3..903decef 100644
--- a/.Source/GTweak/View/ApplicationsView.xaml
+++ b/.Source/GTweak/View/PakagesView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="GTweak.View.ApplicationsView"
+<UserControl x:Class="GTweak.View.PakagesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/.Source/GTweak/View/ApplicationsView.xaml.cs b/.Source/GTweak/View/PakagesView.xaml.cs
similarity index 97%
rename from .Source/GTweak/View/ApplicationsView.xaml.cs
rename to .Source/GTweak/View/PakagesView.xaml.cs
index 6d038a38..83355dff 100644
--- a/.Source/GTweak/View/ApplicationsView.xaml.cs
+++ b/.Source/GTweak/View/PakagesView.xaml.cs
@@ -13,12 +13,12 @@ using System.Windows.Threading;
namespace GTweak.View
{
- public partial class ApplicationsView : UserControl
+ public partial class PakagesView : UserControl
{
private TimeSpan time = TimeSpan.FromSeconds(0);
private string applicationName = string.Empty;
- public ApplicationsView()
+ public PakagesView()
{
InitializeComponent();
@@ -61,7 +61,7 @@ namespace GTweak.View
case MouseButtonState.Pressed when appImage.Source == (DrawingImage)FindResource("DA_DI_" + applicationName) && applicationName == "OneDrive":
{
appImage.Source = (DrawingImage)FindResource("DI_Sandtime");
- new ViewNotification().Show("", (string)FindResource("title1_notification"), (string)FindResource("onedrive_notification"));
+ new ViewNotification().Show("", "info", (string)FindResource("onedrive_notification"));
BackgroundQueue backgroundQueue = new BackgroundQueue();
await backgroundQueue.QueueTask(delegate { UninstallingPakages.ResetOneDriveAsync(); });
diff --git a/.Source/GTweak/View/SystemView.xaml.cs b/.Source/GTweak/View/SystemView.xaml.cs
index 34a52f07..1165aa11 100644
--- a/.Source/GTweak/View/SystemView.xaml.cs
+++ b/.Source/GTweak/View/SystemView.xaml.cs
@@ -91,10 +91,10 @@ namespace GTweak.View
INIManager.UserTweaksSystem.Remove(toggleButton.Name);
INIManager.UserTweaksSystem.Add(toggleButton.Name, Convert.ToString(toggleButton.State));
SystemTweaks.UseSystem(toggleButton.Name, toggleButton.State);
- new ViewNotification().Show("", (string)FindResource("title1_notification"), (string)FindResource("windefender_notification"));
+ new ViewNotification().Show("", "info", (string)FindResource("windefender_notification"));
}
else if (SystemTweaks.isTweakWorkingAntivirus)
- new ViewNotification().Show("", (string)FindResource("title0_notification"), (string)FindResource("warningwindef_notification"));
+ new ViewNotification().Show("", "warn", (string)FindResource("warningwindef_notification"));
}
}
diff --git a/.Source/GTweak/Windows/MainWindow.xaml b/.Source/GTweak/Windows/MainWindow.xaml
index 7c6f141a..10d988e4 100644
--- a/.Source/GTweak/Windows/MainWindow.xaml
+++ b/.Source/GTweak/Windows/MainWindow.xaml
@@ -319,13 +319,13 @@
<nav:ButtonNavigation Grid.Column="1" Style="{StaticResource BtnNavigation}" x:Name="BtnInterface" Content="{DynamicResource btn2_main}" Command="{Binding InterfaceCommand}"/>
- <nav:ButtonNavigation Grid.Column="2" Style="{StaticResource BtnNavigation}" x:Name="BtnApplication" Content="{DynamicResource btn3_main}" Command="{Binding ApplicationsCommand}"/>
+ <nav:ButtonNavigation Grid.Column="2" Style="{StaticResource BtnNavigation}" x:Name="BtnApplication" Content="{DynamicResource btn3_main}" Command="{Binding PakagesCommand}"/>
<nav:ButtonNavigation Grid.Column="3" Style="{StaticResource BtnNavigation}" x:Name="BtnServices" Content="{DynamicResource btn4_main}" Command="{Binding ServicesCommand}"/>
<nav:ButtonNavigation Grid.Column="4" Style="{StaticResource BtnNavigation}" x:Name="BtnSystem" Content="{DynamicResource btn5_main}" Command="{Binding SystemCommand}"/>
- <nav:ButtonNavigation Grid.Column="5" Style="{StaticResource BtnNavigation}" x:Name="BtnSystemInfo" Content="{DynamicResource btn6_main}" Command="{Binding InformationSystemCommand}"/>
+ <nav:ButtonNavigation Grid.Column="5" Style="{StaticResource BtnNavigation}" x:Name="BtnSystemInfo" Content="{DynamicResource btn6_main}" Command="{Binding DataSystemCommand}"/>
<nav:ButtonNavigation Grid.Column="6" Style="{StaticResource BtnNavigation}" x:Name="BtnMore" Content="{DynamicResource btn7_main}" Command="{Binding MoreCommand}" IsChecked="True">
<nav:ButtonNavigation.Resources>
diff --git a/.Source/GTweak/Windows/MainWindow.xaml.cs b/.Source/GTweak/Windows/MainWindow.xaml.cs
index 45765be0..c8f33481 100644
--- a/.Source/GTweak/Windows/MainWindow.xaml.cs
+++ b/.Source/GTweak/Windows/MainWindow.xaml.cs
@@ -90,7 +90,7 @@ namespace GTweak
this.Close();
break;
case true:
- new ViewNotification().Show("", (string)FindResource("title0_notification"), (string)FindResource("windefclose_notification"));
+ new ViewNotification().Show("", "warn", (string)FindResource("windefclose_notification"));
break;
}
}
diff --git a/.Source/GTweak/Windows/NotificationWindow.xaml.cs b/.Source/GTweak/Windows/NotificationWindow.xaml.cs
index 964ed271..cd4157db 100644
--- a/.Source/GTweak/Windows/NotificationWindow.xaml.cs
+++ b/.Source/GTweak/Windows/NotificationWindow.xaml.cs
@@ -17,10 +17,10 @@ namespace GTweak.Windows
private TimeSpan time = TimeSpan.FromSeconds(3);
private readonly MediaPlayer _mediaPlayer = new MediaPlayer();
- private string _action = string.Empty;
+ private string clickAction = string.Empty;
internal string TitleNotice { set => TitleSet.Text = value; get => TitleSet.Text; }
internal string TextNotice { set => TextSet.Text = value; get => TextSet.Text; }
- internal string ActionChoice { set => _action = value; get => _action; }
+ internal string ActionNotice { set => clickAction = value; get => clickAction; }
public NotificationWindow()
{
@@ -47,7 +47,7 @@ namespace GTweak.Windows
{
if (e.LeftButton == MouseButtonState.Pressed)
{
- switch (ActionChoice)
+ switch (ActionNotice)
{
case "logout":
Process.Start("logoff");
@@ -55,6 +55,7 @@ namespace GTweak.Windows
case "restart":
Process.Start("shutdown", "/r /t 0");
break;
+
}
}
}
@@ -68,19 +69,19 @@ namespace GTweak.Windows
_mediaPlayer.Play();
}
- switch (ActionChoice)
+ switch (ActionNotice)
{
case "logout":
if (TitleNotice == string.Empty || TextNotice == string.Empty)
{
- TitleNotice = (string)FindResource("title0_notification");
+ TitleNotice = (string)FindResource("title_warn_notification");
TextNotice = (string)FindResource("logout_notification");
}
break;
case "restart":
if (TitleNotice == string.Empty || TextNotice == string.Empty)
{
- TitleNotice = (string)FindResource("title0_notification");
+ TitleNotice = (string)FindResource("title_warn_notification");
TextNotice = (string)FindResource("restart_notification");
}
break;
diff --git a/.Source/GTweak/Windows/UpdateWindow.xaml.cs b/.Source/GTweak/Windows/UpdateWindow.xaml.cs
index 3bf046eb..3e58af9b 100644
--- a/.Source/GTweak/Windows/UpdateWindow.xaml.cs
+++ b/.Source/GTweak/Windows/UpdateWindow.xaml.cs
@@ -88,7 +88,7 @@ namespace GTweak.Windows
catch
{
this.Close();
- new ViewNotification().Show("", (string)FindResource("title0_notification"), (string)FindResource("warn_update_notification"));
+ new ViewNotification().Show("", "warn", (string)FindResource("warn_update_notification"));
}
}
}