mirror of
https://github.com/theitaliandeveloper/Perfect11.git
synced 2025-12-06 09:02:03 +00:00
A lot of things
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{F77922A2-B913-400E-8789-4867FD1BB351}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Perfect11.Inbox.Widgets</RootNamespace>
|
||||
<AssemblyName>Perfect11.Inbox.Widgets</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Tweak.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Perfect11.TweaksInterface\Perfect11.TweaksInterface.csproj">
|
||||
<Project>{b3f8761a-b4b2-4378-9fe8-06bbfc39fce6}</Project>
|
||||
<Name>Perfect11.TweaksInterface</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
33
tweaks/Perfect11.Inbox.Widgets/Properties/AssemblyInfo.cs
Normal file
33
tweaks/Perfect11.Inbox.Widgets/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Perfect11 Inbox Tweaks")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Vichingo455")]
|
||||
[assembly: AssemblyProduct("Perfect11")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025 Vichingo455")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f77922a2-b913-400e-8789-4867fd1bb351")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
tweaks/Perfect11.Inbox.Widgets/Tweak.cs
Normal file
71
tweaks/Perfect11.Inbox.Widgets/Tweak.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using Microsoft.Win32;
|
||||
using Perfect11.TweaksInterface;
|
||||
|
||||
namespace Perfect11.Inbox.Widgets
|
||||
{
|
||||
public class Tweak : IPlugin
|
||||
{
|
||||
public string Name => "Enable/Disable Widgets";
|
||||
public string Description => "Enable or Disable Windows 11 Widgets";
|
||||
public string Category => "Annoyances";
|
||||
|
||||
public string Execute()
|
||||
{
|
||||
bool Enabled()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var key = Registry.CurrentUser.OpenSubKey(
|
||||
@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"))
|
||||
{
|
||||
object value = key?.GetValue("TaskbarDa");
|
||||
if (value is int intValue)
|
||||
return intValue == 1;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return true;
|
||||
}
|
||||
if (Enabled())
|
||||
{
|
||||
using (var key = Registry.CurrentUser.CreateSubKey(
|
||||
@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"))
|
||||
{
|
||||
key?.SetValue("TaskbarDa", 0, RegistryValueKind.DWord);
|
||||
}
|
||||
using (var policyKey = Registry.LocalMachine.CreateSubKey(
|
||||
@"SOFTWARE\Policies\Microsoft\Dsh"))
|
||||
{
|
||||
policyKey?.SetValue("AllowNewsAndInterests", 0, RegistryValueKind.DWord);
|
||||
}
|
||||
using (var taskbarKey = Registry.CurrentUser.CreateSubKey(
|
||||
@"Software\Microsoft\Windows\CurrentVersion\Feeds"))
|
||||
{
|
||||
taskbarKey?.SetValue("ShellFeedsTaskbarViewMode", 2, RegistryValueKind.DWord);
|
||||
}
|
||||
return "Widgets have been disabled successfully! Please consider to restart File Explorer or log off and log back in for changes to apply.";
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var key = Registry.CurrentUser.CreateSubKey(
|
||||
@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"))
|
||||
{
|
||||
key?.SetValue("TaskbarDa", 1, RegistryValueKind.DWord);
|
||||
}
|
||||
|
||||
using (var policyKey = Registry.LocalMachine.CreateSubKey(
|
||||
@"SOFTWARE\Policies\Microsoft\Dsh"))
|
||||
{
|
||||
policyKey?.SetValue("AllowNewsAndInterests", 1, RegistryValueKind.DWord);
|
||||
}
|
||||
|
||||
using (var taskbarKey = Registry.CurrentUser.CreateSubKey(
|
||||
@"Software\Microsoft\Windows\CurrentVersion\Feeds"))
|
||||
{
|
||||
taskbarKey?.SetValue("ShellFeedsTaskbarViewMode", 0, RegistryValueKind.DWord);
|
||||
}
|
||||
return "Widgets have been enabled successfully! Please consider to restart File Explorer or log off and log back in for changes to apply.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user