Commit Bloatynosy 1.2

This commit is contained in:
Belim 2023-12-04 20:32:49 +01:00
parent 31808f2459
commit 37a2cc0841
94 changed files with 2565 additions and 3903 deletions

View File

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32210.238
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BloatyNosy", "BloatyNosy\BloatyNosy.csproj", "{44CAFCEB-0F6D-487F-9F5F-63F230DBB069}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bloatynosy", "Bloatynosy\Bloatynosy.csproj", "{44CAFCEB-0F6D-487F-9F5F-63F230DBB069}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -6,13 +6,14 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{44CAFCEB-0F6D-487F-9F5F-63F230DBB069}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>BloatyNosy</RootNamespace>
<AssemblyName>BloatyNosy</AssemblyName>
<RootNamespace>Bloatynosy</RootNamespace>
<AssemblyName>Bloatynosy</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@ -27,10 +28,9 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
@ -66,6 +66,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.VisualC" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@ -79,8 +81,8 @@
<ItemGroup>
<Compile Include="FeatureBase.cs" />
<Compile Include="FeatureNode.cs" />
<Compile Include="Features\Apps\StoreAppsPrivate.cs" />
<Compile Include="Features\Apps\StoreHallOfShame.cs" />
<Compile Include="Features\Bloatware\StoreAppsPrivate.cs" />
<Compile Include="Features\Bloatware\StoreHallOfShame.cs" />
<Compile Include="Features\Browser\GoogleChrome.cs" />
<Compile Include="Features\Browser\MicrosoftEdge.cs" />
<Compile Include="Features\Browser\MozillaFirefox.cs" />
@ -94,7 +96,6 @@
<Compile Include="Features\Explorer\HiddenFileExt.cs" />
<Compile Include="Features\Explorer\HiddenFileFolder.cs" />
<Compile Include="Features\Privacy\BackgroundApps.cs" />
<Compile Include="Features\Recommendation\EnableWSL.cs" />
<Compile Include="Features\Gaming\GameDVR.cs" />
<Compile Include="Features\Gaming\PowerThrottling.cs" />
<Compile Include="Features\Gaming\VisualFX.cs" />
@ -108,23 +109,26 @@
<Compile Include="Features\Privacy\TailoredExperiences.cs" />
<Compile Include="Features\Privacy\Telemetry.cs" />
<Compile Include="Features\Privacy\WindowsTips.cs" />
<Compile Include="Features\Apps\StoreApps.cs" />
<Compile Include="Features\Apps\StoreEngine.cs" />
<Compile Include="Features\Bloatware\StoreApps.cs" />
<Compile Include="Features\Bloatware\StoreEngine.cs" />
<Compile Include="Features\System\FaxPrinter.cs" />
<Compile Include="Features\System\FullContextMenus.cs" />
<Compile Include="Features\System\OneDriveR.cs" />
<Compile Include="Features\Bloatware\OneDriveR.cs" />
<Compile Include="Features\System\RemoveW11Watermark.cs" />
<Compile Include="Features\System\TeamsAutostart.cs" />
<Compile Include="Features\System\TPMCheck.cs" />
<Compile Include="Features\System\XPSWriter.cs" />
<Compile Include="Features\Taskbar\Copilot.cs" />
<Compile Include="Features\Taskbar\MostUsedApps.cs" />
<Compile Include="Features\Taskbar\StartmenuLayout.cs" />
<Compile Include="Features\Taskbar\StartmenuSearch.cs" />
<Compile Include="Features\Taskbar\TaskbarChat.cs" />
<Compile Include="Features\Taskbar\TaskbarSearch.cs" />
<Compile Include="Features\Taskbar\TaskView.cs" />
<Compile Include="Helpers\ErrorHelper.cs" />
<Compile Include="Helpers\HelperTool.cs" />
<Compile Include="Helpers\OsHelper.cs" />
<Compile Include="Helpers\ViewHelper.cs" />
<Compile Include="ITreeNode.cs" />
<Compile Include="Helpers\RegistryHelper.cs" />
<Compile Include="MainForm.cs">
@ -136,19 +140,17 @@
<Compile Include="Modules\Setup\Pages.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Views\AppsPageView.cs">
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Github.cs" />
<Compile Include="Views\BloatyPageView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Views\AppsPageView.Designer.cs">
<DependentUpon>AppsPageView.cs</DependentUpon>
</Compile>
<Compile Include="Modules\WinModder\ModsParser.cs" />
<Compile Include="Modules\WinModder\ModsManifest.cs" />
<Compile Include="Views\ModsPageView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Views\ModsPageView.Designer.cs">
<DependentUpon>ModsPageView.cs</DependentUpon>
<Compile Include="Views\BloatyPageView.Designer.cs">
<DependentUpon>BloatyPageView.cs</DependentUpon>
</Compile>
<Compile Include="Views\PackagesPageView.cs">
<SubType>UserControl</SubType>
@ -157,17 +159,17 @@
<DependentUpon>PackagesPageView.cs</DependentUpon>
</Compile>
<Compile Include="Helpers\WindowsHelper.cs" />
<Compile Include="Views\IModsPageView.cs">
<Compile Include="Views\NosyPageView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Views\IModsPageView.Designer.cs">
<DependentUpon>IModsPageView.cs</DependentUpon>
<Compile Include="Views\NosyPageView.Designer.cs">
<DependentUpon>NosyPageView.cs</DependentUpon>
</Compile>
<Compile Include="Views\SetupPageView.cs">
<Compile Include="Views\WizardPageView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Views\SetupPageView.Designer.cs">
<DependentUpon>SetupPageView.cs</DependentUpon>
<Compile Include="Views\WizardPageView.Designer.cs">
<DependentUpon>WizardPageView.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
@ -175,28 +177,20 @@
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="Views\AppsPageView.resx">
<DependentUpon>AppsPageView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Views\ModsPageView.resx">
<DependentUpon>ModsPageView.cs</DependentUpon>
<EmbeddedResource Include="Views\BloatyPageView.resx">
<DependentUpon>BloatyPageView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Views\PackagesPageView.resx">
<DependentUpon>PackagesPageView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Views\IModsPageView.resx">
<DependentUpon>IModsPageView.cs</DependentUpon>
<EmbeddedResource Include="Views\NosyPageView.resx">
<DependentUpon>NosyPageView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Views\SetupPageView.resx">
<DependentUpon>SetupPageView.cs</DependentUpon>
<EmbeddedResource Include="Views\WizardPageView.resx">
<DependentUpon>WizardPageView.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="Properties\Settings.settings">
@ -228,6 +222,5 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory />
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />

View File

@ -1,7 +1,13 @@
namespace Features.Feature
using Bloatynosy;
using System.Threading.Tasks;
namespace Features.Feature
{
public abstract class FeatureBase
{
private static readonly ErrorHelper logger = ErrorHelper.Instance;
public string ScriptFilePath { get; set; } // Path to Powershell plugins directory
/// <summary>
/// Name of Feature
/// </summary>
@ -9,7 +15,7 @@
public abstract string ID();
/// <summary>
/// Tooltip text of sssessments
/// Description of Feature
/// </summary>
/// <returns>The feature tooltip</returns>
public abstract string Info();
@ -31,5 +37,15 @@
/// </summary>
/// <returns>Returns true if the feature was successfull, false otherwise.</returns>
public abstract bool UndoFeature();
public virtual bool LoadScriptFile()
{
// Check if the script file path is set for the feature
if (!string.IsNullOrEmpty(ScriptFilePath))
{
}
return false; // Return false if no script file path is set for the feature
}
}
}

View File

@ -1,17 +1,28 @@
using System.Windows.Forms;
using Bloatynosy;
using System;
using System.Windows.Forms;
namespace Features.Feature
{
internal class FeatureNode : TreeNode
{
public FeatureBase Feature { get; }
public string ScriptFilePath { get; set; } // Path to the external script file
public FeatureNode(FeatureBase feature)
{
Feature = feature;
Text = Feature.ID();
ToolTipText = Feature.Info();
Checked = true;
ScriptFilePath = ""; // Initialize the script file path
}
public string GetFeatureInfo()
{
return Feature.Info();
}
}
}

View File

@ -1,76 +0,0 @@
using System.Collections.Generic;
namespace BloatyNosy
{
public static class BloatwareList
{
// Our Windows 11 bloatware list
public static IEnumerable<string> GetList()
{
var apps = new List<string>
{
"2FE3CB00.PICSART-PHOTOSTUDIO",
"4DF9E0F8.Netflix",
"5319275A.WhatsAppDesktop",
"9E2F88E3.TWITTER",
"NAVER.LINEwin8_8ptj331gd3tyt",
"SpotifyAB.SpotifyMusic",
"king.com.CandyCrushFriends",
"king.com.CandyCrushSaga",
"king.com.FarmHeroesSaga",
"22364Disney.ESPNBetaPWA",
"5A894077.McAfeeSecurity",
"AdobeSystemsIncorporated.AdobeCreativeCloudExpress",
"AmazonVideo.PrimeVideo",
"AppUp.IntelGraphicsExperience",
"B9ECED6F.ASUSPCAssistant",
"B9ECED6F.ScreenPadMaster",
"BytedancePte.Ltd.TikTok",
"Clipchamp.Clipchamp",
"DTSInc.DTSAudioProcess",
"FACEBOOK.317180B0BB486",
"Facebook.InstagramBeta",
"AdobeSystemsIncorporated.AdobeLightroom",
"AdobeSystemsIncorporated.AdobePhotoshopExpress",
"Clipchamp.Clipchamp_yxz26nhyzhsrt",
"CorelCorporation.PaintShopPro",
"FACEBOOK.317180B0BB486",
"Facebook.InstagramBeta",
"AD2F1837.HPJumpStarts",
"AD2F1837.HPPCHardwareDiagnosticsWindows",
"AD2F1837.HPPowerManager",
"AD2F1837.HPPrivacySettings",
"AD2F1837.HPSupportAssistant",
"AD2F1837.HPSureShieldAI",
"AD2F1837.HPSystemInformation",
"AD2F1837.HPQuickDrop",
"AD2F1837.HPWorkWell",
"AD2F1837.myHP",
"AD2F1837.HPDesktopSupportUtilities",
"AD2F1837.HPQuickTouch",
"AD2F1837.HPEasyClean",
"AD2F1837.HPSystemInformation",
"Microsoft.549981C3F5F10",
"Microsoft.BingNews",
"Microsoft.BingWeather",
"Microsoft.GamingApp",
"Microsoft.Getstarted",
"Microsoft.Microsoft3DViewer",
"Microsoft.MicrosoftOfficeHub",
"Microsoft.MicrosoftSolitaireCollection",
"Microsoft.MicrosoftStickyNotes",
"Microsoft.MixedReality.Portal",
"Microsoft.Office.OneNote",
"Microsoft.OneDriveSync",
"Microsoft.OneConnect",
"Microsoft.People",
"Microsoft.Print3D",
"Microsoft.SkypeApp",
"Microsoft.Wallet",
"Microsoft.WindowsSoundRecorder"
};
return apps;
}
}
}

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
namespace Features.Feature.Browser
@ -17,7 +17,8 @@ namespace Features.Feature.Browser
public override string Info()
{
return "";
return "This policy may lead to the following behavior in Chrome Browser:\r\nManaged by your organization, your browser is managed." +
"\r\nThe changes can be reverted at any time.";
}
public override bool CheckFeature()

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
namespace Features.Feature.Browser
@ -17,7 +17,8 @@ namespace Features.Feature.Browser
public override string Info()
{
return "";
return "This policy may lead to the following behavior in Edge Browser:\r\nManaged by your organization, your browser is managed." +
"\r\nThe changes can be reverted at any time.";
}
public override bool CheckFeature()

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
namespace Features.Feature.Browser
@ -17,7 +17,8 @@ namespace Features.Feature.Browser
public override string Info()
{
return "";
return "This policy may lead to the following behavior in Firefox Browser:\r\nManaged by your organization, your browser is managed." +
"\r\nThe changes can be reverted at any time.";
}
public override bool CheckFeature()

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
namespace Features.Feature.Desktop
@ -36,7 +36,7 @@ namespace Features.Feature.Desktop
logger.Log("- Apps dark theme has been successfully enabled.");
logger.Log(keyName);
logger.Log("\n\nDark theme will also be enabled for BloatyNosy.\nPlease restart the app for the changes to take effect.");
logger.Log("\n\nDark theme will also be enabled for Bloatynosy.\nPlease restart the app for the changes to take effect.");
return true;
}

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
namespace Features.Feature.Desktop

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using System;
using System.Diagnostics;
using System.IO;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
namespace Features.Feature.Desktop

View File

@ -1,61 +0,0 @@
using BloatyNosy;
using Microsoft.Win32;
namespace Features.Feature.Explorer
{
internal class FileExplorer : FeatureBase
{
private static readonly ErrorHelper logger = ErrorHelper.Instance;
private const string keyName = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked";
public override string ID()
{
return "[LOW] Enable Windows 10 File Explorer";
}
public override string Info()
{
return "";
}
public override bool CheckFeature()
{
return !(
RegistryHelper.StringEquals(keyName, "{e2bf9676-5f8f-435c-97eb-11607a5bedf7}", "")
);
}
public override bool DoFeature()
{
try
{
Registry.SetValue(keyName, "{e2bf9676-5f8f-435c-97eb-11607a5bedf7}", "", RegistryValueKind.String);
logger.Log("- Windows 10 File Explorer has been successfully enabled.\nRestart is required for the changes to take effect!");
logger.Log(keyName);
return true;
}
catch
{ }
return false;
}
public override bool UndoFeature()
{
try
{
var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked", true);
RegKey.DeleteValue("{e2bf9676-5f8f-435c-97eb-11607a5bedf7}");
logger.Log("+ Windows 10 File Explorer has been successfully disabled.\nRestart is required for the changes to take effect!");
return true;
}
catch
{ }
return false;
}
}
}

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
namespace Features.Feature.Gaming

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
namespace Features.Feature.Gaming

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,61 +0,0 @@
using BloatyNosy;
using Microsoft.Win32;
using System;
namespace Features.Feature.Privacy
{
internal class Biometrics : FeatureBase
{
private static readonly ErrorHelper logger = ErrorHelper.Instance;
private const string keyName = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Biometrics";
private const int desiredValue = 0;
public override string ID()
{
return "[LOW] Disable Windows Hello Biometrics";
}
public override string Info()
{
return "Windows Hello biometrics lets you sign in to your devices, apps, online services, and networks using your face, iris, or fingerprint.";
}
public override bool CheckFeature()
{
return !(
RegistryHelper.IntEquals(keyName, "Enabled", desiredValue)
);
}
public override bool DoFeature()
{
try
{
Registry.SetValue(keyName, "Enabled", desiredValue, RegistryValueKind.DWord);
logger.Log("- Windows Hello Biometrics has been successfully disabled.");
logger.Log(keyName);
return true;
}
catch (Exception ex)
{ logger.Log("Could not disable Windows Hello Biometrics {0}", ex.Message); }
return false;
}
public override bool UndoFeature()
{
try
{
Registry.SetValue(keyName, "Enabled", 1, RegistryValueKind.DWord);
logger.Log("- Windows Hello Biometrics has been successfully enabled.");
return true;
}
catch
{ }
return false;
}
}
}

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,68 +0,0 @@
using BloatyNosy;
using System.Management.Automation;
namespace Features.Feature.Recommendation
{
internal class EnableWSL : FeatureBase
{
private static readonly ErrorHelper logger = ErrorHelper.Instance;
public override string ID()
{
return "[LOW] We've recommend enabling Microsoft Windows Subsystem for Linux";
}
public override string Info()
{
return "";
}
public override bool CheckFeature()
{
string script = "Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux";
PowerShell powerShell = PowerShell.Create();
powerShell.AddScript(script);
var results = powerShell.Invoke();
foreach (var item in results)
{
var Status = item.Members["State"].Value;
if (Status.ToString() == "Enabled")
{
logger.Log("Problem on Features: [SOLVED] We found a recommended feature on your system \"Microsoft Windows Subsystem for Linux\"");
return false;
}
}
//logger.Log("Microsoft Windows Subsystem for Linux is disabled.");
return true;
}
public override bool DoFeature()
{
string script = "Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux";
PowerShell powerShell = PowerShell.Create();
powerShell.AddScript(script);
powerShell.Invoke();
logger.Log("+ Microsoft Windows Subsystem for Linux has been successfully enabled.");
return true;
}
public override bool UndoFeature()
{
string script = "Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux";
PowerShell powerShell = PowerShell.Create();
powerShell.AddScript(script);
powerShell.Invoke();
logger.Log("- Microsoft Windows Subsystem for Linux has been successfully disabled.");
return true;
}
}
}

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using System.Management.Automation;
namespace Features.Feature.System

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
namespace Features.Feature.System

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using System.Management.Automation;
namespace Features.Feature.System

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,4 +1,4 @@
using BloatyNosy;
using Bloatynosy;
using Microsoft.Win32;
using System;

View File

@ -1,27 +1,30 @@
using System;
using System.Windows.Forms;
namespace BloatyNosy
{
namespace Bloatynosy
{
internal class ErrorHelper
{
private static readonly ErrorHelper instance = new ErrorHelper();
private static RichTextBox target = null;
private ErrorHelper() { } // Private constructor to prevent external instantiation
// Errorlogger to target richLog
public void SetTarget(RichTextBox richText)
{
target = richText;
target = richText;
}
public void Log(string format, params object[] args)
{
format += "\r\n";
format += "\r\n";
try
{
if (target.InvokeRequired)
if (target.InvokeRequired)
{
target.Invoke(new Action(() => target.AppendText(string.Format(format, args))));
target.Invoke(new Action(() => target.AppendText(string.Format(format, args))));
}
else
{
@ -31,9 +34,25 @@ namespace BloatyNosy
catch { }
}
public void ClearLog()
{
try
{
if (target.InvokeRequired)
{
target.Invoke(new Action(() => target.Clear()));
}
else
{
target.Clear();
}
}
catch { }
}
public static ErrorHelper Instance
{
get => new ErrorHelper();
get => instance;
}
}
}
}

View File

@ -1,35 +1,36 @@
using BloatyNosy;
using Bloatynosy;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Windows.Forms;
using static System.Net.WebRequestMethods;
namespace HelperTool
{
internal class Utils
{
private static readonly ErrorHelper logger = ErrorHelper.Instance;
private static readonly ErrorHelper logger = ErrorHelper.Instance;
public static readonly string TweetIntent = "https://twitter.com/intent/tweet?text=Try%20the%20new%20next%20Gen-Debloat%20App%20%23BloatyNosy%20for%20Windows%2011%0a%0ahttps://www.builtbybel.com/blog/about-debloos";
public static readonly string TweetIntent = "https://twitter.com/intent/tweet?text=Try%20the%20new%20next%20Gen-Debloat%20App%20%23Bloatynosy%20for%20Windows%2011%0a%0ahttps://www.builtbybel.com/blog/about-debloos";
public static class Uri
{
public const string URL_ASSEMBLY = "https://raw.githubusercontent.com/builtbybel/BloatyNosy/main/src/BloatyNosy/Properties/AssemblyInfo.cs";
public const string URL_ASSEMBLY = "https://raw.githubusercontent.com/builtbybel/Bloatynosy/main/src/Bloatynosy/Properties/AssemblyInfo.cs";
public const string URL_TWITTER = "https://twitter.com/builtbybel";
public const string URL_BUILTBYBEL = "https://www.builtbybel.com";
public const string URL_DONATE = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donate@builtbybel.com&lc=US&item_name=%20Builtbybel&no_note=0&cn=&currency_code=USD&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted";
public const string URL_GITREPO = "https://github.com/builtbybel/BloatyNosy";
public const string URL_GITREPO = "https://github.com/builtbybel/Bloatynosy";
public const string URL_GITLATEST = URL_GITREPO + "/releases/latest";
public const string URL_HELP = "https://www.builtbybel.com/blog/about-debloos";
public const string URL_HELP = "https://www.reddit.com/search/?q=bloatynosy&type=comment&sort=new";
}
public static class Paths
{
public static string SysDir = Path.GetPathRoot(Environment.SystemDirectory);
public static string LocalAppDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
public static string SysDir = Path.GetPathRoot(Environment.SystemDirectory);
public static string LocalAppDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
public static string ProgramFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
public static string ShellWT = LocalAppDataDir +
@ -39,7 +40,7 @@ namespace HelperTool
@"Windows\System32\cmd.exe";
public static string ShellPS = SysDir +
@"Windows\System32\WindowsPowerShell\v1.0\powershell.exe";
@"Windows\System32\WindowsPowerShell\v1.0\powershell.exe";
}
public static class Data
@ -47,8 +48,8 @@ namespace HelperTool
public static string DataRootDir = Application.StartupPath +
@"\app\";
public static string ModsRootDir = Application.StartupPath +
@"\mods\";
public static string PluginsRootDir = Application.StartupPath +
@"\plugins\";
}
// Create data directory if non present
@ -59,13 +60,6 @@ namespace HelperTool
Directory.CreateDirectory(@"app");
}
// Create mods directory if non present
public static void CreateModsDir()
{
bool dirExists = Directory.Exists(@"mods");
if (!dirExists)
Directory.CreateDirectory(@"mods");
}
// Launch Urls in richText control
public static void LaunchUri(string url)
@ -107,8 +101,8 @@ namespace HelperTool
Program.GetCurrentVersionTostring())
{
if (MessageBox.Show($"App version {latestVersion} available.\nDo you want to open the Download page?", "App update available", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
Process.Start(HelperTool.Utils.Uri.URL_GITLATEST);
if (MessageBox.Show($"App version {latestVersion} available.\nDo you want to open the Download page?", "App update available", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
Process.Start(HelperTool.Utils.Uri.URL_GITLATEST);
}
}
catch (Exception ex)
@ -118,7 +112,7 @@ namespace HelperTool
}
else if (IsInet() == false)
{
MessageBox.Show ( $"Problem on Internet connection: Checking for App updates failed");
MessageBox.Show($"Problem on Internet connection: Checking for App updates failed");
}
}

View File

@ -2,7 +2,7 @@
using System;
using System.Windows.Forms;
namespace BloatyNosy
namespace Bloatynosy
{
// Check whether registry values equal
internal class RegistryHelper

View File

@ -2,8 +2,10 @@
using System.Diagnostics;
using System.Globalization;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BloatyNosy
namespace Bloatynosy
{
public static class WindowsHelper
{
@ -70,5 +72,32 @@ namespace BloatyNosy
ProcStart(HelperTool.Utils.Paths.ShellPS, $"-command \"Set-Service -Name {service} -StartupType auto\"");
logger.Log($"Enable {service} service");
}
public static async Task RunPowerShellScript(string scriptFilePath)
{
try
{
var startInfo = new ProcessStartInfo()
{
FileName = "powershell.exe",
UseShellExecute = false,
WindowStyle = ProcessWindowStyle.Normal,
Arguments = $"-executionpolicy bypass -file \"{scriptFilePath}\"",
CreateNoWindow = false, // Show the console window
};
using (var process = Process.Start(startInfo))
{
if (process != null)
{
await Task.Run(() => process.WaitForExit());
}
}
}
catch (Exception ex)
{
MessageBox.Show($"Error running PowerShell plugin: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}

View File

@ -2,10 +2,11 @@
using System.Collections.Generic;
using System.Windows.Forms;
namespace BloatyNosy.ITreeNode
namespace Bloatynosy.ITreeNode
{
public static class ITreeNode
{
// Traverse tree and yields checked nodes
public static IEnumerable<TreeNode> All(this TreeNodeCollection nodes)
{
if (nodes == null) throw new ArgumentNullException(nameof(nodes));

File diff suppressed because it is too large Load Diff

View File

@ -1,608 +1,145 @@
using BloatyNosy.ITreeNode;
using Features.Feature;
using Bloatynosy.Views;
using HelperTool;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BloatyNosy
namespace Bloatynosy
{
public partial class MainForm : Form
{
public Control INavPage;
private int progression = 0;
private int progressionIncrease = 0;
private static readonly ErrorHelper logger = ErrorHelper.Instance;
private bool switchMode = true;
private Stargazers github;
// Declare nosyPage field
private NosyPageView nosyPage;
public MainForm()
=> InitializeComponent();
{
InitializeComponent();
// Initialize NosyPageView
nosyPage = new NosyPageView(this);
// Fetch Github Stargazers
github = new Stargazers();
github.StargazersCountFetched += (sender, count) =>
{
if (count >= 0)
lnkStargazers.Text = $"{count} Stars on Github";
else
lnkStargazers.Text = "Error fetching stargazers";
};
}
private void MainForm_Load(object sender, EventArgs e)
{
// Stargazers link Event listener
lnkStargazers_LinkClicked(lnkStargazers, new LinkLabelLinkClickedEventArgs(lnkStargazers.Links[0]));
}
private void MainForm_Shown(object sender, EventArgs e)
{
_lblAssembly.Text = "Version " + Program.GetCurrentVersionTostring();
this.AddDefaultFeatures();
this.AddMoreApps();
this.Piglet1();
// Refer to instance NosyPageView
pnlMain.Controls.Add(nosyPage);
nosyPage.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom);
nosyPage.Dock = DockStyle.Fill;
// Refer Main and default NavPage
ViewHelper.SwitchView.INavPage = pnlForm.Controls[0];
ViewHelper.SwitchView.mainForm = this;
// Get versioning
checkVersion.Text = GetMinorVersion(Program.GetCurrentVersionTostring());
// Load styling
this.SetStyle();
}
private void SetStyle()
{
btnKebapMenu.Text = "\u22ee";
btnBack.Text = "\uE72B";
// Segoe MDL2 Assets
btnGithub.Text += "\uEB52";
// Some color styling
BackColor = Color.FromArgb(243, 243, 243);
pnlRight.BackColor =
pnlRightSettings.BackColor = Color.White;
BackColor =
tvwFeatures.BackColor =
rtbLog.BackColor =
Color.FromArgb(239, 239, 247);
logger.SetTarget(rtbLog); // Log messages to target richLog
INavPage = pnlForm.Controls[0]; // Set default NavPage
// Ref. SplitterContainer scaling bugs in .Net https://github.com/dotnet/winforms/issues/3168 OBSOLETE!
// this.sc.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
// Border
border.FlatAppearance.MouseOverBackColor = border.BackColor;
border.BackColorChanged += (s, e) =>
public bool CheckIgnoreLowIssuesChecked
{
get { return checkIgnoreLowIssues.Checked; }
}
private void checkIgnoreLowIssues_CheckedChanged(object sender, EventArgs e)
{
if (checkIgnoreLowIssues.Checked)
{
border.FlatAppearance.MouseOverBackColor = border.BackColor;
};
// Background Tile
if (!HelperTool.Utils.IsInet())
{ lblInetCheck.Visible = true; }
else
pbBackground.ImageLocation = "https://github.com/builtbybel/BloatyNosy/blob/main/assets/BackgroundImage.png?raw=true";
}
public void SetView(Control View)
{
var control = View as Control;
control.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom);
control.Dock = DockStyle.Fill;
INavPage.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom);
INavPage.Dock = DockStyle.Fill;
pnlForm.Controls.Clear();
pnlForm.Controls.Add(View);
}
private void AddMoreApps()
{
cmbTools.Items.Add("BloatPilot");
cmbTools.Items.Add("WinModder");
cmbTools.Items.Add("InstaPackage");
cmbTools.Items.Insert(0, "Find more apps");
cmbTools.SelectedIndex = 0;
}
private void Piglet1()
{
cbProfiles.Items.Clear();
cbProfiles.Items.Insert(0, "Select profile");
cbProfiles.SelectedIndex = 0;
try
{
string[] files = Directory.GetFiles(HelperTool.Utils.Data.DataRootDir, "*.bloos");
cbProfiles.Items.AddRange(files.Select((string filePath) => Path.GetFileNameWithoutExtension(filePath)).ToArray());
}
catch { cbProfiles.Text = "No profiles found."; }
}
/// <summary>
/// Register some more Tools
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cmbTools_SelectedIndexChanged(object sender, EventArgs e)
{
string message = Convert.ToString(cmbTools.SelectedItem);
string[] keys = new string[] { "Package", "Bloat", "Mod" };
string sKeyResult = keys.FirstOrDefault<string>(s => message.Contains(s));
switch (sKeyResult)
{
case "Package":
this.SetView(new PackagesPageView()); // Packages > InstaPackages view
break;
case "Bloat":
try
{ this.SetView(new AppsPageView()); } // In-box apps > BloatPilot view
catch { MessageBox.Show("To use this feature, the application needs to be extracted from the archive.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); }
break;
case "Mod":
this.SetView(new ModsPageView()); // Mods > WinModder view
break;
default:
break;
nosyPage.SelectFeatureNodes(nosyPage.tvwFeatures.Nodes, true);
}
}
private void lnkRunSetup_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> this.SetView(new SetupPageView(this)); // Mods > Setup view
public void AddDefaultFeatures()
private string GetMinorVersion(string version)
{
tvwFeatures.Nodes.Clear();
tvwFeatures.BeginUpdate();
// Root node
TreeNode root = new TreeNode("Potential issues on Windows 11 " + OsHelper.GetVersion())
// Display everything until the second dot without the dot
int secondDotIndex = version.IndexOf('.', version.IndexOf('.') + 1);
if (secondDotIndex != -1)
{
Checked = true,
};
TreeNode browser = new TreeNode("Browser", new TreeNode[] {
new FeatureNode(new Features.Feature.Browser.EdgeBingAIButton()),
new FeatureNode(new Features.Feature.Browser.ChromeTelemetry()),
new FeatureNode(new Features.Feature.Browser.FirefoxTelemetry()),
})
{
Checked = true,
};
TreeNode explorer = new TreeNode("Explorer", new TreeNode[] {
new FeatureNode(new Features.Feature.Explorer.HiddenFileFolder()),
new FeatureNode(new Features.Feature.Explorer.HiddenFileExt()),
})
{
Checked = true,
};
TreeNode desktop = new TreeNode("Desktop", new System.Windows.Forms.TreeNode[] {
new FeatureNode(new Features.Feature.Desktop.AppsTheme()),
new FeatureNode(new Features.Feature.Desktop.WindowsTheme()),
new FeatureNode(new Features.Feature.Desktop.Transparency()),
new FeatureNode(new Features.Feature.Desktop.SnapAssistFlyout()),
new FeatureNode(new Features.Feature.Desktop.Widgets()),
new FeatureNode(new Features.Feature.Desktop.WidgetsRemove()),
new FeatureNode(new Features.Feature.Desktop.Stickers()),
})
{
Checked = true,
};
TreeNode taskbar = new TreeNode("Taskbar and Start menu", new System.Windows.Forms.TreeNode[] {
new FeatureNode(new Features.Feature.Taskbar.TaskbarSearch()),
new FeatureNode(new Features.Feature.Taskbar.TaskbarChat()),
new FeatureNode(new Features.Feature.Taskbar.TaskView()),
new FeatureNode(new Features.Feature.Taskbar.MostUsedApps()),
new FeatureNode(new Features.Feature.Taskbar.StartmenuLayout()),
})
{
Checked = true,
};
TreeNode system = new TreeNode("System", new System.Windows.Forms.TreeNode[] {
new FeatureNode(new Features.Feature.System.FullContextMenus()),
new FeatureNode(new Features.Feature.System.RemoveW11Watermark()),
new FeatureNode(new Features.Feature.System.TeamsAutostart()),
new FeatureNode(new Features.Feature.System.Fax()),
new FeatureNode(new Features.Feature.System.XPSWriter()),
new FeatureNode(new Features.Feature.System.TPMCheck()),
new FeatureNode(new Features.Feature.System.OneDriveRemove()),
})
{
Checked = true,
};
TreeNode gaming = new TreeNode("Gaming", new TreeNode[] {
new FeatureNode(new Features.Feature.Gaming.GameDVR()),
new FeatureNode(new Features.Feature.Gaming.PowerThrottling()),
new FeatureNode(new Features.Feature.Gaming.VisualFX()),
})
{
Checked = true,
};
TreeNode privacy = new TreeNode("Privacy", new TreeNode[] {
new FeatureNode(new Features.Feature.Privacy.DiagnosticData()),
new FeatureNode(new Features.Feature.Privacy.Telemetry()),
new FeatureNode(new Features.Feature.Privacy.CompatibilityTelemetry()),
new FeatureNode(new Features.Feature.Privacy.LocationTracking()),
new FeatureNode(new Features.Feature.Privacy.Advertising()),
new FeatureNode(new Features.Feature.Privacy.Feedback()),
new FeatureNode(new Features.Feature.Privacy.SuggestedContent()),
new FeatureNode(new Features.Feature.Privacy.AppsAutoInstall()),
new FeatureNode(new Features.Feature.Privacy.WindowsTips()),
new FeatureNode(new Features.Feature.Privacy.TailoredExperiences()),
new FeatureNode(new Features.Feature.Privacy.BackgroundApps()),
})
{
Checked = true
};
TreeNode components = new TreeNode("Feature Recommendation", new TreeNode[] {
new FeatureNode(new Features.Feature.Recommendation.EnableWSL()),
})
{
Checked = true,
};
TreeNode apps = new TreeNode("Bloatware (from Microsoft, ASUS, Adobe, HP, Meta etc.)", new TreeNode[] {
new FeatureNode(new Features.Feature.Apps.StoreApps()),
new FeatureNode(new Features.Feature.Apps.StoreAppsPrivate()),
})
{
Checked = true,
};
root.Nodes.AddRange(new TreeNode[]
{
browser,
explorer,
desktop,
taskbar,
system,
gaming,
privacy,
components,
apps,
});
tvwFeatures.Nodes.Add(root);
// Some tvw nicety
foreach (TreeNode tn in tvwFeatures.Nodes) { tn.Expand(); }
tvwFeatures.Nodes[0].NodeFont = new Font(tvwFeatures.Font, FontStyle.Bold);
tvwFeatures.EndUpdate();
}
private async void btnAnalyze_Click(object sender, EventArgs e)
{
Reset();
btnAnalyze.Enabled = false;
int performFeaturesCount = 0;
List<FeatureNode> selectedFeatures = CollectFeatureNodes();
foreach (FeatureNode node in selectedFeatures)
{
var feature = node.Feature;
ConfiguredTaskAwaitable<bool> analyzeTask = Task<bool>.Factory.StartNew(() => feature.CheckFeature()).ConfigureAwait(true);
// logger.Log("Check {0}", node.Text);
bool shouldPerform = await analyzeTask;
lnkStatus.Text = "Check " + feature.ID();
if (menuIgnoreLowLevelI.Checked == true)
if (shouldPerform & !node.Text.Contains("LOW"))
{
logger.Log("Problem on " + node.Parent.Text + ": " + feature.ID());
//logger.Log("- {0}", node.Text);
performFeaturesCount += 1;
node.ForeColor = Color.MediumVioletRed;
}
else
{
node.Checked = false; // Uncheck all fixed
node.ForeColor = Color.Gray;
//logger.Log("Problem fixed: {0}", node.Text);
}
else if (shouldPerform)
{
logger.Log("Problem on " + node.Parent.Text + ": " + feature.ID());
performFeaturesCount += 1;
node.ForeColor = Color.MediumVioletRed;
}
else
{
node.Checked = false;
node.ForeColor = Color.Gray;
}
version = version.Substring(0, secondDotIndex);
}
tvwFeatures.ExpandAll();
tvwFeatures.SelectedNode = tvwFeatures.Nodes[0];
DoProgress(100);
StringBuilder sum = new StringBuilder();
sum.Append(Environment.NewLine);
sum.Append("======= Summary =======\n");
sum.Append($"We've checked {selectedFeatures.Count} features of your Windows 11 installation.\r\n");
sum.Append($"We like {selectedFeatures.Count - performFeaturesCount} of these features (no need for action).\r\n");
sum.Append($"We recommend to disable {performFeaturesCount} of these features (click above link to view details).\r\n");
logger.Log(sum.ToString(), ""); btnAnalyze.Enabled = true; switchMode = false;
lnkStatus.Text = $"There are {performFeaturesCount} features which require your attention (click for details).\r\n";
return $"Version {version}";
}
private void SelectFeatureNodes(TreeNodeCollection trNodeCollection, bool isCheck)
// Switch between minor and full app version
private void checkVersion_CheckedChanged(object sender, EventArgs e)
{
foreach (TreeNode trNode in trNodeCollection)
// Get full version
string fullVersion = Program.GetCurrentVersionTostring();
// Display version based on the CheckBox state
checkVersion.Text = checkVersion.Checked ? fullVersion : GetMinorVersion(fullVersion);
// Optionally, check for updates when checked
if (checkVersion.Checked)
{
trNode.Checked = isCheck;
if (trNode.Nodes.Count > 0)
SelectFeatureNodes(trNode.Nodes, isCheck);
HelperTool.Utils.CheckForUpdates();
}
}
private List<FeatureNode> CollectFeatureNodes()
{
List<FeatureNode> selectedFeatures = new List<FeatureNode>();
foreach (TreeNode treeNode in tvwFeatures.Nodes.All())
{
if (treeNode.Checked && treeNode.GetType() == typeof(FeatureNode))
{
selectedFeatures.Add((FeatureNode)treeNode);
}
}
progressionIncrease = (int)Math.Floor(100.0f / selectedFeatures.Count);
return selectedFeatures;
}
private void ResetColorNode(TreeNodeCollection nodes, Color Color)
{
foreach (System.Windows.Forms.TreeNode child in nodes)
{
child.BackColor = Color;
if (child.Nodes != null && child.Nodes.Count > 0)
ResetColorNode(child.Nodes, Color);
}
}
private void Reset()
{
progression = 0;
progressionIncrease = 0;
progress.Value = 0;
progress.Visible = true;
rtbLog.Visible = true;
rtbLog.Text = "";
}
private void DoProgress(int value)
{
progression = value;
progress.Value = progression;
}
private void IncrementProgress()
{
progression += progressionIncrease;
progress.Value = progression;
}
private async void ApplyFeatures(List<FeatureNode> treeNodes)
{
tvwFeatures.Enabled = false;
foreach (FeatureNode node in treeNodes)
{
var assessment = node.Feature;
ConfiguredTaskAwaitable<bool> performTask = Task<bool>.Factory.StartNew(() => assessment.DoFeature()).ConfigureAwait(true);
lnkStatus.Text = "Fixing " + node.Text;
var result = await performTask;
IncrementProgress();
}
DoProgress(100);
lnkStatus.Text = "Fixing complete (click for details).";
tvwFeatures.Enabled = true;
}
private async void UndoFeatures(List<FeatureNode> treeNodes)
{
tvwFeatures.Enabled = false;
foreach (FeatureNode node in treeNodes)
{
var assessment = node.Feature;
ConfiguredTaskAwaitable<bool> performTask = Task<bool>.Factory.StartNew(() => assessment.UndoFeature()).ConfigureAwait(true);
lnkStatus.Text = "Restore " + node.Text;
var result = await performTask;
IncrementProgress();
}
DoProgress(100);
lnkStatus.Text = "Undo complete (click for details).";
tvwFeatures.Enabled = true;
}
private void menuFix_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Do you want to apply selected fixes?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
{
Reset();
List<FeatureNode> performNodes = CollectFeatureNodes();
ApplyFeatures(performNodes);
}
}
private void menuRestore_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Do you want to restore selected fixes to Windows default state?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
{
Reset();
List<FeatureNode> performNodes = CollectFeatureNodes();
UndoFeatures(performNodes);
}
}
private void treeFeatures_AfterCheck(object sender, TreeViewEventArgs e)
{
tvwFeatures.BeginUpdate();
foreach (TreeNode child in e.Node.Nodes)
{
child.Checked = e.Node.Checked;
}
tvwFeatures.EndUpdate();
}
private void menuIgnoreLowLevelP_Click(object sender, EventArgs e)
{
menuIgnoreLowLevelI.Checked = !(menuIgnoreLowLevelI.Checked);
SelectFeatureNodes(tvwFeatures.Nodes, true);
}
private void richLog_LinkClicked(object sender, LinkClickedEventArgs e)
=> Utils.LaunchUri(e.LinkText);
private void btnAppOptions_Click(object sender, EventArgs e)
=> this.contextAppMenu.Show(Cursor.Position.X, Cursor.Position.Y);
private void lnkURLDev_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_BUILTBYBEL);
private void btnMenu_Click(object sender, EventArgs e)
=> this.contextKebapMenu.Show(Cursor.Position.X, Cursor.Position.Y);
private void menuLoadProfile_Click(object sender, EventArgs e)
{
string filePath = HelperTool.Utils.Data.DataRootDir + "\\" + cbProfiles.Text + ".bloos";
ResetColorNode(tvwFeatures.Nodes, Color.FromArgb(244, 241, 249));
SelectFeatureNodes(tvwFeatures.Nodes, false);
tvwFeatures.ExpandAll();
tvwFeatures.Nodes[0].EnsureVisible();
try
{
using (StreamReader reader = new StreamReader(filePath))
{
while (!reader.EndOfStream)
{
string line = reader.ReadLine();
foreach (System.Windows.Forms.TreeNode treeNode in tvwFeatures.Nodes.All())
{
if (treeNode.Text.Contains(line))
{
treeNode.BackColor = Color.Yellow;
treeNode.Checked = true;
tvwFeatures.SelectedNode = treeNode;
}
}
}
if (new FileInfo(filePath).Length == 0) logger.Log("- Empty configuration loaded.");
}
btnAnalyze.PerformClick();
logger.Log($"[{cbProfiles.Text} has been successfully loaded].\nWe have highlighted the configuration that would be enabled (no changes are done yet).");
}
catch { { MessageBox.Show("No profile selected."); } }
}
private void menuExportProfile_Click(object sender, EventArgs e)
{
SaveFileDialog f = new SaveFileDialog();
f.InitialDirectory = HelperTool.Utils.Data.DataRootDir;
f.FileName = "BloatyNosy-profile";
f.Filter = "BloatyNosy files *.bloos|*.bloos";
if (f.ShowDialog() == DialogResult.OK)
{
using (StreamWriter writer = new StreamWriter(f.OpenFile()))
{
foreach (TreeNode treeNode in tvwFeatures.Nodes.All())
{
if (!treeNode.Checked)
continue;
writer.WriteLine(String.Format("{0}", treeNode.Text));
}
writer.Close();
}
MessageBox.Show("Profile has been successfully exported.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void tvwFeatures_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
tvwFeatures.SelectedNode = tvwFeatures.GetNodeAt(e.X, e.Y);
// Configure .app-entries marked with asterix
if (tvwFeatures.SelectedNode != null && tvwFeatures.SelectedNode.Text.Contains("*"))
{
contextAppMenuOptions.Show(tvwFeatures, e.Location);
}
}
}
private void menuAppConfigure_Click(object sender, EventArgs e)
{
TreeNode tn = tvwFeatures.SelectedNode;
switch (tn.Text)
{
case "*[HIGH] Search and remove pre-installed bloatware apps automatically (Configure with a right-click)":
this.SetView(new AppsPageView()); // In-box apps > BloatPilot view
break;
case "*[LOW] Remove bloatware based on private signature (Configure with a right-click)":
Process.Start("notepad.exe", HelperTool.Utils.Data.DataRootDir + "bloaty.txt");
break;
default:
break;
}
}
private void btnBack_Click(object sender, EventArgs e)
{
if (rtbLog.Text == "")
rtbLog.Text = "Windows 11 is too bloaty & nosy and has some annoying features that just need to go. " +
"This app will scan your system and inform you which features it likes or dislikes in your configuration.\n\n" +
"Click on \"Analyze\" to scan your Windows 11 system for undesired configurations and features and make adjustments in one go.\n\n" +
"If you have any questions or need assistance, please visit the open-source repository of the app at ." + HelperTool.Utils.Uri.URL_GITREPO;
if (switchMode)
{
tvwFeatures.Visible = false;
rtbLog.Visible = true;
switchMode = false;
}
else
{
tvwFeatures.Visible = true;
tvwFeatures.BringToFront();
switchMode = true;
}
}
private void lnkStatus_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> btnBack.PerformClick();
private void lnkAppMediaGitHub_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_GITREPO);
private void lnkAppMediaTwitter_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
private void lnkURLTwitter_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_TWITTER);
private void lnkAppMediaHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
private void lnkURLReddit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_HELP);
private void lnkUpdateCheck_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> HelperTool.Utils.CheckForUpdates();
private void lnkAppMediaDonate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
private void lnkURLPayPal_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_DONATE);
private void btnGithub_Click(object sender, EventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_GITREPO);
private void btnMenuChevronDown_Click(object sender, EventArgs e)
=> this.contextMenuChevron.Show(Cursor.Position.X, Cursor.Position.Y);
private void btnAppBloatpilot_Click(object sender, EventArgs e)
=> ViewHelper.SwitchView.SetView(new BloatyPageView());
private void menuWizard_Click(object sender, EventArgs e)
=> ViewHelper.SwitchView.SetView(new WizardPageView(this));
private void menuPackages_Click(object sender, EventArgs e)
=> ViewHelper.SwitchView.SetView(new PackagesPageView());
private async void lnkStargazers_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
//e.Link.Visited = true;
await github.FetchStargazersAsync();
}
}
}

View File

@ -117,13 +117,16 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextKebapMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>14, 20</value>
</metadata>
<metadata name="contextAppMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>172, 17</value>
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>14, 20</value>
</metadata>
<metadata name="contextAppMenuOptions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>318, 17</value>
<metadata name="contextMenuChevron.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>70, 21</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>81</value>
</metadata>
</root>

View File

@ -1,4 +1,4 @@
namespace BloatyNosy.Setup
namespace Bloatynosy.Setup
{
public enum PageTitle
{

View File

@ -1,53 +0,0 @@
namespace BloatyNosy
{
internal class ModsManifest
{
public ModsParser ini;
public string Name { get; set; }
public override string ToString()
{
return Name;
}
public string DisplayName
{
get
{
return ini.ReadString("Info", "DisplayName");
}
}
public string AboutScript
{
get
{
return ini.ReadString("Info", "AboutScript");
}
}
public string Publisher
{
get
{
return ini.ReadString("Info", "Publisher");
}
}
public string ConditionScript
{
get
{
return ini.ReadString("Info", "ConditionScript");
}
}
public string ScriptLanguage
{
get
{
return ini.ReadString("Info", "ScriptLanguage");
}
}
}
}

View File

@ -1,60 +0,0 @@
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
namespace BloatyNosy
{
internal class ModsParser
{
private static FileInfo fi;
[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string Section, string Key, string Value, string FilePath);
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string Section, string Key, string Default, StringBuilder RetVal, int Size, string FilePath);
public string ReadString(string selection, string Key, string vDefault = "")
{
StringBuilder sb = new StringBuilder(1024);
// Get ini file
GetPrivateProfileString(selection, Key, vDefault, sb, 1024, fi.FullName);
return sb.ToString();
}
public List<string> ReadSelections()
{
List<string> temp = new List<string>();
string sLine = string.Empty;
if (!fi.Exists)
{
return temp;
}
using (StreamReader sr = new StreamReader(fi.FullName))
{
while (!sr.EndOfStream)
{
// Get and trim line
sLine = sr.ReadLine().Trim();
// Check for opening and closeing tags
if (sLine.StartsWith("[") && (sLine.EndsWith("]")))
{
// Add to collection
temp.Add(sLine.Substring(1, sLine.Length - 2));
}
}
sr.Close();
}
return temp;
}
public ModsParser(string Filename)
{
fi = new FileInfo(Filename);
}
}
}

View File

@ -1,7 +1,7 @@
using System;
using System.Windows.Forms;
namespace BloatyNosy
namespace Bloatynosy
{
internal static class Program
{
@ -21,7 +21,7 @@ namespace BloatyNosy
if (!HelperTool.OsHelper.IsWin11())
{
MessageBox.Show("You are running Bloaty&Nosy on a system older than Windows 11.\nBloatyNosy is limited to Windows 11 ONLY.", "OS not supported", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("You are running Bloaty&Nosy on a system older than Windows 11.\nBloatynosy is limited to Windows 11 ONLY.", "OS not supported", MessageBoxButtons.OK, MessageBoxIcon.Information);
Application.Exit();
}
else Application.Run(new MainForm());

View File

@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("BloatyNosy")]
[assembly: AssemblyDescription("The Powertoy")]
[assembly: AssemblyTitle("Bloatynosy")]
[assembly: AssemblyDescription("The real Windows 11 Copilot")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Builtbybel")]
[assembly: AssemblyProduct("BloatyNosy")]
[assembly: AssemblyProduct("Bloatynosy")]
[assembly: AssemblyCopyright("Copyright © 2023 Builtbybel")]
[assembly: AssemblyTrademark("Builtbybel")]
[assembly: AssemblyCulture("")]
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.20")]
[assembly: AssemblyFileVersion("1.1.20")]
[assembly: AssemblyVersion("1.2.12")]
[assembly: AssemblyFileVersion("1.2.12")]

View File

@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace BloatyNosy.Properties {
namespace Bloatynosy.Properties {
using System;
@ -39,7 +39,7 @@ namespace BloatyNosy.Properties {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BloatyNosy.Properties.Resources", typeof(Resources).Assembly);
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Bloatynosy.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;

View File

@ -118,7 +118,9 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="systemApps" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\systemApps.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>

View File

@ -8,11 +8,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace BloatyNosy.Properties {
namespace Bloatynosy.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

View File

@ -1,292 +0,0 @@
namespace BloatyNosy
{
partial class AboutPageView
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this._lblDev = new System.Windows.Forms.Label();
this._lblWith = new System.Windows.Forms.Label();
this._lblHeartFillEmoji = new System.Windows.Forms.Label();
this._lblAssembly = new System.Windows.Forms.Label();
this.lblAppMediaPayPal = new System.Windows.Forms.LinkLabel();
this.lblAppMediaTwitter = new System.Windows.Forms.LinkLabel();
this.lblAppMediaGitHub = new System.Windows.Forms.LinkLabel();
this._lblAppName = new System.Windows.Forms.Label();
this.btnBack = new System.Windows.Forms.Button();
this.lblHeader = new System.Windows.Forms.Label();
this._lblAboutInfo = new System.Windows.Forms.Label();
this.btnAppMediaTweetIntent = new System.Windows.Forms.Button();
this.lnkUpdateAvailable = new System.Windows.Forms.LinkLabel();
this.btnHelp = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// _lblDev
//
this._lblDev.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this._lblDev.AutoEllipsis = true;
this._lblDev.AutoSize = true;
this._lblDev.BackColor = System.Drawing.Color.White;
this._lblDev.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._lblDev.ForeColor = System.Drawing.Color.Gray;
this._lblDev.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this._lblDev.Location = new System.Drawing.Point(127, 236);
this._lblDev.Name = "_lblDev";
this._lblDev.Size = new System.Drawing.Size(78, 20);
this._lblDev.TabIndex = 187;
this._lblDev.Text = "Builtbybel";
//
// _lblWith
//
this._lblWith.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this._lblWith.AutoEllipsis = true;
this._lblWith.AutoSize = true;
this._lblWith.BackColor = System.Drawing.Color.White;
this._lblWith.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._lblWith.ForeColor = System.Drawing.Color.Gray;
this._lblWith.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this._lblWith.Location = new System.Drawing.Point(63, 236);
this._lblWith.Name = "_lblWith";
this._lblWith.Size = new System.Drawing.Size(38, 20);
this._lblWith.TabIndex = 186;
this._lblWith.Text = "with";
//
// _lblHeartFillEmoji
//
this._lblHeartFillEmoji.BackColor = System.Drawing.Color.White;
this._lblHeartFillEmoji.Font = new System.Drawing.Font("Segoe Fluent Icons", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._lblHeartFillEmoji.ForeColor = System.Drawing.Color.HotPink;
this._lblHeartFillEmoji.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this._lblHeartFillEmoji.Location = new System.Drawing.Point(99, 231);
this._lblHeartFillEmoji.Name = "_lblHeartFillEmoji";
this._lblHeartFillEmoji.Size = new System.Drawing.Size(32, 25);
this._lblHeartFillEmoji.TabIndex = 185;
//
// _lblAssembly
//
this._lblAssembly.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this._lblAssembly.AutoEllipsis = true;
this._lblAssembly.AutoSize = true;
this._lblAssembly.BackColor = System.Drawing.Color.White;
this._lblAssembly.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._lblAssembly.ForeColor = System.Drawing.Color.Gray;
this._lblAssembly.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this._lblAssembly.Location = new System.Drawing.Point(63, 209);
this._lblAssembly.Name = "_lblAssembly";
this._lblAssembly.Size = new System.Drawing.Size(51, 17);
this._lblAssembly.TabIndex = 184;
this._lblAssembly.Text = "Version";
//
// lblAppMediaPayPal
//
this.lblAppMediaPayPal.ActiveLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppMediaPayPal.AutoEllipsis = true;
this.lblAppMediaPayPal.Font = new System.Drawing.Font("Segoe UI Variable Text", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblAppMediaPayPal.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lblAppMediaPayPal.LinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppMediaPayPal.Location = new System.Drawing.Point(63, 352);
this.lblAppMediaPayPal.Name = "lblAppMediaPayPal";
this.lblAppMediaPayPal.Size = new System.Drawing.Size(336, 22);
this.lblAppMediaPayPal.TabIndex = 181;
this.lblAppMediaPayPal.TabStop = true;
this.lblAppMediaPayPal.Text = "Donate to Belim from @builtbybel ";
this.lblAppMediaPayPal.VisitedLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppMediaPayPal.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblAppMediaPayPal_LinkClicked);
//
// lblAppMediaTwitter
//
this.lblAppMediaTwitter.ActiveLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppMediaTwitter.AutoEllipsis = true;
this.lblAppMediaTwitter.Font = new System.Drawing.Font("Segoe UI Variable Text", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblAppMediaTwitter.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lblAppMediaTwitter.LinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppMediaTwitter.Location = new System.Drawing.Point(63, 320);
this.lblAppMediaTwitter.Name = "lblAppMediaTwitter";
this.lblAppMediaTwitter.Size = new System.Drawing.Size(336, 22);
this.lblAppMediaTwitter.TabIndex = 180;
this.lblAppMediaTwitter.TabStop = true;
this.lblAppMediaTwitter.Text = "Follow me on Twitter";
this.lblAppMediaTwitter.VisitedLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppMediaTwitter.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblAppMediaTwitter_LinkClicked);
//
// lblAppMediaGitHub
//
this.lblAppMediaGitHub.ActiveLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppMediaGitHub.AutoEllipsis = true;
this.lblAppMediaGitHub.Font = new System.Drawing.Font("Segoe UI Variable Text", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblAppMediaGitHub.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lblAppMediaGitHub.LinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppMediaGitHub.Location = new System.Drawing.Point(63, 289);
this.lblAppMediaGitHub.Name = "lblAppMediaGitHub";
this.lblAppMediaGitHub.Size = new System.Drawing.Size(336, 22);
this.lblAppMediaGitHub.TabIndex = 178;
this.lblAppMediaGitHub.TabStop = true;
this.lblAppMediaGitHub.Text = "Follow on GitHub";
this.lblAppMediaGitHub.VisitedLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppMediaGitHub.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblAppMediaGitHub_LinkClicked);
//
// _lblAppName
//
this._lblAppName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this._lblAppName.AutoEllipsis = true;
this._lblAppName.AutoSize = true;
this._lblAppName.BackColor = System.Drawing.Color.White;
this._lblAppName.Font = new System.Drawing.Font("Segoe UI Variable Text", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._lblAppName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this._lblAppName.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this._lblAppName.Location = new System.Drawing.Point(59, 173);
this._lblAppName.Name = "_lblAppName";
this._lblAppName.Size = new System.Drawing.Size(237, 36);
this._lblAppName.TabIndex = 177;
this._lblAppName.Text = "Bloaty \'Nosy App";
//
// btnBack
//
this.btnBack.FlatAppearance.BorderSize = 0;
this.btnBack.FlatAppearance.MouseOverBackColor = System.Drawing.Color.WhiteSmoke;
this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBack.Font = new System.Drawing.Font("Segoe Fluent Icons", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btnBack.Location = new System.Drawing.Point(0, 0);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(42, 38);
this.btnBack.TabIndex = 178;
this.btnBack.Text = "...";
this.btnBack.UseVisualStyleBackColor = true;
this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
//
// lblHeader
//
this.lblHeader.AutoEllipsis = true;
this.lblHeader.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblHeader.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.lblHeader.Location = new System.Drawing.Point(60, 4);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Size = new System.Drawing.Size(588, 32);
this.lblHeader.TabIndex = 189;
this.lblHeader.Text = "Settings";
//
// _lblAboutInfo
//
this._lblAboutInfo.AutoEllipsis = true;
this._lblAboutInfo.AutoSize = true;
this._lblAboutInfo.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._lblAboutInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this._lblAboutInfo.Location = new System.Drawing.Point(62, 143);
this._lblAboutInfo.Name = "_lblAboutInfo";
this._lblAboutInfo.Size = new System.Drawing.Size(100, 17);
this._lblAboutInfo.TabIndex = 190;
this._lblAboutInfo.Text = "About this App";
//
// btnAppMediaTweetIntent
//
this.btnAppMediaTweetIntent.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btnAppMediaTweetIntent.FlatAppearance.BorderColor = System.Drawing.Color.Lime;
this.btnAppMediaTweetIntent.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAppMediaTweetIntent.Font = new System.Drawing.Font("Segoe UI Variable Display", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAppMediaTweetIntent.ForeColor = System.Drawing.Color.White;
this.btnAppMediaTweetIntent.Location = new System.Drawing.Point(66, 469);
this.btnAppMediaTweetIntent.Name = "btnAppMediaTweetIntent";
this.btnAppMediaTweetIntent.Size = new System.Drawing.Size(302, 36);
this.btnAppMediaTweetIntent.TabIndex = 191;
this.btnAppMediaTweetIntent.Text = "Rate BloatyNosy on Microsoft Store";
this.btnAppMediaTweetIntent.UseVisualStyleBackColor = false;
this.btnAppMediaTweetIntent.Click += new System.EventHandler(this.btnAppMediaTweetIntent_Click);
//
// lnkUpdateAvailable
//
this.lnkUpdateAvailable.ActiveLinkColor = System.Drawing.Color.DeepPink;
this.lnkUpdateAvailable.AutoEllipsis = true;
this.lnkUpdateAvailable.AutoSize = true;
this.lnkUpdateAvailable.BackColor = System.Drawing.Color.Turquoise;
this.lnkUpdateAvailable.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lnkUpdateAvailable.LinkColor = System.Drawing.Color.Black;
this.lnkUpdateAvailable.Location = new System.Drawing.Point(188, 209);
this.lnkUpdateAvailable.Name = "lnkUpdateAvailable";
this.lnkUpdateAvailable.Size = new System.Drawing.Size(17, 17);
this.lnkUpdateAvailable.TabIndex = 195;
this.lnkUpdateAvailable.TabStop = true;
this.lnkUpdateAvailable.Text = "...";
this.lnkUpdateAvailable.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkUpdateAvailable_LinkClicked);
//
// btnHelp
//
this.btnHelp.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnHelp.Location = new System.Drawing.Point(66, 418);
this.btnHelp.Name = "btnHelp";
this.btnHelp.Size = new System.Drawing.Size(163, 32);
this.btnHelp.TabIndex = 196;
this.btnHelp.Text = "Help";
this.btnHelp.UseVisualStyleBackColor = true;
this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
//
// AboutPageView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.btnHelp);
this.Controls.Add(this.lnkUpdateAvailable);
this.Controls.Add(this.btnAppMediaTweetIntent);
this.Controls.Add(this._lblAboutInfo);
this.Controls.Add(this.lblHeader);
this.Controls.Add(this.btnBack);
this.Controls.Add(this._lblDev);
this.Controls.Add(this._lblWith);
this.Controls.Add(this._lblAppName);
this.Controls.Add(this._lblHeartFillEmoji);
this.Controls.Add(this.lblAppMediaGitHub);
this.Controls.Add(this._lblAssembly);
this.Controls.Add(this.lblAppMediaTwitter);
this.Controls.Add(this.lblAppMediaPayPal);
this.Name = "AboutPageView";
this.Size = new System.Drawing.Size(1054, 795);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnBack;
private System.Windows.Forms.Label _lblDev;
private System.Windows.Forms.Label _lblWith;
private System.Windows.Forms.Label _lblHeartFillEmoji;
private System.Windows.Forms.Label _lblAssembly;
private System.Windows.Forms.LinkLabel lblAppMediaPayPal;
private System.Windows.Forms.LinkLabel lblAppMediaTwitter;
private System.Windows.Forms.LinkLabel lblAppMediaGitHub;
private System.Windows.Forms.Label _lblAppName;
private System.Windows.Forms.Label lblHeader;
private System.Windows.Forms.Label _lblAboutInfo;
private System.Windows.Forms.Button btnAppMediaTweetIntent;
private System.Windows.Forms.LinkLabel lnkUpdateAvailable;
private System.Windows.Forms.Button btnHelp;
}
}

View File

@ -1,121 +0,0 @@
using HelperTool;
using System;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Windows.Forms;
namespace BloatyNosy
{
public partial class AboutPageView : UserControl
{
public AboutPageView()
{
InitializeComponent();
SetStyle();
CheckForUpdates();
}
// Some UI nicety
private void SetStyle()
{
BackColor =
_lblAppName.BackColor =
_lblAssembly.BackColor =
_lblWith.BackColor =
_lblHeartFillEmoji.BackColor =
_lblDev.BackColor =
Color.FromArgb(245, 241, 249);
btnBack.Text = "\uE72B";
_lblAssembly.Text = "Version " + Program.GetCurrentVersionTostring();
_lblHeartFillEmoji.Text = "\uEB52";
}
public void CheckForUpdates()
{
if (IsInet() == true)
{
try
{
string assemblyInfo = new WebClient().DownloadString(Utils.Uri.URL_ASSEMBLY);
var readVersion = assemblyInfo.Split('\n');
var infoVersion = readVersion.Where(t => t.Contains("[assembly: AssemblyFileVersion"));
var latestVersion = "";
foreach (var item in infoVersion)
{
latestVersion = item.Substring(item.IndexOf('(') + 2, item.LastIndexOf(')') - item.IndexOf('(') - 3);
}
if (latestVersion ==
Program.GetCurrentVersionTostring()) // Up-to-date
{
//logger.Log("No new release found.");
lnkUpdateAvailable.Visible = false;
}
if (latestVersion != // Update available
Program.GetCurrentVersionTostring())
{
lnkUpdateAvailable.Text = $"App version {latestVersion} available.";
}
}
catch (Exception ex)
{
lnkUpdateAvailable.Text = $"Checking for App updates failed.\n{ex.Message}";
}
}
else if (IsInet() == false)
{
lnkUpdateAvailable.Text = $"Problem on Internet connection: Checking for App updates failed";
}
}
// Check Inet
public static bool IsInet()
{
try
{
using (var CheckInternet = new WebClient())
using (CheckInternet.OpenRead("http://clients3.google.com/generate_204"))
{
return true;
}
}
catch
{
return false;
}
}
private void btnBack_Click(object sender, System.EventArgs e)
{
var mainForm = Application.OpenForms.OfType<MainForm>().Single();
mainForm.pnlForm.Controls.Clear();
if (mainForm.INavPage != null) mainForm.pnlForm.Controls.Add(mainForm.INavPage);
}
private void lblAppMediaGitHub_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_GITREPO);
private void lblAppMediaTwitter_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_TWITTER);
private void lblAppMediaPayPal_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_DONATE);
private void btnAppMediaTweetIntent_Click(object sender, System.EventArgs e)
=> Process.Start("ms-windows-store://review/?ProductId=XPDCJG88N6FD16");
private void lnkUpdateAvailable_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Utils.LaunchUri(Utils.Uri.URL_GITLATEST);
private void btnHelp_Click(object sender, EventArgs e)
=> Process.Start(HelperTool.Utils.Uri.URL_HELP);
}
}

View File

@ -1,189 +0,0 @@
namespace BloatyNosy
{
partial class IModsPageView
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.btnBack = new System.Windows.Forms.Button();
this.lnkNoModsSig = new System.Windows.Forms.LinkLabel();
this.lblHeader = new System.Windows.Forms.Label();
this.lvMods = new System.Windows.Forms.ListView();
this.btnInstall = new System.Windows.Forms.Button();
this.progress = new System.Windows.Forms.ProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.lnkGetModsOnline = new System.Windows.Forms.LinkLabel();
this.SuspendLayout();
//
// btnBack
//
this.btnBack.FlatAppearance.BorderSize = 0;
this.btnBack.FlatAppearance.MouseOverBackColor = System.Drawing.Color.WhiteSmoke;
this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBack.Font = new System.Drawing.Font("Segoe Fluent Icons", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btnBack.Location = new System.Drawing.Point(0, 0);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(42, 38);
this.btnBack.TabIndex = 180;
this.btnBack.Text = "...";
this.btnBack.UseVisualStyleBackColor = true;
this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
//
// lnkNoModsSig
//
this.lnkNoModsSig.ActiveLinkColor = System.Drawing.Color.DeepPink;
this.lnkNoModsSig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lnkNoModsSig.AutoSize = true;
this.lnkNoModsSig.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lnkNoModsSig.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkNoModsSig.LinkColor = System.Drawing.Color.DeepPink;
this.lnkNoModsSig.Location = new System.Drawing.Point(119, 459);
this.lnkNoModsSig.Name = "lnkNoModsSig";
this.lnkNoModsSig.Size = new System.Drawing.Size(229, 17);
this.lnkNoModsSig.TabIndex = 201;
this.lnkNoModsSig.TabStop = true;
this.lnkNoModsSig.Text = "Install and update Mods signature file";
this.lnkNoModsSig.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkInstallMods_LinkClicked);
//
// lblHeader
//
this.lblHeader.AutoEllipsis = true;
this.lblHeader.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblHeader.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.lblHeader.Location = new System.Drawing.Point(87, 4);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Size = new System.Drawing.Size(251, 26);
this.lblHeader.TabIndex = 205;
this.lblHeader.Text = "WinModder Marketplace";
//
// lvMods
//
this.lvMods.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lvMods.BackColor = System.Drawing.SystemColors.Control;
this.lvMods.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.lvMods.CheckBoxes = true;
this.lvMods.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lvMods.FullRowSelect = true;
this.lvMods.HideSelection = false;
this.lvMods.Location = new System.Drawing.Point(92, 85);
this.lvMods.Name = "lvMods";
this.lvMods.OwnerDraw = true;
this.lvMods.Size = new System.Drawing.Size(802, 326);
this.lvMods.TabIndex = 206;
this.lvMods.UseCompatibleStateImageBehavior = false;
this.lvMods.View = System.Windows.Forms.View.Details;
this.lvMods.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.listView_DrawColumnHeader);
this.lvMods.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.listView_DrawItem);
//
// btnInstall
//
this.btnInstall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnInstall.BackColor = System.Drawing.Color.MediumVioletRed;
this.btnInstall.Enabled = false;
this.btnInstall.FlatAppearance.BorderColor = System.Drawing.Color.Orchid;
this.btnInstall.FlatAppearance.BorderSize = 0;
this.btnInstall.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInstall.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnInstall.ForeColor = System.Drawing.Color.White;
this.btnInstall.Location = new System.Drawing.Point(704, 38);
this.btnInstall.Name = "btnInstall";
this.btnInstall.Size = new System.Drawing.Size(181, 30);
this.btnInstall.TabIndex = 207;
this.btnInstall.Text = "Download and install Mods";
this.btnInstall.UseVisualStyleBackColor = false;
this.btnInstall.Click += new System.EventHandler(this.btnInstall_Click);
//
// progress
//
this.progress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progress.Location = new System.Drawing.Point(92, 74);
this.progress.Name = "progress";
this.progress.Size = new System.Drawing.Size(802, 5);
this.progress.TabIndex = 208;
this.progress.Visible = false;
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(110, 426);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(90, 17);
this.label1.TabIndex = 209;
this.label1.Text = "More options";
//
// lnkGetModsOnline
//
this.lnkGetModsOnline.ActiveLinkColor = System.Drawing.Color.DeepPink;
this.lnkGetModsOnline.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lnkGetModsOnline.AutoSize = true;
this.lnkGetModsOnline.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lnkGetModsOnline.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkGetModsOnline.LinkColor = System.Drawing.Color.DeepPink;
this.lnkGetModsOnline.Location = new System.Drawing.Point(119, 490);
this.lnkGetModsOnline.Name = "lnkGetModsOnline";
this.lnkGetModsOnline.Size = new System.Drawing.Size(105, 17);
this.lnkGetModsOnline.TabIndex = 210;
this.lnkGetModsOnline.TabStop = true;
this.lnkGetModsOnline.Text = "Get Mods online";
this.lnkGetModsOnline.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkGetModsOnline_LinkClicked);
//
// IModsPageView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScroll = true;
this.Controls.Add(this.lnkGetModsOnline);
this.Controls.Add(this.label1);
this.Controls.Add(this.progress);
this.Controls.Add(this.btnInstall);
this.Controls.Add(this.lvMods);
this.Controls.Add(this.lblHeader);
this.Controls.Add(this.lnkNoModsSig);
this.Controls.Add(this.btnBack);
this.Name = "IModsPageView";
this.Size = new System.Drawing.Size(972, 556);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnBack;
private System.Windows.Forms.LinkLabel lnkNoModsSig;
private System.Windows.Forms.Label lblHeader;
private System.Windows.Forms.ListView lvMods;
private System.Windows.Forms.Button btnInstall;
private System.Windows.Forms.ProgressBar progress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.LinkLabel lnkGetModsOnline;
}
}

View File

@ -1,209 +0,0 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Windows.Forms;
using System.Xml.Linq;
namespace BloatyNosy
{
public partial class IModsPageView : UserControl
{
private ModsPageView modsForm = null;
public IModsPageView(Control ctr)
{
modsForm = ctr as ModsPageView;
InitializeComponent();
InitializeModsSignature();
SetStyle();
}
private void SetStyle()
{
lvMods.BackColor = Color.FromArgb(239, 239, 247);
btnBack.Text = "\uE72B";
}
private void InitializeModsSignature()
{
// Add required columns
lvMods.Columns.Add("Name");
lvMods.Columns.Add("Description");
lvMods.Columns.Add("Developer");
lvMods.Columns.Add("Link");
try
{
XDocument doc = XDocument.Load(AppDomain.CurrentDomain.BaseDirectory + "modsApp2.xml");
foreach (var dm in doc.Descendants("Mod"))
{
ListViewItem item = new ListViewItem(new string[]
{
dm.Element("id").Value,
dm.Element("description").Value,
dm.Element("dev").Value,
dm.Element("uri").Value,
});
lvMods.Items.Add(item);
lvMods.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
lvMods.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
}
isFeatureInstalled();
btnInstall.Enabled = (lvMods.Items.Count > 0);
}
catch
{
MessageBox.Show("Mods signature file not found.\nPlease re-download and install the signatures.");
lvMods.Visible = false;
lnkNoModsSig.Visible = true;
}
}
public void isFeatureInstalled()
{
foreach (ListViewItem item in lvMods.Items)
{
var feature = item.SubItems[3].Text;
if (File.Exists(HelperTool.Utils.Data.DataRootDir + feature.Split('/').Last())
|| File.Exists(HelperTool.Utils.Data.ModsRootDir + feature.Split('/').Last())
|| File.Exists(AppDomain.CurrentDomain.BaseDirectory + feature.Split('/').Last()))
item.ForeColor = Color.Gray;
else
{
item.ForeColor = Color.Black;
}
}
}
private void btnBack_Click(object sender, EventArgs e)
=> modsForm.SetView(new ModsPageView());
private async void lnkInstallMods_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
try
{
HelperTool.Utils.CreateModsDir();
using (WebClient client = new WebClient())
{
progress.Visible = true;
progress.Value = 0;
client.Credentials = CredentialCache.DefaultNetworkCredentials;
client.DownloadProgressChanged += Wc_DownloadProgressChanged;
Uri uri = new Uri("https://raw.githubusercontent.com/builtbybel/BloatyNosy/main/mods/modsApp2.xml");
string filename = System.IO.Path.GetFileName(uri.LocalPath);
await client.DownloadFileTaskAsync(uri, AppDomain.CurrentDomain.BaseDirectory + filename);
progress.Visible = false;
// Update IMods page
btnBack.PerformClick();
modsForm.lnkExploreMods_LinkClicked(sender, e);
}
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
}
private async void btnInstall_Click(object sender, EventArgs e)
{
bool bNeedRestart = false;
if (lvMods.CheckedItems.Count == 0)
{
MessageBox.Show("No feature selected.", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
StringBuilder builder = new StringBuilder();
foreach (ListViewItem eachItem in lvMods.CheckedItems)
{
List<string> list = new List<string>(eachItem.SubItems[3].Text.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries));
foreach (string url in list)
{
progress.Visible = true;
using (WebClient client = new WebClient())
{
progress.Value = 0;
client.Credentials = CredentialCache.DefaultNetworkCredentials;
client.DownloadProgressChanged += Wc_DownloadProgressChanged;
Uri uri = new Uri(url);
string filename = System.IO.Path.GetFileName(uri.LocalPath);
string fileExt = System.IO.Path.GetExtension(eachItem.SubItems[3].Text);
try
{
if (fileExt == ".ps1" || fileExt == ".ini")
await client.DownloadFileTaskAsync(uri, HelperTool.Utils.Data.ModsRootDir + filename);
else
{
HelperTool.Utils.CreateDataDir(); // Create appData folder
await client.DownloadFileTaskAsync(uri, HelperTool.Utils.Data.DataRootDir + filename
);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, lvMods.FocusedItem.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
}
builder.Append("\n- " + eachItem.SubItems[0].Text);
// Restart required by filetypes
if (eachItem.SubItems[3].Text.Contains(".xml"))
// || eachItem.SubItems[3].Text.Contains(".xml"))
{
builder.Append(" (Restart required.)");
bNeedRestart = true;
}
}
MessageBox.Show("Mods successfully installed:\n" + builder.ToString(), "", MessageBoxButtons.OK, MessageBoxIcon.Information);
isFeatureInstalled();
if (bNeedRestart)
{
MessageBox.Show("We will restart the app to complete the installation of some features.");
Application.Restart();
Environment.Exit(0);
}
progress.Visible = false;
}
private void Wc_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
progress.Value = e.ProgressPercentage;
progress.Update();
// this.Invoke((MethodInvoker)(() => lblStatus.Text = $"{e.ProgressPercentage}%"));
}
private void listView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
{
e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(245, 241, 249)), e.Bounds);
e.DrawText();
}
private void listView_DrawItem(object sender, DrawListViewItemEventArgs e)
=> e.DrawDefault = true;
private void lnkGetModsOnline_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> HelperTool.Utils.LaunchUri("https://www.builtbybel.com/blog/about-debloos");
}
}

View File

@ -1,400 +0,0 @@
namespace BloatyNosy
{
partial class ModsPageView
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ModsPageView));
this.contextAppMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuModEdit = new System.Windows.Forms.ToolStripMenuItem();
this.menuModOpenDir = new System.Windows.Forms.ToolStripMenuItem();
this.pnlForm = new System.Windows.Forms.Panel();
this.pnlMain = new System.Windows.Forms.Panel();
this.lblStatus = new System.Windows.Forms.Label();
this.lblHeader = new System.Windows.Forms.Label();
this.btnHMenu = new System.Windows.Forms.Button();
this.btnBack = new System.Windows.Forms.Button();
this.lnkExploreMods = new System.Windows.Forms.LinkLabel();
this.tabD = new System.Windows.Forms.TabControl();
this.tabDescription = new System.Windows.Forms.TabPage();
this.rtbDesc = new System.Windows.Forms.RichTextBox();
this.tabCode = new System.Windows.Forms.TabPage();
this.rtbCode = new System.Windows.Forms.RichTextBox();
this.textSearch = new System.Windows.Forms.TextBox();
this.lnkCode = new System.Windows.Forms.LinkLabel();
this.lnkDesc = new System.Windows.Forms.LinkLabel();
this.progress = new System.Windows.Forms.ProgressBar();
this.btnApply = new System.Windows.Forms.Button();
this.listMods = new System.Windows.Forms.CheckedListBox();
this.btnCancel = new System.Windows.Forms.Button();
this.contextAppMenu.SuspendLayout();
this.pnlForm.SuspendLayout();
this.pnlMain.SuspendLayout();
this.tabD.SuspendLayout();
this.tabDescription.SuspendLayout();
this.tabCode.SuspendLayout();
this.SuspendLayout();
//
// contextAppMenu
//
this.contextAppMenu.BackColor = System.Drawing.Color.WhiteSmoke;
this.contextAppMenu.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.contextAppMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuModEdit,
this.menuModOpenDir});
this.contextAppMenu.Name = "menuMain";
this.contextAppMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.contextAppMenu.Size = new System.Drawing.Size(181, 70);
this.contextAppMenu.Text = "Info";
//
// menuModEdit
//
this.menuModEdit.Name = "menuModEdit";
this.menuModEdit.Size = new System.Drawing.Size(180, 22);
this.menuModEdit.Text = "Edit Mod";
this.menuModEdit.Click += new System.EventHandler(this.menuModEdit_Click);
//
// menuModOpenDir
//
this.menuModOpenDir.Name = "menuModOpenDir";
this.menuModOpenDir.Size = new System.Drawing.Size(180, 22);
this.menuModOpenDir.Text = "Open Mods Folder";
this.menuModOpenDir.Click += new System.EventHandler(this.menuModOpenDir_Click);
//
// pnlForm
//
this.pnlForm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlForm.AutoSize = true;
this.pnlForm.Controls.Add(this.pnlMain);
this.pnlForm.Location = new System.Drawing.Point(0, 0);
this.pnlForm.Name = "pnlForm";
this.pnlForm.Size = new System.Drawing.Size(1054, 795);
this.pnlForm.TabIndex = 193;
//
// pnlMain
//
this.pnlMain.AutoScroll = true;
this.pnlMain.Controls.Add(this.lblStatus);
this.pnlMain.Controls.Add(this.lblHeader);
this.pnlMain.Controls.Add(this.btnHMenu);
this.pnlMain.Controls.Add(this.btnBack);
this.pnlMain.Controls.Add(this.lnkExploreMods);
this.pnlMain.Controls.Add(this.tabD);
this.pnlMain.Controls.Add(this.textSearch);
this.pnlMain.Controls.Add(this.lnkCode);
this.pnlMain.Controls.Add(this.lnkDesc);
this.pnlMain.Controls.Add(this.progress);
this.pnlMain.Controls.Add(this.btnApply);
this.pnlMain.Controls.Add(this.listMods);
this.pnlMain.Controls.Add(this.btnCancel);
this.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlMain.Location = new System.Drawing.Point(0, 0);
this.pnlMain.Name = "pnlMain";
this.pnlMain.Size = new System.Drawing.Size(1054, 795);
this.pnlMain.TabIndex = 197;
//
// lblStatus
//
this.lblStatus.AutoEllipsis = true;
this.lblStatus.AutoSize = true;
this.lblStatus.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblStatus.ForeColor = System.Drawing.Color.HotPink;
this.lblStatus.Location = new System.Drawing.Point(88, 106);
this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(94, 17);
this.lblStatus.TabIndex = 206;
this.lblStatus.Text = "Mods installed";
//
// lblHeader
//
this.lblHeader.AutoEllipsis = true;
this.lblHeader.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblHeader.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.lblHeader.Location = new System.Drawing.Point(87, 4);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Size = new System.Drawing.Size(114, 26);
this.lblHeader.TabIndex = 204;
this.lblHeader.Text = "WinModder";
//
// btnHMenu
//
this.btnHMenu.FlatAppearance.BorderSize = 0;
this.btnHMenu.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Gainsboro;
this.btnHMenu.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnHMenu.Font = new System.Drawing.Font("Segoe Fluent Icons", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnHMenu.ForeColor = System.Drawing.Color.Black;
this.btnHMenu.Location = new System.Drawing.Point(35, 0);
this.btnHMenu.Name = "btnHMenu";
this.btnHMenu.Size = new System.Drawing.Size(42, 38);
this.btnHMenu.TabIndex = 203;
this.btnHMenu.Text = "...";
this.btnHMenu.UseVisualStyleBackColor = true;
this.btnHMenu.Click += new System.EventHandler(this.btnHMenu_Click);
//
// btnBack
//
this.btnBack.FlatAppearance.BorderSize = 0;
this.btnBack.FlatAppearance.MouseOverBackColor = System.Drawing.Color.WhiteSmoke;
this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBack.Font = new System.Drawing.Font("Segoe Fluent Icons", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btnBack.Location = new System.Drawing.Point(0, 0);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(42, 38);
this.btnBack.TabIndex = 202;
this.btnBack.Text = "...";
this.btnBack.UseVisualStyleBackColor = true;
this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
//
// lnkExploreMods
//
this.lnkExploreMods.ActiveLinkColor = System.Drawing.Color.DeepPink;
this.lnkExploreMods.AutoSize = true;
this.lnkExploreMods.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lnkExploreMods.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkExploreMods.LinkColor = System.Drawing.Color.HotPink;
this.lnkExploreMods.Location = new System.Drawing.Point(229, 4);
this.lnkExploreMods.Name = "lnkExploreMods";
this.lnkExploreMods.Size = new System.Drawing.Size(129, 26);
this.lnkExploreMods.TabIndex = 201;
this.lnkExploreMods.TabStop = true;
this.lnkExploreMods.Text = "Explore Mods";
this.lnkExploreMods.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkExploreMods_LinkClicked);
//
// tabD
//
this.tabD.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabD.Controls.Add(this.tabDescription);
this.tabD.Controls.Add(this.tabCode);
this.tabD.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabD.Location = new System.Drawing.Point(92, 562);
this.tabD.Name = "tabD";
this.tabD.SelectedIndex = 0;
this.tabD.Size = new System.Drawing.Size(857, 171);
this.tabD.TabIndex = 194;
//
// tabDescription
//
this.tabDescription.BackColor = System.Drawing.SystemColors.Control;
this.tabDescription.Controls.Add(this.rtbDesc);
this.tabDescription.Location = new System.Drawing.Point(4, 24);
this.tabDescription.Name = "tabDescription";
this.tabDescription.Padding = new System.Windows.Forms.Padding(3);
this.tabDescription.Size = new System.Drawing.Size(849, 143);
this.tabDescription.TabIndex = 0;
this.tabDescription.Text = "Description";
//
// rtbDesc
//
this.rtbDesc.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.rtbDesc.BackColor = System.Drawing.SystemColors.Control;
this.rtbDesc.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.rtbDesc.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rtbDesc.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.rtbDesc.Location = new System.Drawing.Point(17, 17);
this.rtbDesc.Name = "rtbDesc";
this.rtbDesc.ReadOnly = true;
this.rtbDesc.Size = new System.Drawing.Size(819, 120);
this.rtbDesc.TabIndex = 11;
this.rtbDesc.Text = resources.GetString("rtbDesc.Text");
this.rtbDesc.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.rtbDesc_LinkClicked);
//
// tabCode
//
this.tabCode.BackColor = System.Drawing.SystemColors.Control;
this.tabCode.Controls.Add(this.rtbCode);
this.tabCode.Location = new System.Drawing.Point(4, 24);
this.tabCode.Name = "tabCode";
this.tabCode.Padding = new System.Windows.Forms.Padding(3);
this.tabCode.Size = new System.Drawing.Size(849, 143);
this.tabCode.TabIndex = 1;
this.tabCode.Text = "Code";
//
// rtbCode
//
this.rtbCode.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.rtbCode.BackColor = System.Drawing.SystemColors.Control;
this.rtbCode.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.rtbCode.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rtbCode.ForeColor = System.Drawing.Color.Gray;
this.rtbCode.Location = new System.Drawing.Point(17, 17);
this.rtbCode.Name = "rtbCode";
this.rtbCode.ReadOnly = true;
this.rtbCode.Size = new System.Drawing.Size(826, 120);
this.rtbCode.TabIndex = 12;
this.rtbCode.Text = "#Follow this project on GitHub.\nStart-Process https://github.com/builtbybel/Deblo" +
"os\n";
//
// textSearch
//
this.textSearch.BackColor = System.Drawing.Color.WhiteSmoke;
this.textSearch.Font = new System.Drawing.Font("Segoe UI Variable Text", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textSearch.ForeColor = System.Drawing.Color.Gray;
this.textSearch.Location = new System.Drawing.Point(485, 60);
this.textSearch.Name = "textSearch";
this.textSearch.Size = new System.Drawing.Size(122, 23);
this.textSearch.TabIndex = 199;
this.textSearch.Text = "Search...";
this.textSearch.Click += new System.EventHandler(this.textSearch_Click);
this.textSearch.TextChanged += new System.EventHandler(this.textSearch_TextChanged);
//
// lnkCode
//
this.lnkCode.ActiveLinkColor = System.Drawing.Color.DeepPink;
this.lnkCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lnkCode.AutoSize = true;
this.lnkCode.Font = new System.Drawing.Font("Segoe UI Variable Display Semil", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lnkCode.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkCode.LinkColor = System.Drawing.Color.HotPink;
this.lnkCode.Location = new System.Drawing.Point(172, 531);
this.lnkCode.Name = "lnkCode";
this.lnkCode.Size = new System.Drawing.Size(38, 17);
this.lnkCode.TabIndex = 198;
this.lnkCode.TabStop = true;
this.lnkCode.Text = "Code";
this.lnkCode.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkCode_LinkClicked);
//
// lnkDesc
//
this.lnkDesc.ActiveLinkColor = System.Drawing.Color.DeepPink;
this.lnkDesc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lnkDesc.AutoSize = true;
this.lnkDesc.Font = new System.Drawing.Font("Segoe UI Variable Display Semil", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lnkDesc.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkDesc.LinkColor = System.Drawing.Color.HotPink;
this.lnkDesc.Location = new System.Drawing.Point(91, 531);
this.lnkDesc.Name = "lnkDesc";
this.lnkDesc.Size = new System.Drawing.Size(71, 17);
this.lnkDesc.TabIndex = 197;
this.lnkDesc.TabStop = true;
this.lnkDesc.Text = "Description";
this.lnkDesc.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkDesc_LinkClicked);
//
// progress
//
this.progress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progress.Location = new System.Drawing.Point(92, 129);
this.progress.Name = "progress";
this.progress.Size = new System.Drawing.Size(857, 5);
this.progress.TabIndex = 196;
this.progress.Visible = false;
//
// btnApply
//
this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnApply.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnApply.ForeColor = System.Drawing.Color.Black;
this.btnApply.Location = new System.Drawing.Point(96, 752);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(75, 23);
this.btnApply.TabIndex = 5;
this.btnApply.Text = "Apply";
this.btnApply.UseVisualStyleBackColor = true;
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// listMods
//
this.listMods.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listMods.BackColor = System.Drawing.SystemColors.Control;
this.listMods.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listMods.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listMods.FormattingEnabled = true;
this.listMods.Location = new System.Drawing.Point(92, 140);
this.listMods.Name = "listMods";
this.listMods.Size = new System.Drawing.Size(857, 342);
this.listMods.TabIndex = 195;
this.listMods.SelectedIndexChanged += new System.EventHandler(this.listMods_SelectedIndexChanged);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnCancel.ForeColor = System.Drawing.Color.Black;
this.btnCancel.Location = new System.Drawing.Point(870, 752);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 7;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Visible = false;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// ModsPageView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.pnlForm);
this.Name = "ModsPageView";
this.Size = new System.Drawing.Size(1054, 795);
this.contextAppMenu.ResumeLayout(false);
this.pnlForm.ResumeLayout(false);
this.pnlMain.ResumeLayout(false);
this.pnlMain.PerformLayout();
this.tabD.ResumeLayout(false);
this.tabDescription.ResumeLayout(false);
this.tabCode.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ContextMenuStrip contextAppMenu;
private System.Windows.Forms.ToolStripMenuItem menuModEdit;
private System.Windows.Forms.Panel pnlForm;
private System.Windows.Forms.TabControl tabD;
private System.Windows.Forms.TabPage tabDescription;
private System.Windows.Forms.RichTextBox rtbDesc;
private System.Windows.Forms.TabPage tabCode;
private System.Windows.Forms.RichTextBox rtbCode;
private System.Windows.Forms.Panel pnlMain;
private System.Windows.Forms.TextBox textSearch;
private System.Windows.Forms.LinkLabel lnkCode;
private System.Windows.Forms.LinkLabel lnkDesc;
private System.Windows.Forms.ProgressBar progress;
private System.Windows.Forms.Button btnApply;
private System.Windows.Forms.CheckedListBox listMods;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Label lblHeader;
private System.Windows.Forms.Button btnHMenu;
private System.Windows.Forms.Button btnBack;
public System.Windows.Forms.LinkLabel lnkExploreMods;
private System.Windows.Forms.Label lblStatus;
private System.Windows.Forms.ToolStripMenuItem menuModOpenDir;
}
}

View File

@ -1,259 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BloatyNosy
{
public partial class ModsPageView : UserControl
{
private ModsManifest _Modsmanifest = new ModsManifest();
private List<string> ModsList = new List<string>();
public Control INavPage;
public ModsPageView()
{
InitializeComponent();
InitializeMods();
listMods.Items.AddRange(ModsList.ToArray());
SetStyle();
}
// Some UI nicety
private void SetStyle()
{
HideTabsOnTabControl(tabD);
BackColor =
listMods.BackColor =
tabD.BackColor =
tabDescription.BackColor =
tabCode.BackColor =
rtbDesc.BackColor =
rtbCode.BackColor =
Color.FromArgb(239, 239, 247);
btnHMenu.Text = "\uE700";
btnBack.Text = "\uE72B";
INavPage = pnlForm.Controls[0]; // Set default NavPage
}
public void SetView(Control View)
{
var control = View as Control;
control.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom);
control.Dock = DockStyle.Fill;
INavPage.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom);
INavPage.Dock = DockStyle.Fill;
pnlForm.Controls.Clear();
pnlForm.Controls.Add(View);
}
private void HideTabsOnTabControl(TabControl tabControl)
{
tabControl.Appearance = TabAppearance.FlatButtons;
tabControl.ItemSize = new Size(0, 1);
tabControl.SizeMode = TabSizeMode.Fixed;
}
private void InitializeMods()
{
listMods.Items.Clear();
try
{
string[] manifests = Directory.GetFiles(HelperTool.Utils.Data.ModsRootDir, "*.ini");
foreach (string manifest in manifests)
{
ModsList.Add(Path.GetFileNameWithoutExtension(manifest));
}
}
catch { lblStatus.Text = "No Mods installed"; btnApply.Visible = false; btnCancel.Visible = false; }
}
private async void DoMods(string language)
{
var scriptPath = HelperTool.Utils.Data.ModsRootDir + _Modsmanifest.ConditionScript;
// Check e.g. -noexit switch to prevent the PowerShell Console window from closing
var scriptParam = _Modsmanifest.ini.ReadString("Info", "ScriptParam", "");
lblStatus.Text = $"Processing \"{scriptPath}\"";
btnApply.Enabled = false;
btnCancel.Visible = true;
progress.Visible = true;
progress.Style = ProgressBarStyle.Marquee;
progress.MarqueeAnimationSpeed = 30;
try
{
switch (language)
{
case "PowerShell":
var startInfo = new ProcessStartInfo()
{
FileName = "powershell.exe",
Arguments = $"-executionpolicy bypass {scriptParam} -file \"{scriptPath}\"",
UseShellExecute = false,
CreateNoWindow = Convert.ToBoolean(_Modsmanifest.ini.ReadString("Info", "CreateNoWindow", ""))
};
await Task.Run(() =>
{
Process.Start(startInfo).WaitForExit();
});
break;
case "Command-line":
var process = Process.Start(new ProcessStartInfo("cmd", "/C " + scriptPath)
{
RedirectStandardOutput = true,
WorkingDirectory = HelperTool.Utils.Data.ModsRootDir,
UseShellExecute = false,
CreateNoWindow = Convert.ToBoolean(_Modsmanifest.ini.ReadString("Info", "CreateNoWindow", ""))
});
await Task.Run(() =>
{
process.WaitForExit();
});
break;
}
lblStatus.Text = "Installed Mods";
progress.Visible = false;
btnCancel.Visible = false;
btnApply.Enabled = true;
MessageBox.Show("Mod has been successfully applied.", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (NullReferenceException ex)
{
string title = "This did not work...";
string logger = "Exception in \"" + language + "\"\n\n" + ex + "\n\nPlease report this issue to Builtbybel........";
MessageBox.Show(this, logger, title, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void btnApply_Click(object sender, EventArgs e)
=> DoMods(_Modsmanifest.ScriptLanguage);
private void btnCancel_Click(object sender, EventArgs e)
{
String CurrentUser = Environment.UserName;
Process[] allProcesses = Process.GetProcessesByName("powershell");
if (null != allProcesses)
{
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C TASKKILL /F /FI \"USERNAME eq " + CurrentUser + "\" /IM powershell.exe";
process.StartInfo = startInfo;
process.Start();
process.WaitForExit();
}
btnCancel.Visible = false;
}
private void menuModEdit_Click(object sender, EventArgs e)
{
try
{
string scriptPath = HelperTool.Utils.Data.ModsRootDir + _Modsmanifest.ConditionScript;
Process process = new Process();
process.StartInfo.FileName = "powershell_ise.exe";
process.StartInfo.Arguments = scriptPath;
process.Start();
}
catch { MessageBox.Show("No Mod selected."); }
}
private void listMods_SelectedIndexChanged(object sender, EventArgs e)
{
string scriptManifestFile = HelperTool.Utils.Data.ModsRootDir + listMods.Text + ".ini";
_Modsmanifest.ini = new ModsParser(scriptManifestFile);
string scriptPath = HelperTool.Utils.Data.ModsRootDir + _Modsmanifest.ConditionScript;
try
{
// Catch description
// Script name
//listMods.Items.Add(_Modsmanifest.DisplayName);
// Script description/publisher
rtbDesc.Text = _Modsmanifest.AboutScript.Replace("\\n", "\r\n") +
Environment.NewLine + Environment.NewLine + "Author of this Mod: " + _Modsmanifest.Publisher;
// Catch Code
using (StreamReader sr = new StreamReader(scriptPath, Encoding.Default))
{
StringBuilder content = new StringBuilder();
while (!sr.EndOfStream)
content.AppendLine(sr.ReadLine());
rtbCode.Text = string.Join(Environment.NewLine, File.ReadAllLines(scriptPath));
}
}
catch { }
}
private void textSearch_TextChanged(object sender, EventArgs e)
{
listMods.Items.Clear();
foreach (string str in ModsList)
{
if (str.IndexOf(textSearch.Text, 0, StringComparison.CurrentCultureIgnoreCase) != -1)
{
listMods.Items.Add(str);
}
}
}
private void textSearch_Click(object sender, EventArgs e)
=> textSearch.Text = "";
private void rtbDesc_LinkClicked(object sender, LinkClickedEventArgs e)
=> HelperTool.Utils.LaunchUri(e.LinkText);
public void lnkExploreMods_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> this.SetView(new IModsPageView(this));
private void lnkDesc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> tabD.SelectedIndex = 0;
private void lnkCode_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> tabD.SelectedIndex = 1;
private void btnHMenu_Click(object sender, EventArgs e)
=> this.contextAppMenu.Show(Cursor.Position.X, Cursor.Position.Y);
private void btnBack_Click(object sender, EventArgs e)
{
var mainForm = Application.OpenForms.OfType<MainForm>().Single();
mainForm.pnlForm.Controls.Clear();
if (mainForm.INavPage != null) mainForm.pnlForm.Controls.Add(mainForm.INavPage);
}
private void menuModOpenDir_Click(object sender, EventArgs e)
{
Process.Start(new ProcessStartInfo("explorer.exe", HelperTool.Utils.Data.ModsRootDir) { UseShellExecute = true });
}
}
}

View File

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextAppMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="rtbDesc.Text" xml:space="preserve">
<value>You will find here mod files for BloatyNosy WinModder.
- Install mod files directly via the "Explore Mods" link
- Explore mod files and packages online https://www.builtbybel.com/blog/about-bloatynosy
</value>
</data>
</root>

View File

@ -1,4 +1,4 @@
namespace BloatyNosy
namespace Bloatynosy.Views
{
partial class PackagesPageView
{
@ -28,140 +28,60 @@
/// </summary>
private void InitializeComponent()
{
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.listRemote = new System.Windows.Forms.ListBox();
this.btnRemoveAll = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.listLocal = new System.Windows.Forms.ListBox();
this.richStatus = new System.Windows.Forms.RichTextBox();
this.btnInstall = new System.Windows.Forms.Button();
this.btnRemove = new System.Windows.Forms.Button();
this.btnAddAll = new System.Windows.Forms.Button();
this.btnAdd = new System.Windows.Forms.Button();
this.btnBack = new System.Windows.Forms.Button();
this.lblHeader = new System.Windows.Forms.Label();
this.textSearch = new System.Windows.Forms.TextBox();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.lblRemote = new System.Windows.Forms.Label();
this.listRemote = new System.Windows.Forms.ListBox();
this.richStatus = new System.Windows.Forms.RichTextBox();
this.lblHeader = new System.Windows.Forms.Label();
this.lblLocal = new System.Windows.Forms.Label();
this.btnInstall = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox2.Controls.Add(this.listRemote);
this.groupBox2.Font = new System.Drawing.Font("Segoe UI Variable Text", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox2.ForeColor = System.Drawing.Color.Violet;
this.groupBox2.Location = new System.Drawing.Point(28, 82);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(411, 648);
this.groupBox2.TabIndex = 49;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Online packages";
//
// listRemote
//
this.listRemote.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.listRemote.BackColor = System.Drawing.Color.White;
this.listRemote.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listRemote.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listRemote.FormattingEnabled = true;
this.listRemote.ItemHeight = 17;
this.listRemote.Location = new System.Drawing.Point(11, 36);
this.listRemote.Name = "listRemote";
this.listRemote.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listRemote.Size = new System.Drawing.Size(394, 595);
this.listRemote.Sorted = true;
this.listRemote.TabIndex = 13;
//
// btnRemoveAll
//
this.btnRemoveAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.btnRemoveAll.AutoEllipsis = true;
this.btnRemoveAll.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRemoveAll.ForeColor = System.Drawing.Color.Black;
this.btnRemoveAll.Location = new System.Drawing.Point(482, 313);
this.btnRemoveAll.Location = new System.Drawing.Point(436, 405);
this.btnRemoveAll.Name = "btnRemoveAll";
this.btnRemoveAll.Size = new System.Drawing.Size(89, 23);
this.btnRemoveAll.Size = new System.Drawing.Size(239, 23);
this.btnRemoveAll.TabIndex = 45;
this.btnRemoveAll.Text = "<< Remove all";
this.btnRemoveAll.UseVisualStyleBackColor = true;
this.btnRemoveAll.Click += new System.EventHandler(this.btnRemoveAll_Click);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.listLocal);
this.groupBox1.Controls.Add(this.richStatus);
this.groupBox1.Font = new System.Drawing.Font("Segoe UI Variable Text", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.ForeColor = System.Drawing.Color.DeepPink;
this.groupBox1.Location = new System.Drawing.Point(609, 82);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(411, 648);
this.groupBox1.TabIndex = 50;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Install packages";
//
// listLocal
//
this.listLocal.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.listLocal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.listLocal.BackColor = System.Drawing.Color.White;
this.listLocal.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listLocal.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listLocal.FormattingEnabled = true;
this.listLocal.ItemHeight = 17;
this.listLocal.Location = new System.Drawing.Point(11, 36);
this.listLocal.Location = new System.Drawing.Point(823, 107);
this.listLocal.Name = "listLocal";
this.listLocal.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listLocal.Size = new System.Drawing.Size(394, 595);
this.listLocal.Size = new System.Drawing.Size(270, 646);
this.listLocal.Sorted = true;
this.listLocal.TabIndex = 13;
//
// richStatus
//
this.richStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.richStatus.BackColor = System.Drawing.Color.White;
this.richStatus.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richStatus.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.richStatus.ForeColor = System.Drawing.Color.Black;
this.richStatus.HideSelection = false;
this.richStatus.Location = new System.Drawing.Point(11, 19);
this.richStatus.Name = "richStatus";
this.richStatus.ReadOnly = true;
this.richStatus.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.richStatus.Size = new System.Drawing.Size(393, 613);
this.richStatus.TabIndex = 140;
this.richStatus.Text = "";
this.richStatus.Visible = false;
//
// btnInstall
//
this.btnInstall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnInstall.BackColor = System.Drawing.Color.MediumVioletRed;
this.btnInstall.FlatAppearance.BorderColor = System.Drawing.Color.Orchid;
this.btnInstall.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInstall.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnInstall.ForeColor = System.Drawing.Color.White;
this.btnInstall.Location = new System.Drawing.Point(825, 49);
this.btnInstall.Name = "btnInstall";
this.btnInstall.Size = new System.Drawing.Size(181, 30);
this.btnInstall.TabIndex = 51;
this.btnInstall.Text = "Download and install packages";
this.btnInstall.UseVisualStyleBackColor = false;
this.btnInstall.Click += new System.EventHandler(this.btnInstall_Click);
//
// btnRemove
//
this.btnRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.btnRemove.AutoEllipsis = true;
this.btnRemove.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRemove.ForeColor = System.Drawing.Color.Black;
this.btnRemove.Location = new System.Drawing.Point(482, 342);
this.btnRemove.Location = new System.Drawing.Point(436, 376);
this.btnRemove.Name = "btnRemove";
this.btnRemove.Size = new System.Drawing.Size(89, 23);
this.btnRemove.Size = new System.Drawing.Size(239, 23);
this.btnRemove.TabIndex = 43;
this.btnRemove.Text = "< Remove";
this.btnRemove.UseVisualStyleBackColor = true;
@ -169,22 +89,26 @@
//
// btnAddAll
//
this.btnAddAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.btnAddAll.AutoEllipsis = true;
this.btnAddAll.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAddAll.ForeColor = System.Drawing.Color.Black;
this.btnAddAll.Location = new System.Drawing.Point(482, 201);
this.btnAddAll.Location = new System.Drawing.Point(436, 293);
this.btnAddAll.Name = "btnAddAll";
this.btnAddAll.Size = new System.Drawing.Size(89, 23);
this.btnAddAll.Size = new System.Drawing.Size(239, 23);
this.btnAddAll.TabIndex = 46;
this.btnAddAll.Text = "Add all >>";
this.btnAddAll.Click += new System.EventHandler(this.btnAddAll_Click);
//
// btnAdd
//
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.btnAdd.AutoEllipsis = true;
this.btnAdd.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAdd.ForeColor = System.Drawing.Color.Black;
this.btnAdd.Location = new System.Drawing.Point(482, 230);
this.btnAdd.Location = new System.Drawing.Point(436, 264);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(89, 23);
this.btnAdd.Size = new System.Drawing.Size(239, 23);
this.btnAdd.TabIndex = 42;
this.btnAdd.Text = "Add >";
this.btnAdd.UseVisualStyleBackColor = true;
@ -205,69 +129,145 @@
this.btnBack.UseVisualStyleBackColor = true;
this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
//
// lblHeader
//
this.lblHeader.AutoEllipsis = true;
this.lblHeader.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblHeader.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.lblHeader.Location = new System.Drawing.Point(60, 4);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Size = new System.Drawing.Size(954, 32);
this.lblHeader.TabIndex = 178;
this.lblHeader.Text = "InstaPackage";
//
// textSearch
//
this.textSearch.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.textSearch.BackColor = System.Drawing.Color.WhiteSmoke;
this.textSearch.Font = new System.Drawing.Font("Segoe UI Variable Text", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textSearch.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textSearch.ForeColor = System.Drawing.Color.Gray;
this.textSearch.Location = new System.Drawing.Point(469, 29);
this.textSearch.Location = new System.Drawing.Point(485, 66);
this.textSearch.Name = "textSearch";
this.textSearch.Size = new System.Drawing.Size(122, 23);
this.textSearch.Size = new System.Drawing.Size(149, 25);
this.textSearch.TabIndex = 180;
this.textSearch.Text = "Search...";
this.textSearch.Text = "Search";
this.textSearch.Click += new System.EventHandler(this.textSearch_Click);
this.textSearch.TextChanged += new System.EventHandler(this.textSearch_TextChanged);
//
// lblRemote
//
this.lblRemote.AutoSize = true;
this.lblRemote.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F);
this.lblRemote.ForeColor = System.Drawing.Color.Black;
this.lblRemote.Location = new System.Drawing.Point(42, 70);
this.lblRemote.Name = "lblRemote";
this.lblRemote.Size = new System.Drawing.Size(54, 17);
this.lblRemote.TabIndex = 186;
this.lblRemote.Text = "Remote";
//
// listRemote
//
this.listRemote.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.listRemote.BackColor = System.Drawing.Color.White;
this.listRemote.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listRemote.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listRemote.FormattingEnabled = true;
this.listRemote.ItemHeight = 17;
this.listRemote.Location = new System.Drawing.Point(44, 99);
this.listRemote.Name = "listRemote";
this.listRemote.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listRemote.Size = new System.Drawing.Size(270, 629);
this.listRemote.Sorted = true;
this.listRemote.TabIndex = 13;
//
// richStatus
//
this.richStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.richStatus.BackColor = System.Drawing.Color.White;
this.richStatus.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richStatus.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.richStatus.ForeColor = System.Drawing.Color.Black;
this.richStatus.HideSelection = false;
this.richStatus.Location = new System.Drawing.Point(823, 107);
this.richStatus.Name = "richStatus";
this.richStatus.ReadOnly = true;
this.richStatus.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.richStatus.Size = new System.Drawing.Size(270, 646);
this.richStatus.TabIndex = 140;
this.richStatus.Text = "";
this.richStatus.Visible = false;
//
// lblHeader
//
this.lblHeader.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblHeader.AutoEllipsis = true;
this.lblHeader.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 18.25F, System.Drawing.FontStyle.Bold);
this.lblHeader.ForeColor = System.Drawing.Color.Black;
this.lblHeader.Location = new System.Drawing.Point(286, 31);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Size = new System.Drawing.Size(523, 32);
this.lblHeader.TabIndex = 188;
this.lblHeader.Text = "Packages";
this.lblHeader.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblLocal
//
this.lblLocal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblLocal.AutoSize = true;
this.lblLocal.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F);
this.lblLocal.ForeColor = System.Drawing.Color.Black;
this.lblLocal.Location = new System.Drawing.Point(820, 79);
this.lblLocal.Name = "lblLocal";
this.lblLocal.Size = new System.Drawing.Size(38, 17);
this.lblLocal.TabIndex = 189;
this.lblLocal.Text = "Local";
//
// btnInstall
//
this.btnInstall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnInstall.BackColor = System.Drawing.Color.MediumVioletRed;
this.btnInstall.FlatAppearance.BorderSize = 0;
this.btnInstall.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnInstall.ForeColor = System.Drawing.Color.White;
this.btnInstall.Location = new System.Drawing.Point(815, 34);
this.btnInstall.Name = "btnInstall";
this.btnInstall.Size = new System.Drawing.Size(181, 35);
this.btnInstall.TabIndex = 191;
this.btnInstall.Text = "Install packages";
this.btnInstall.UseVisualStyleBackColor = false;
this.btnInstall.Click += new System.EventHandler(this.btnInstall_Click);
//
// PackagesPageView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScroll = true;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.textSearch);
this.Controls.Add(this.lblHeader);
this.Controls.Add(this.btnBack);
this.Controls.Add(this.btnRemoveAll);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnInstall);
this.Controls.Add(this.lblLocal);
this.Controls.Add(this.lblHeader);
this.Controls.Add(this.listRemote);
this.Controls.Add(this.lblRemote);
this.Controls.Add(this.textSearch);
this.Controls.Add(this.btnBack);
this.Controls.Add(this.btnRemove);
this.Controls.Add(this.btnAddAll);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.richStatus);
this.Controls.Add(this.listLocal);
this.Controls.Add(this.btnAddAll);
this.Controls.Add(this.btnRemoveAll);
this.Name = "PackagesPageView";
this.Size = new System.Drawing.Size(1054, 795);
this.groupBox2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.Size = new System.Drawing.Size(1107, 805);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ListBox listRemote;
private System.Windows.Forms.Button btnRemoveAll;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ListBox listLocal;
private System.Windows.Forms.Button btnInstall;
private System.Windows.Forms.Button btnRemove;
private System.Windows.Forms.Button btnAddAll;
private System.Windows.Forms.Button btnAdd;
public System.Windows.Forms.RichTextBox richStatus;
private System.Windows.Forms.Button btnBack;
private System.Windows.Forms.Label lblHeader;
private System.Windows.Forms.TextBox textSearch;
private System.Windows.Forms.Label lblRemote;
private System.Windows.Forms.ListBox listRemote;
public System.Windows.Forms.RichTextBox richStatus;
private System.Windows.Forms.Label lblHeader;
private System.Windows.Forms.Label lblLocal;
private System.Windows.Forms.Button btnInstall;
}
}

View File

@ -3,20 +3,19 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BloatyNosy
namespace Bloatynosy.Views
{
public partial class PackagesPageView : UserControl
{
private List<string> Packages = new List<string>();
private List<string> remoteApps = new List<string>();
private string fPackagesLocal = HelperTool.Utils.Data.DataRootDir + "InstaPackage.app";
private string fPackagesLocal = HelperTool.Utils.Data.DataRootDir + "Packages.app";
public PackagesPageView()
{
@ -26,26 +25,27 @@ namespace BloatyNosy
listRemote.Items.AddRange(remoteApps.ToArray());
GetPackagesLocal();
SetStyle();
}
// Some UI nicety
private void SetStyle()
{
// Segoe MDL2 Assets
btnBack.Text = "\uE72B";
// Some color styling
BackColor =
listRemote.BackColor =
listLocal.BackColor =
richStatus.BackColor =
Color.FromArgb(239, 239, 247);
btnBack.Text = "\uE72B";
Color.FromArgb(245, 241, 249);
}
public void RequestPackagesRemote()
{
try
{
var webRequest = WebRequest.Create(@"https://raw.githubusercontent.com/builtbybel/BloatyNosy/main/assets/packages.git");
var webRequest = WebRequest.Create(@"https://raw.githubusercontent.com/builtbybel/Bloatynosy/main/assets/packages.git");
string app;
using (var response = webRequest.GetResponse())
@ -74,7 +74,7 @@ namespace BloatyNosy
string[] appsInstall = File.ReadAllLines(fPackagesLocal);
listRemote.Items.Clear();
groupBox2.Text = "Offline ppackages";
lblRemote.Text = "Offline packages";
foreach (var currentApp in appsInstall)
{
if (!currentApp.StartsWith("#") && (!string.IsNullOrEmpty(currentApp)))
@ -197,18 +197,14 @@ namespace BloatyNosy
await Task.Run(() => WingetInstallPackage(p));
}
groupBox1.Text = "The following apps have been installed";
lblLocal.Text = "The following apps have been installed";
listLocal.Visible = true;
btnInstall.Enabled = true;
richStatus.Visible = false;
}
private void btnBack_Click(object sender, EventArgs e)
{
var mainForm = Application.OpenForms.OfType<MainForm>().Single();
mainForm.pnlForm.Controls.Clear();
if (mainForm.INavPage != null) mainForm.pnlForm.Controls.Add(mainForm.INavPage);
}
=> ViewHelper.SwitchView.SetMainFormAsView();
private void textSearch_Click(object sender, EventArgs e)
=> textSearch.Text = "";

View File

@ -1,10 +1,10 @@
using BloatyNosy;
using Bloatynosy;
using System;
using System.Diagnostics;
using System.IO;
using System.Net;
namespace Features.Feature.System
namespace Features.Feature.Bloatware
{
internal class OneDriveRemove : FeatureBase
{

View File

@ -1,9 +1,9 @@
using BloatyNosy;
using Bloatynosy;
using System.Linq;
using System.Management.Automation;
using System.Text.RegularExpressions;
namespace Features.Feature.Apps
namespace Features.Feature.Bloatware
{
internal class StoreApps : FeatureBase
{
@ -12,12 +12,12 @@ namespace Features.Feature.Apps
public override string ID()
{
return "*[HIGH] Search and remove pre-installed bloatware apps automatically (Configure with a right-click)";
return "*[HIGH] Search and remove pre-installed bloatware apps automatically";
}
public override string Info()
{
return "To remove specific apps use the BloatPilot app in the \"More Apps\" section or right click on this feature";
return "To remove specific apps use the Bloatpilot function in the bottom right corner.";
}
private void RemoveApps(string str, out bool removed)
@ -51,26 +51,31 @@ namespace Features.Feature.Apps
powerShell.AddCommand("Select").AddParameter("property", "name");
bool foundMatches = false; // Flag variable to track if matches are found
logger.Log("The following bloatware has been found:");
logger.Log("8. The following bloatware has been found:");
foreach (PSObject result in powerShell.Invoke())
try
{
string current = result.Properties["Name"].Value.ToString();
if (apps.Contains(Regex.Replace(current, "(@{Name=)|(})", "")))
foreach (PSObject result in powerShell.Invoke())
{
string current = result.Properties["Name"].Value.ToString();
foundMatches = true;
logger.Log((Regex.Replace(current, "(@{Name=)|(})", "")));
if (apps.Contains(Regex.Replace(current, "(@{Name=)|(})", "")))
{
foundMatches = true;
logger.Log((Regex.Replace(current, "(@{Name=)|(})", "")));
}
}
}
catch { }
if (!foundMatches)
{
logger.Log("Your system is free of bloatware.");
}
{
logger.Log("Your system is free of bloatware.");
}
return foundMatches; // Return value of foundMatches
return foundMatches; // Return value of foundMatches
}
public override bool DoFeature()

View File

@ -1,10 +1,10 @@
using BloatyNosy;
using Bloatynosy;
using System;
using System.Diagnostics;
using System.IO;
using System.Management.Automation;
namespace Features.Feature.Apps
namespace Features.Feature.Bloatware
{
internal class StoreAppsPrivate : FeatureBase
{
@ -13,12 +13,12 @@ namespace Features.Feature.Apps
public override string ID()
{
return "*[LOW] Remove bloatware based on private database (Configure with a right-click)";
return "*[LOW] Remove bloatware based on private database";
}
public override string Info()
{
return "Open the bloaty.txt file in the app directory of BloatyNosy to edit your database or right click on this feature";
return "Open the bloaty.txt file in the app directory of Bloatynosy to edit your database.";
}
private void RemoveApps(string str)
@ -52,7 +52,7 @@ namespace Features.Feature.Apps
.AddCommand("Select").AddParameter("property", "name");
bool foundMatch = false;
logger.Log("The following apps would be removed based on your private bloatware database:");
logger.Log("8. The following apps would be removed based on your private bloatware database:");
foreach (string line in num)
{
string[] package = line.Split(':');

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace BloatyNosy
namespace Bloatynosy
{
public static class BloatwareList
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace BloatyNosy
namespace Bloatynosy
{
public static class BloatwareHallOfShame
{

View File

@ -0,0 +1,77 @@
using Bloatynosy;
using Microsoft.Win32;
using System;
namespace Features.Feature.Taskbar
{
internal class Copilot: FeatureBase
{
private static readonly ErrorHelper logger = ErrorHelper.Instance;
private const string showCopilotButton = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced";
private const string turnOffWindowsCopilotU = @"HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsCopilot";
private const string turnOffWindowsCopilotM = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsCopilot";
private const int desiredValue = 1;
public override string ID()
{
return "[MIDDLE] Disable Windows Copilot";
}
public override string Info()
{
return "Copilot in Windows is an artificial intelligence assistant that's integrated in Windows 11 to enhance productivity and creativity.";
}
public override bool CheckFeature()
{
return !(
RegistryHelper.IntEquals(showCopilotButton, "ShowCopilotButton", 0) &&
RegistryHelper.IntEquals(turnOffWindowsCopilotU, "TurnOffWindowsCopilot", desiredValue) &&
RegistryHelper.IntEquals(turnOffWindowsCopilotM, "TurnOffWindowsCopilot", desiredValue)
);
}
public override bool DoFeature()
{
try
{
Registry.SetValue(showCopilotButton, "ShowCopilotButton", 0, RegistryValueKind.DWord);
Registry.SetValue(turnOffWindowsCopilotU, "TurnOffWindowsCopilot", desiredValue, RegistryValueKind.DWord);
Registry.SetValue(turnOffWindowsCopilotM, "TurnOffWindowsCopilot", desiredValue, RegistryValueKind.DWord);
logger.Log("- Copilot has been successfully disabled.");
logger.Log(showCopilotButton + Environment.NewLine + turnOffWindowsCopilotU + Environment.NewLine + turnOffWindowsCopilotM);
return true;
}
catch (Exception ex)
{ logger.Log("Could not disable Copilot {0}", ex.Message); }
return false;
}
public override bool UndoFeature()
{
try
{
var RegKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", true);
RegKey.DeleteValue("ShowCopilotButton");
var RegKeyU = Registry.CurrentUser.OpenSubKey(@"Software\Policies\Microsoft\Windows\WindowsCopilot", true);
RegKeyU.DeleteValue("TurnOffWindowsCopilot");
var RegKeyM = Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows\WindowsCopilot", true);
RegKeyM.DeleteValue("TurnOffWindowsCopilot");
logger.Log("+ Copilot has been successfully enabled.");
return true;
}
catch (Exception ex)
{ logger.Log("Could not enable Copilot {0}", ex.Message); }
return false;
}
}
}

View File

@ -0,0 +1,61 @@
using Bloatynosy;
using Microsoft.Win32;
using System;
namespace Features.Feature.Taskbar
{
internal class StartmenuSearch : FeatureBase
{
private static readonly ErrorHelper logger = ErrorHelper.Instance;
private const string keyName = @"HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer";
private const int desiredValue = 1;
public override string ID()
{
return "[HIGH] Disable start menu Bing search";
}
public override string Info()
{
return "This will disable web search recommendations from the start menu search bar.\nThere is no need for web search results there. That search should return local files and applications.";
}
public override bool CheckFeature()
{
return !(
RegistryHelper.IntEquals(keyName, "DisableSearchBoxSuggestions", desiredValue)
);
}
public override bool DoFeature()
{
try
{
Registry.SetValue(keyName, "DisableSearchBoxSuggestions", desiredValue, RegistryValueKind.DWord);
logger.Log("- Start menu Bing search has been disabled.");
logger.Log(keyName);
return true;
}
catch (Exception ex)
{ logger.Log("Could not disable start menu Bing search {0}", ex.Message); }
return false;
}
public override bool UndoFeature()
{
try
{
Registry.SetValue(keyName, "DisableSearchBoxSuggestions", 0, RegistryValueKind.DWord);
logger.Log("+ Start menu Bing search has been enabled.");
return true;
}
catch
{ }
return false;
}
}
}

62
src/Bloatynosy/Github.cs Normal file
View File

@ -0,0 +1,62 @@
using System;
using System.IO;
using System.Net.Http;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Threading.Tasks;
namespace Bloatynosy
{
internal class Stargazers
{
// Event to be subscribed on Mainform
public event EventHandler<int> StargazersCountFetched;
// Attributes to indicate that class is a data contract
[Serializable]
[DataContract]
public class GitHubRepository
{
[DataMember(Name = "stargazers_count")] // matches GitHub API response
public int StargazersCount { get; set; }
}
public async Task FetchStargazersAsync()
{
string repositoryOwner = "builtbybel";
string repositoryName = "Bloatynosy";
string apiUrl = $"https://api.github.com/repos/{repositoryOwner}/{repositoryName}";
try
{
using (HttpClient client = new HttpClient())
{
// Add an appropriate user agent header
client.DefaultRequestHeaders.Add("User-Agent", "Bloatynosy");
// Make GET request
Stream responseStream = await client.GetStreamAsync(apiUrl);
// Deserialize JSON using DataContractJsonSerializer
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(GitHubRepository));
GitHubRepository repoInfo = (GitHubRepository)serializer.ReadObject(responseStream);
// Extract and display stargazers count
int stargazersCount = repoInfo.StargazersCount;
// Notify subscribers (MainForm) about the fetched stargazers count
StargazersCountFetched?.Invoke(this, stargazersCount);
}
}
catch (Exception ex)
{
// Handle exception
Console.WriteLine($"{ex.Message}");
// Notify subscribers about exceptions
StargazersCountFetched?.Invoke(this, -1);
}
}
}
}

View File

@ -0,0 +1,34 @@
using Bloatynosy;
using Bloatynosy.Views;
using System.Linq;
using System.Windows.Forms;
namespace ViewHelper
{
public static class SwitchView
{
public static MainForm mainForm;
public static Control INavPage;
public static void SetView(Control View)
{
var control = View as Control;
control.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom);
control.Dock = DockStyle.Fill;
INavPage.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom);
INavPage.Dock = DockStyle.Fill;
mainForm.pnlForm.Controls.Clear();
mainForm.pnlForm.Controls.Add(View);
}
// Handle the back navigation
public static void SetMainFormAsView()
{
var mainForm = Application.OpenForms.OfType<MainForm>().Single();
mainForm.pnlForm.Controls.Clear();
if (INavPage != null) mainForm.pnlForm.Controls.Add(INavPage);
}
}
}

37
src/Bloatynosy/Views/Bloat-E.Designer.cs generated Normal file
View File

@ -0,0 +1,37 @@
namespace BloatyNosy.Views
{
partial class Bloat_E
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BloatyNosy.Views
{
public partial class Bloat_E : UserControl
{
public Bloat_E()
{
InitializeComponent();
}
}
}

View File

@ -1,6 +1,6 @@
namespace BloatyNosy
namespace Bloatynosy.Views
{
partial class AppsPageView
partial class BloatyPageView
{
/// <summary>
/// Erforderliche Designervariable.
@ -32,7 +32,6 @@
System.Windows.Forms.ToolStripMenuItem menuAppsExport;
this.listRemove = new System.Windows.Forms.ListBox();
this.rtbStatus = new System.Windows.Forms.RichTextBox();
this.btnAppOptions = new System.Windows.Forms.Button();
this.btnRestoreAll = new System.Windows.Forms.Button();
this.btnRestore = new System.Windows.Forms.Button();
this.btnMoveAll = new System.Windows.Forms.Button();
@ -42,26 +41,20 @@
this.lblHeader = new System.Windows.Forms.Label();
this.listApps = new System.Windows.Forms.ListBox();
this.checkAppsSystem = new System.Windows.Forms.CheckBox();
this.groupBin = new System.Windows.Forms.GroupBox();
this.picAppsPoster = new System.Windows.Forms.PictureBox();
this.lblAppsBinOptions = new System.Windows.Forms.LinkLabel();
this.groupInstalled = new System.Windows.Forms.GroupBox();
this.lblBloatOpt1 = new System.Windows.Forms.LinkLabel();
this.textSearch = new System.Windows.Forms.TextBox();
this.btnHMenu = new System.Windows.Forms.Button();
this.contextAppMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuAppsImport = new System.Windows.Forms.ToolStripMenuItem();
this.menuAppsRemoveAll = new System.Windows.Forms.ToolStripMenuItem();
this.contextAppMenuOptions = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuAppsCommunity = new System.Windows.Forms.ToolStripMenuItem();
this.menuAppsHallOfShame = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.menuRefresh = new System.Windows.Forms.ToolStripMenuItem();
this.lblInstalled = new System.Windows.Forms.Label();
this.lblBin = new System.Windows.Forms.Label();
this.lblBloatOpt2 = new System.Windows.Forms.LinkLabel();
this.btnRefresh = new System.Windows.Forms.Button();
menuAppsExport = new System.Windows.Forms.ToolStripMenuItem();
this.groupBin.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picAppsPoster)).BeginInit();
this.groupInstalled.SuspendLayout();
this.contextAppMenu.SuspendLayout();
this.contextAppMenuOptions.SuspendLayout();
this.SuspendLayout();
//
// menuAppsExport
@ -80,56 +73,41 @@
this.listRemove.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listRemove.FormattingEnabled = true;
this.listRemove.ItemHeight = 17;
this.listRemove.Location = new System.Drawing.Point(11, 36);
this.listRemove.Location = new System.Drawing.Point(823, 107);
this.listRemove.Name = "listRemove";
this.listRemove.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listRemove.Size = new System.Drawing.Size(394, 595);
this.listRemove.Size = new System.Drawing.Size(270, 646);
this.listRemove.Sorted = true;
this.listRemove.TabIndex = 13;
//
// rtbStatus
//
this.rtbStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.rtbStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.rtbStatus.BackColor = System.Drawing.Color.White;
this.rtbStatus.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.rtbStatus.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rtbStatus.ForeColor = System.Drawing.Color.Black;
this.rtbStatus.HideSelection = false;
this.rtbStatus.Location = new System.Drawing.Point(11, 66);
this.rtbStatus.Location = new System.Drawing.Point(823, 107);
this.rtbStatus.Name = "rtbStatus";
this.rtbStatus.ReadOnly = true;
this.rtbStatus.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.rtbStatus.Size = new System.Drawing.Size(393, 570);
this.rtbStatus.Size = new System.Drawing.Size(270, 656);
this.rtbStatus.TabIndex = 139;
this.rtbStatus.Text = "";
this.rtbStatus.Visible = false;
//
// btnAppOptions
//
this.btnAppOptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAppOptions.BackColor = System.Drawing.Color.MediumVioletRed;
this.btnAppOptions.FlatAppearance.BorderColor = System.Drawing.Color.Orchid;
this.btnAppOptions.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAppOptions.Font = new System.Drawing.Font("Segoe Fluent Icons", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAppOptions.ForeColor = System.Drawing.Color.White;
this.btnAppOptions.Location = new System.Drawing.Point(977, 49);
this.btnAppOptions.Name = "btnAppOptions";
this.btnAppOptions.Size = new System.Drawing.Size(31, 30);
this.btnAppOptions.TabIndex = 38;
this.btnAppOptions.Text = "...";
this.btnAppOptions.UseVisualStyleBackColor = false;
this.btnAppOptions.Click += new System.EventHandler(this.btnAppOptions_Click);
//
// btnRestoreAll
//
this.btnRestoreAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRestoreAll.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnRestoreAll.AutoEllipsis = true;
this.btnRestoreAll.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRestoreAll.ForeColor = System.Drawing.Color.Black;
this.btnRestoreAll.Location = new System.Drawing.Point(482, 313);
this.btnRestoreAll.Location = new System.Drawing.Point(449, 493);
this.btnRestoreAll.Name = "btnRestoreAll";
this.btnRestoreAll.Size = new System.Drawing.Size(89, 23);
this.btnRestoreAll.Size = new System.Drawing.Size(239, 23);
this.btnRestoreAll.TabIndex = 34;
this.btnRestoreAll.Text = "<< Restore all";
this.btnRestoreAll.UseVisualStyleBackColor = true;
@ -137,12 +115,14 @@
//
// btnRestore
//
this.btnRestore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRestore.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnRestore.AutoEllipsis = true;
this.btnRestore.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRestore.ForeColor = System.Drawing.Color.Black;
this.btnRestore.Location = new System.Drawing.Point(482, 342);
this.btnRestore.Location = new System.Drawing.Point(449, 464);
this.btnRestore.Name = "btnRestore";
this.btnRestore.Size = new System.Drawing.Size(89, 23);
this.btnRestore.Size = new System.Drawing.Size(239, 23);
this.btnRestore.TabIndex = 32;
this.btnRestore.Text = "< Restore";
this.btnRestore.UseVisualStyleBackColor = true;
@ -150,12 +130,14 @@
//
// btnMoveAll
//
this.btnMoveAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnMoveAll.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnMoveAll.AutoEllipsis = true;
this.btnMoveAll.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnMoveAll.ForeColor = System.Drawing.Color.Black;
this.btnMoveAll.Location = new System.Drawing.Point(482, 201);
this.btnMoveAll.Location = new System.Drawing.Point(449, 406);
this.btnMoveAll.Name = "btnMoveAll";
this.btnMoveAll.Size = new System.Drawing.Size(89, 23);
this.btnMoveAll.Size = new System.Drawing.Size(239, 23);
this.btnMoveAll.TabIndex = 35;
this.btnMoveAll.Text = "Move all >>";
this.btnMoveAll.UseVisualStyleBackColor = true;
@ -163,12 +145,14 @@
//
// btnMove
//
this.btnMove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnMove.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnMove.AutoEllipsis = true;
this.btnMove.Font = new System.Drawing.Font("Segoe UI Variable Text", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnMove.ForeColor = System.Drawing.Color.Black;
this.btnMove.Location = new System.Drawing.Point(482, 230);
this.btnMove.Location = new System.Drawing.Point(449, 377);
this.btnMove.Name = "btnMove";
this.btnMove.Size = new System.Drawing.Size(89, 23);
this.btnMove.Size = new System.Drawing.Size(239, 23);
this.btnMove.TabIndex = 31;
this.btnMove.Text = "Move >";
this.btnMove.UseVisualStyleBackColor = true;
@ -178,15 +162,14 @@
//
this.btnUninstall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnUninstall.BackColor = System.Drawing.Color.MediumVioletRed;
this.btnUninstall.FlatAppearance.BorderColor = System.Drawing.Color.Orchid;
this.btnUninstall.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUninstall.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnUninstall.FlatAppearance.BorderSize = 0;
this.btnUninstall.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnUninstall.ForeColor = System.Drawing.Color.White;
this.btnUninstall.Location = new System.Drawing.Point(797, 49);
this.btnUninstall.Location = new System.Drawing.Point(815, 34);
this.btnUninstall.Name = "btnUninstall";
this.btnUninstall.Size = new System.Drawing.Size(181, 30);
this.btnUninstall.Size = new System.Drawing.Size(181, 35);
this.btnUninstall.TabIndex = 41;
this.btnUninstall.Text = "Empty bin and remove apps";
this.btnUninstall.Text = "Empty bin";
this.btnUninstall.UseVisualStyleBackColor = false;
this.btnUninstall.Click += new System.EventHandler(this.btnUninstall_Click);
//
@ -207,29 +190,31 @@
//
// lblHeader
//
this.lblHeader.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblHeader.AutoEllipsis = true;
this.lblHeader.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblHeader.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.lblHeader.Location = new System.Drawing.Point(80, 4);
this.lblHeader.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 18.25F, System.Drawing.FontStyle.Bold);
this.lblHeader.ForeColor = System.Drawing.Color.Black;
this.lblHeader.Location = new System.Drawing.Point(294, 31);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Size = new System.Drawing.Size(960, 32);
this.lblHeader.Size = new System.Drawing.Size(515, 32);
this.lblHeader.TabIndex = 177;
this.lblHeader.Text = "BloatPilot";
this.lblHeader.Text = "Bloatpilot";
this.lblHeader.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// listApps
//
this.listApps.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listApps.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.listApps.BackColor = System.Drawing.Color.White;
this.listApps.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listApps.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listApps.FormattingEnabled = true;
this.listApps.ItemHeight = 17;
this.listApps.Location = new System.Drawing.Point(11, 36);
this.listApps.Location = new System.Drawing.Point(44, 99);
this.listApps.Name = "listApps";
this.listApps.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listApps.Size = new System.Drawing.Size(394, 595);
this.listApps.Size = new System.Drawing.Size(270, 629);
this.listApps.Sorted = true;
this.listApps.TabIndex = 13;
//
@ -238,33 +223,17 @@
this.checkAppsSystem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkAppsSystem.AutoSize = true;
this.checkAppsSystem.FlatAppearance.BorderSize = 0;
this.checkAppsSystem.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.checkAppsSystem.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.checkAppsSystem.ForeColor = System.Drawing.Color.DeepPink;
this.checkAppsSystem.Location = new System.Drawing.Point(35, 744);
this.checkAppsSystem.Location = new System.Drawing.Point(44, 754);
this.checkAppsSystem.Name = "checkAppsSystem";
this.checkAppsSystem.Size = new System.Drawing.Size(135, 21);
this.checkAppsSystem.Size = new System.Drawing.Size(132, 21);
this.checkAppsSystem.TabIndex = 16;
this.checkAppsSystem.Text = "Show system apps";
this.checkAppsSystem.UseVisualStyleBackColor = true;
this.checkAppsSystem.CheckedChanged += new System.EventHandler(this.checkAppsSystem_CheckedChanged);
//
// groupBin
//
this.groupBin.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBin.Controls.Add(this.picAppsPoster);
this.groupBin.Controls.Add(this.rtbStatus);
this.groupBin.Controls.Add(this.lblAppsBinOptions);
this.groupBin.Controls.Add(this.listRemove);
this.groupBin.Font = new System.Drawing.Font("Segoe UI Variable Text", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBin.ForeColor = System.Drawing.Color.DeepPink;
this.groupBin.Location = new System.Drawing.Point(609, 82);
this.groupBin.Name = "groupBin";
this.groupBin.Size = new System.Drawing.Size(411, 648);
this.groupBin.TabIndex = 39;
this.groupBin.TabStop = false;
this.groupBin.Text = "Recycle bin";
//
// picAppsPoster
//
this.picAppsPoster.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -272,56 +241,41 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.picAppsPoster.ErrorImage = null;
this.picAppsPoster.InitialImage = null;
this.picAppsPoster.Location = new System.Drawing.Point(38, 105);
this.picAppsPoster.Location = new System.Drawing.Point(320, 136);
this.picAppsPoster.Name = "picAppsPoster";
this.picAppsPoster.Size = new System.Drawing.Size(331, 454);
this.picAppsPoster.Size = new System.Drawing.Size(497, 235);
this.picAppsPoster.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picAppsPoster.TabIndex = 161;
this.picAppsPoster.TabStop = false;
this.picAppsPoster.Visible = false;
//
// lblAppsBinOptions
// lblBloatOpt1
//
this.lblAppsBinOptions.ActiveLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppsBinOptions.AutoEllipsis = true;
this.lblAppsBinOptions.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblAppsBinOptions.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lblAppsBinOptions.LinkColor = System.Drawing.Color.Gray;
this.lblAppsBinOptions.Location = new System.Drawing.Point(8, 36);
this.lblAppsBinOptions.Name = "lblAppsBinOptions";
this.lblAppsBinOptions.Size = new System.Drawing.Size(361, 16);
this.lblAppsBinOptions.TabIndex = 159;
this.lblAppsBinOptions.TabStop = true;
this.lblAppsBinOptions.Text = "Move the apps you want to uninstall here or import via file.";
this.lblAppsBinOptions.VisitedLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblAppsBinOptions.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblAppsBinOptions_LinkClicked);
//
// groupInstalled
//
this.groupInstalled.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupInstalled.Controls.Add(this.listApps);
this.groupInstalled.Font = new System.Drawing.Font("Segoe UI Variable Text", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupInstalled.ForeColor = System.Drawing.Color.Violet;
this.groupInstalled.Location = new System.Drawing.Point(28, 82);
this.groupInstalled.Name = "groupInstalled";
this.groupInstalled.Size = new System.Drawing.Size(411, 648);
this.groupInstalled.TabIndex = 40;
this.groupInstalled.TabStop = false;
this.groupInstalled.Text = "Installed apps";
this.lblBloatOpt1.ActiveLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblBloatOpt1.AutoEllipsis = true;
this.lblBloatOpt1.AutoSize = true;
this.lblBloatOpt1.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblBloatOpt1.LinkBehavior = System.Windows.Forms.LinkBehavior.AlwaysUnderline;
this.lblBloatOpt1.LinkColor = System.Drawing.Color.MediumVioletRed;
this.lblBloatOpt1.Location = new System.Drawing.Point(339, 110);
this.lblBloatOpt1.Name = "lblBloatOpt1";
this.lblBloatOpt1.Size = new System.Drawing.Size(121, 17);
this.lblBloatOpt1.TabIndex = 159;
this.lblBloatOpt1.TabStop = true;
this.lblBloatOpt1.Text = "Try these bloatware";
this.lblBloatOpt1.VisitedLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblBloatOpt1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblBloatOpt1_LinkClicked);
//
// textSearch
//
this.textSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.textSearch.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.textSearch.BackColor = System.Drawing.Color.WhiteSmoke;
this.textSearch.Font = new System.Drawing.Font("Segoe UI Variable Text", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textSearch.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textSearch.ForeColor = System.Drawing.Color.Gray;
this.textSearch.Location = new System.Drawing.Point(469, 29);
this.textSearch.Location = new System.Drawing.Point(485, 66);
this.textSearch.Name = "textSearch";
this.textSearch.Size = new System.Drawing.Size(122, 23);
this.textSearch.Size = new System.Drawing.Size(149, 25);
this.textSearch.TabIndex = 181;
this.textSearch.Text = "Search...";
this.textSearch.Text = "Search";
this.textSearch.Click += new System.EventHandler(this.textSearch_Click);
this.textSearch.TextChanged += new System.EventHandler(this.textSearch_TextChanged);
//
@ -367,72 +321,91 @@
this.menuAppsRemoveAll.Text = "Uninstall all apps";
this.menuAppsRemoveAll.Click += new System.EventHandler(this.menuAppsRemoveAll_Click);
//
// contextAppMenuOptions
// lblInstalled
//
this.contextAppMenuOptions.BackColor = System.Drawing.Color.WhiteSmoke;
this.contextAppMenuOptions.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.contextAppMenuOptions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuAppsCommunity,
this.menuAppsHallOfShame,
this.toolStripSeparator2,
this.menuRefresh});
this.contextAppMenuOptions.Name = "menuMain";
this.contextAppMenuOptions.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.contextAppMenuOptions.Size = new System.Drawing.Size(368, 76);
this.contextAppMenuOptions.Text = "Info";
this.lblInstalled.AutoSize = true;
this.lblInstalled.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblInstalled.ForeColor = System.Drawing.Color.Black;
this.lblInstalled.Location = new System.Drawing.Point(41, 70);
this.lblInstalled.Name = "lblInstalled";
this.lblInstalled.Size = new System.Drawing.Size(56, 17);
this.lblInstalled.TabIndex = 185;
this.lblInstalled.Text = "Installed";
//
// menuAppsCommunity
// lblBin
//
this.menuAppsCommunity.Name = "menuAppsCommunity";
this.menuAppsCommunity.Size = new System.Drawing.Size(367, 22);
this.menuAppsCommunity.Text = "Add bloatware rated by community to recycle bin";
this.menuAppsCommunity.Click += new System.EventHandler(this.menuAppsCommunity_Click);
this.lblBin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblBin.AutoSize = true;
this.lblBin.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F);
this.lblBin.ForeColor = System.Drawing.Color.Black;
this.lblBin.Location = new System.Drawing.Point(820, 79);
this.lblBin.Name = "lblBin";
this.lblBin.Size = new System.Drawing.Size(74, 17);
this.lblBin.TabIndex = 186;
this.lblBin.Text = "Recycle Bin";
//
// menuAppsHallOfShame
// lblBloatOpt2
//
this.menuAppsHallOfShame.Name = "menuAppsHallOfShame";
this.menuAppsHallOfShame.Size = new System.Drawing.Size(367, 22);
this.menuAppsHallOfShame.Text = "Add the 10 most hated apps of Windows 11 to recycle bin";
this.menuAppsHallOfShame.Click += new System.EventHandler(this.menuAppsHallOfShame_Click);
this.lblBloatOpt2.ActiveLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblBloatOpt2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblBloatOpt2.AutoEllipsis = true;
this.lblBloatOpt2.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblBloatOpt2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lblBloatOpt2.LinkColor = System.Drawing.Color.DimGray;
this.lblBloatOpt2.Location = new System.Drawing.Point(467, 110);
this.lblBloatOpt2.Name = "lblBloatOpt2";
this.lblBloatOpt2.Size = new System.Drawing.Size(347, 23);
this.lblBloatOpt2.TabIndex = 187;
this.lblBloatOpt2.TabStop = true;
this.lblBloatOpt2.Text = "Add most hated";
this.lblBloatOpt2.VisitedLinkColor = System.Drawing.Color.MediumVioletRed;
this.lblBloatOpt2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblBloatOpt2_LinkClicked);
//
// toolStripSeparator2
// btnRefresh
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(364, 6);
this.btnRefresh.BackColor = System.Drawing.Color.Transparent;
this.btnRefresh.FlatAppearance.BorderColor = System.Drawing.Color.White;
this.btnRefresh.FlatAppearance.BorderSize = 0;
this.btnRefresh.Font = new System.Drawing.Font("Segoe Fluent Icons", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRefresh.ForeColor = System.Drawing.Color.Black;
this.btnRefresh.Location = new System.Drawing.Point(75, 0);
this.btnRefresh.Name = "btnRefresh";
this.btnRefresh.Size = new System.Drawing.Size(42, 38);
this.btnRefresh.TabIndex = 191;
this.btnRefresh.Text = "...";
this.btnRefresh.UseVisualStyleBackColor = false;
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
//
// menuRefresh
//
this.menuRefresh.Name = "menuRefresh";
this.menuRefresh.Size = new System.Drawing.Size(367, 22);
this.menuRefresh.Text = "Refresh";
this.menuRefresh.Click += new System.EventHandler(this.menuRefresh_Click);
//
// AppsPageView
// BloatyPageView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScroll = true;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.btnRefresh);
this.Controls.Add(this.lblBloatOpt2);
this.Controls.Add(this.picAppsPoster);
this.Controls.Add(this.lblBloatOpt1);
this.Controls.Add(this.lblBin);
this.Controls.Add(this.lblInstalled);
this.Controls.Add(this.listApps);
this.Controls.Add(this.checkAppsSystem);
this.Controls.Add(this.btnHMenu);
this.Controls.Add(this.textSearch);
this.Controls.Add(this.lblHeader);
this.Controls.Add(this.btnBack);
this.Controls.Add(this.btnUninstall);
this.Controls.Add(this.groupBin);
this.Controls.Add(this.btnAppOptions);
this.Controls.Add(this.btnRestoreAll);
this.Controls.Add(this.groupInstalled);
this.Controls.Add(this.btnRestore);
this.Controls.Add(this.btnMoveAll);
this.Controls.Add(this.btnMove);
this.Name = "AppsPageView";
this.Size = new System.Drawing.Size(1054, 795);
this.groupBin.ResumeLayout(false);
this.Controls.Add(this.listRemove);
this.Controls.Add(this.rtbStatus);
this.Name = "BloatyPageView";
this.Size = new System.Drawing.Size(1107, 805);
((System.ComponentModel.ISupportInitialize)(this.picAppsPoster)).EndInit();
this.groupInstalled.ResumeLayout(false);
this.contextAppMenu.ResumeLayout(false);
this.contextAppMenuOptions.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -440,7 +413,6 @@
#endregion
private System.Windows.Forms.ListBox listRemove;
private System.Windows.Forms.Button btnAppOptions;
private System.Windows.Forms.Button btnRestoreAll;
private System.Windows.Forms.Button btnRestore;
private System.Windows.Forms.Button btnMoveAll;
@ -451,19 +423,16 @@
private System.Windows.Forms.Label lblHeader;
private System.Windows.Forms.ListBox listApps;
private System.Windows.Forms.CheckBox checkAppsSystem;
private System.Windows.Forms.GroupBox groupBin;
private System.Windows.Forms.GroupBox groupInstalled;
private System.Windows.Forms.TextBox textSearch;
private System.Windows.Forms.LinkLabel lblAppsBinOptions;
private System.Windows.Forms.LinkLabel lblBloatOpt1;
private System.Windows.Forms.Button btnHMenu;
private System.Windows.Forms.ContextMenuStrip contextAppMenu;
private System.Windows.Forms.ToolStripMenuItem menuAppsImport;
private System.Windows.Forms.ToolStripMenuItem menuAppsRemoveAll;
private System.Windows.Forms.ContextMenuStrip contextAppMenuOptions;
private System.Windows.Forms.ToolStripMenuItem menuAppsCommunity;
private System.Windows.Forms.ToolStripMenuItem menuAppsHallOfShame;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem menuRefresh;
private System.Windows.Forms.PictureBox picAppsPoster;
private System.Windows.Forms.Label lblInstalled;
private System.Windows.Forms.Label lblBin;
private System.Windows.Forms.LinkLabel lblBloatOpt2;
private System.Windows.Forms.Button btnRefresh;
}
}

View File

@ -8,9 +8,9 @@ using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BloatyNosy
namespace Bloatynosy.Views
{
public partial class AppsPageView : UserControl
public partial class BloatyPageView : UserControl
{
private List<string> removeAppsList = new List<string>();
private List<string> removeAppsFailedList = new List<string>();
@ -18,7 +18,7 @@ namespace BloatyNosy
private readonly PowerShell powerShell = PowerShell.Create();
public AppsPageView()
public BloatyPageView()
{
InitializeComponent();
@ -31,15 +31,16 @@ namespace BloatyNosy
// Some UI nicety
private void SetStyle()
{
// Segoe MDL2 Assets
btnHMenu.Text = "\uE700";
btnRefresh.Text = "\uE895";
btnBack.Text = "\uE72B";
// Some color styling
BackColor =
listApps.BackColor =
listRemove.BackColor =
rtbStatus.BackColor =
Color.FromArgb(239, 239, 247);
btnHMenu.Text = "\uE700";
btnBack.Text = "\uE72B";
btnAppOptions.Text = "\uE972";
Color.FromArgb(245, 241, 249);
if (!HelperTool.Utils.IsInet()) picAppsPoster.Visible = false;
else picAppsPoster.ImageLocation = "https://github.com/builtbybel/ThisIsWin11/blob/main/assets/pages/page-apps.png?raw=true";
@ -82,7 +83,7 @@ namespace BloatyNosy
catch (FileNotFoundException) // Create file if it doesnt exisits
{
StreamWriter sw = File.CreateText(HelperTool.Utils.Data.DataRootDir + "systemApps.txt");
sw.Write(BloatyNosy.Properties.Resources.systemApps); // Populate it with built in preset
sw.Write(Bloatynosy.Properties.Resources.systemApps); // Populate it with built in preset
sw.Close();
Database = File.OpenText(HelperTool.Utils.Data.DataRootDir + "systemApps.txt");
@ -129,22 +130,16 @@ namespace BloatyNosy
{
int installed = listApps.Items.Count;
int remove = listRemove.Items.Count;
groupInstalled.Text = installed.ToString() + " apps installed";
groupBin.Text = "Recycle bin" + " (" + remove.ToString() + ")";
lblInstalled.Text = installed.ToString() + " apps installed";
lblBin.Text = "Recycle bin" + " (" + remove.ToString() + ")";
if (listRemove.Items.Count == 0)
{
lblAppsBinOptions.Visible = true;
picAppsPoster.Visible = true;
rtbStatus.Visible = true;
listRemove.Visible = false;
}
else
{
lblAppsBinOptions.Visible = false;
picAppsPoster.Visible = false;
rtbStatus.Visible = false;
listRemove.Visible = true;
}
@ -245,7 +240,7 @@ namespace BloatyNosy
{
selectedApps += app + Environment.NewLine;
}
if (MessageBox.Show("Do you want to empty the Recycle bin and delete all apps in it?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
if (MessageBox.Show("Do you want to permanently delete all apps in the bin? ", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
removeAppsList.Clear();
removeAppsFailedList.Clear();
@ -286,7 +281,7 @@ namespace BloatyNosy
"as these apps are needed for the Windows 11 Experience and for other programs. If you try, youll see an error message saying the removal failed.";
}
menuRefresh.PerformClick();
btnRefresh.PerformClick();
btnUninstall.Enabled = true;
rtbStatus.Text = message + Environment.NewLine;
@ -294,11 +289,40 @@ namespace BloatyNosy
}
}
private void btnBack_Click(object sender, EventArgs e)
private void lblBloatOpt1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var mainForm = Application.OpenForms.OfType<MainForm>().Single();
mainForm.pnlForm.Controls.Clear();
if (mainForm.INavPage != null) mainForm.pnlForm.Controls.Add(mainForm.INavPage);
if (MessageBox.Show("This will add all the annoying bloatware apps, " +
"pre-installed on Windows 11 including some apps your PC manufacturer included to the removal list." +
"\r\n\nMost of these apps are garbage, but if you find important stuff on the list just remove it " +
"from the right box before hitting \"Uninstall\".", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
var apps = BloatwareList.GetList();
listRemove.Visible = true;
foreach (string app in apps)
{
listRemove.Items.Add(app);
}
InitializeApps();
RefreshApps();
lblBloatOpt1.Enabled = false;
}
}
private void lblBloatOpt2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var apps = BloatwareHallOfShame.GetList();
listRemove.Visible = true;
foreach (string app in apps)
{
listRemove.Items.Add(app);
}
InitializeApps();
RefreshApps();
lblBloatOpt2.Enabled = false;
}
private void textSearch_TextChanged(object sender, EventArgs e)
@ -372,12 +396,6 @@ namespace BloatyNosy
}
}
private void btnHMenu_Click(object sender, EventArgs e)
=> this.contextAppMenu.Show(Cursor.Position.X, Cursor.Position.Y);
private void lblAppsBinOptions_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> menuAppsImport.PerformClick();
private void menuAppsRemoveAll_Click(object sender, EventArgs e)
{
if (MessageBox.Show("This will remove all pre-installed apps for the logged in user, except the Microsoft Store. Do you wish to continue?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
@ -400,53 +418,22 @@ namespace BloatyNosy
}
}
private void menuAppsCommunity_Click(object sender, EventArgs e)
{
if (MessageBox.Show("This will add all the annoying bloatware apps, " +
"pre-installed on Windows 11 including some apps your PC manufacturer included to the removal list." +
"\r\n\nMost of these apps are garbage, but if you find important stuff on the list just remove it " +
"from the right box before hitting \"Uninstall\".", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
var apps = BloatwareList.GetList();
listRemove.Visible = true;
foreach (string app in apps)
{
listRemove.Items.Add(app);
}
InitializeApps();
RefreshApps();
}
}
private void menuAppsHallOfShame_Click(object sender, EventArgs e)
{
var apps = BloatwareHallOfShame.GetList();
listRemove.Visible = true;
foreach (string app in apps)
{
listRemove.Items.Add(app);
}
InitializeApps();
RefreshApps();
}
private void btnAppOptions_Click(object sender, EventArgs e)
=> this.contextAppMenuOptions.Show(Cursor.Position.X, Cursor.Position.Y);
private void menuRefresh_Click(object sender, EventArgs e)
private void btnRefresh_Click(object sender, EventArgs e)
{
listApps.Items.Clear();
listRemove.Items.Clear();
removeAppsList.Clear();
lblBloatOpt1.Enabled =
lblBloatOpt2.Enabled = true;
InitializeAppsSystem();
InitializeApps();
picAppsPoster.Visible = false;
}
private void btnBack_Click(object sender, EventArgs e)
=> ViewHelper.SwitchView.SetMainFormAsView();
private void btnHMenu_Click(object sender, EventArgs e)
=> this.contextAppMenu.Show(Cursor.Position.X, Cursor.Position.Y);
}
}

View File

@ -123,7 +123,4 @@
<metadata name="contextAppMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="contextAppMenuOptions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>172, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,410 @@
namespace Bloatynosy.Views
{
partial class NosyPageView
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.tvwFeatures = new System.Windows.Forms.TreeView();
this.btnHamburger = new System.Windows.Forms.Button();
this.contextKebapMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.textHeaderAppInfo = new System.Windows.Forms.ToolStripTextBox();
this.textHeaderExperience = new System.Windows.Forms.ToolStripTextBox();
this.cbProfiles = new System.Windows.Forms.ToolStripComboBox();
this.menuLoadProfile = new System.Windows.Forms.ToolStripMenuItem();
this.menuExportProfile = new System.Windows.Forms.ToolStripMenuItem();
this.btnNotePlugins = new System.Windows.Forms.Button();
this.contextAppMenuOptions = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuAnalyzeThis = new System.Windows.Forms.ToolStripMenuItem();
this.sc = new System.Windows.Forms.SplitContainer();
this.btnAnalyze = new System.Windows.Forms.Button();
this.lnkStatus = new System.Windows.Forms.LinkLabel();
this.lblHeader = new System.Windows.Forms.Label();
this.progress = new System.Windows.Forms.ProgressBar();
this.rtbLog = new System.Windows.Forms.RichTextBox();
this.btnApply = new System.Windows.Forms.Button();
this.btnRestore = new System.Windows.Forms.Button();
this.border = new System.Windows.Forms.Button();
this.pnlNav = new System.Windows.Forms.Panel();
this.contextKebapMenu.SuspendLayout();
this.contextAppMenuOptions.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.sc)).BeginInit();
this.sc.Panel1.SuspendLayout();
this.sc.Panel2.SuspendLayout();
this.sc.SuspendLayout();
this.pnlNav.SuspendLayout();
this.SuspendLayout();
//
// tvwFeatures
//
this.tvwFeatures.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tvwFeatures.BackColor = System.Drawing.Color.White;
this.tvwFeatures.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tvwFeatures.CheckBoxes = true;
this.tvwFeatures.Font = new System.Drawing.Font("Segoe UI Variable Text Light", 9.75F);
this.tvwFeatures.ForeColor = System.Drawing.Color.Black;
this.tvwFeatures.FullRowSelect = true;
this.tvwFeatures.ItemHeight = 37;
this.tvwFeatures.LineColor = System.Drawing.Color.DodgerBlue;
this.tvwFeatures.Location = new System.Drawing.Point(48, 14);
this.tvwFeatures.Name = "tvwFeatures";
this.tvwFeatures.ShowLines = false;
this.tvwFeatures.ShowNodeToolTips = true;
this.tvwFeatures.ShowRootLines = false;
this.tvwFeatures.Size = new System.Drawing.Size(195, 692);
this.tvwFeatures.TabIndex = 169;
this.tvwFeatures.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.tvwFeatures_AfterCheck);
this.tvwFeatures.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvwFeatures_AfterSelect);
this.tvwFeatures.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tvwFeatures_MouseUp);
//
// btnHamburger
//
this.btnHamburger.FlatAppearance.BorderSize = 0;
this.btnHamburger.FlatAppearance.MouseOverBackColor = System.Drawing.Color.LightSteelBlue;
this.btnHamburger.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnHamburger.Font = new System.Drawing.Font("Segoe Fluent Icons", 9.75F, System.Drawing.FontStyle.Bold);
this.btnHamburger.ForeColor = System.Drawing.Color.Black;
this.btnHamburger.Location = new System.Drawing.Point(3, 2);
this.btnHamburger.Name = "btnHamburger";
this.btnHamburger.Size = new System.Drawing.Size(42, 38);
this.btnHamburger.TabIndex = 176;
this.btnHamburger.Text = "...";
this.btnHamburger.UseVisualStyleBackColor = true;
this.btnHamburger.Click += new System.EventHandler(this.btnHamburger_Click);
//
// contextKebapMenu
//
this.contextKebapMenu.BackColor = System.Drawing.Color.WhiteSmoke;
this.contextKebapMenu.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.contextKebapMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.textHeaderAppInfo,
this.textHeaderExperience,
this.cbProfiles,
this.menuLoadProfile,
this.menuExportProfile});
this.contextKebapMenu.Name = "menuMain";
this.contextKebapMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.contextKebapMenu.Size = new System.Drawing.Size(261, 139);
//
// textHeaderAppInfo
//
this.textHeaderAppInfo.BackColor = System.Drawing.Color.WhiteSmoke;
this.textHeaderAppInfo.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textHeaderAppInfo.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textHeaderAppInfo.ForeColor = System.Drawing.Color.Gray;
this.textHeaderAppInfo.Margin = new System.Windows.Forms.Padding(5, 5, 0, 10);
this.textHeaderAppInfo.Name = "textHeaderAppInfo";
this.textHeaderAppInfo.ReadOnly = true;
this.textHeaderAppInfo.Size = new System.Drawing.Size(200, 18);
this.textHeaderAppInfo.Text = "App-Settings";
//
// textHeaderExperience
//
this.textHeaderExperience.BackColor = System.Drawing.Color.WhiteSmoke;
this.textHeaderExperience.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textHeaderExperience.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textHeaderExperience.ForeColor = System.Drawing.Color.MediumVioletRed;
this.textHeaderExperience.Margin = new System.Windows.Forms.Padding(5, 5, 0, 0);
this.textHeaderExperience.Name = "textHeaderExperience";
this.textHeaderExperience.Size = new System.Drawing.Size(200, 16);
this.textHeaderExperience.Text = "Choose Experience profile";
//
// cbProfiles
//
this.cbProfiles.AutoToolTip = true;
this.cbProfiles.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbProfiles.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.cbProfiles.Font = new System.Drawing.Font("Segoe UI Variable Text", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbProfiles.Name = "cbProfiles";
this.cbProfiles.Size = new System.Drawing.Size(200, 25);
//
// menuLoadProfile
//
this.menuLoadProfile.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.menuLoadProfile.Name = "menuLoadProfile";
this.menuLoadProfile.Size = new System.Drawing.Size(260, 26);
this.menuLoadProfile.Text = "Load profile";
this.menuLoadProfile.Click += new System.EventHandler(this.menuLoadProfile_Click);
//
// menuExportProfile
//
this.menuExportProfile.Name = "menuExportProfile";
this.menuExportProfile.Size = new System.Drawing.Size(260, 26);
this.menuExportProfile.Text = "Export profile";
this.menuExportProfile.Click += new System.EventHandler(this.menuExportProfile_Click);
//
// btnNotePlugins
//
this.btnNotePlugins.AutoSize = true;
this.btnNotePlugins.FlatAppearance.BorderSize = 0;
this.btnNotePlugins.FlatAppearance.MouseOverBackColor = System.Drawing.Color.LightSteelBlue;
this.btnNotePlugins.Font = new System.Drawing.Font("Segoe Fluent Icons", 10.25F);
this.btnNotePlugins.ForeColor = System.Drawing.Color.DeepPink;
this.btnNotePlugins.Location = new System.Drawing.Point(3, 44);
this.btnNotePlugins.Name = "btnNotePlugins";
this.btnNotePlugins.Size = new System.Drawing.Size(42, 38);
this.btnNotePlugins.TabIndex = 177;
this.btnNotePlugins.Text = "...";
this.btnNotePlugins.UseVisualStyleBackColor = true;
this.btnNotePlugins.Click += new System.EventHandler(this.btnNotePlugins_Click);
//
// contextAppMenuOptions
//
this.contextAppMenuOptions.BackColor = System.Drawing.Color.WhiteSmoke;
this.contextAppMenuOptions.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.contextAppMenuOptions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuAnalyzeThis});
this.contextAppMenuOptions.Name = "menuMain";
this.contextAppMenuOptions.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.contextAppMenuOptions.Size = new System.Drawing.Size(163, 30);
//
// menuAnalyzeThis
//
this.menuAnalyzeThis.Name = "menuAnalyzeThis";
this.menuAnalyzeThis.Size = new System.Drawing.Size(162, 26);
this.menuAnalyzeThis.Text = "Analyze this";
this.menuAnalyzeThis.Click += new System.EventHandler(this.menuAnalyzeThis_Click);
//
// sc
//
this.sc.Dock = System.Windows.Forms.DockStyle.Fill;
this.sc.Location = new System.Drawing.Point(0, 0);
this.sc.Name = "sc";
//
// sc.Panel1
//
this.sc.Panel1.AutoScroll = true;
this.sc.Panel1.Controls.Add(this.btnAnalyze);
this.sc.Panel1.Controls.Add(this.tvwFeatures);
//
// sc.Panel2
//
this.sc.Panel2.AutoScroll = true;
this.sc.Panel2.BackColor = System.Drawing.SystemColors.Control;
this.sc.Panel2.Controls.Add(this.lnkStatus);
this.sc.Panel2.Controls.Add(this.lblHeader);
this.sc.Panel2.Controls.Add(this.progress);
this.sc.Panel2.Controls.Add(this.rtbLog);
this.sc.Panel2.Controls.Add(this.btnApply);
this.sc.Panel2.Controls.Add(this.btnRestore);
this.sc.Panel2.Controls.Add(this.border);
this.sc.Size = new System.Drawing.Size(942, 759);
this.sc.SplitterDistance = 246;
this.sc.TabIndex = 208;
this.sc.TabStop = false;
//
// btnAnalyze
//
this.btnAnalyze.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnAnalyze.AutoEllipsis = true;
this.btnAnalyze.BackColor = System.Drawing.Color.MediumVioletRed;
this.btnAnalyze.FlatAppearance.BorderColor = System.Drawing.Color.Gray;
this.btnAnalyze.FlatAppearance.BorderSize = 0;
this.btnAnalyze.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAnalyze.ForeColor = System.Drawing.Color.White;
this.btnAnalyze.Location = new System.Drawing.Point(48, 705);
this.btnAnalyze.Name = "btnAnalyze";
this.btnAnalyze.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
this.btnAnalyze.Size = new System.Drawing.Size(120, 35);
this.btnAnalyze.TabIndex = 215;
this.btnAnalyze.TabStop = false;
this.btnAnalyze.Text = "Analyze";
this.btnAnalyze.UseVisualStyleBackColor = false;
this.btnAnalyze.Click += new System.EventHandler(this.btnAnalyze_Click);
//
// lnkStatus
//
this.lnkStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lnkStatus.AutoEllipsis = true;
this.lnkStatus.BackColor = System.Drawing.Color.Transparent;
this.lnkStatus.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9.75F);
this.lnkStatus.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkStatus.LinkColor = System.Drawing.Color.MediumVioletRed;
this.lnkStatus.Location = new System.Drawing.Point(16, 645);
this.lnkStatus.Name = "lnkStatus";
this.lnkStatus.Size = new System.Drawing.Size(437, 19);
this.lnkStatus.TabIndex = 214;
this.lnkStatus.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkStatus_LinkClicked);
//
// lblHeader
//
this.lblHeader.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblHeader.AutoEllipsis = true;
this.lblHeader.BackColor = System.Drawing.Color.Transparent;
this.lblHeader.Font = new System.Drawing.Font("Segoe UI Variable Display Semib", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblHeader.ForeColor = System.Drawing.Color.Black;
this.lblHeader.Location = new System.Drawing.Point(14, 25);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Size = new System.Drawing.Size(311, 32);
this.lblHeader.TabIndex = 210;
this.lblHeader.Text = "Dashboard";
//
// progress
//
this.progress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progress.Location = new System.Drawing.Point(9, 667);
this.progress.Name = "progress";
this.progress.Size = new System.Drawing.Size(427, 5);
this.progress.TabIndex = 166;
this.progress.Visible = false;
//
// rtbLog
//
this.rtbLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.rtbLog.BackColor = System.Drawing.Color.White;
this.rtbLog.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.rtbLog.Cursor = System.Windows.Forms.Cursors.IBeam;
this.rtbLog.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rtbLog.ForeColor = System.Drawing.Color.DimGray;
this.rtbLog.HideSelection = false;
this.rtbLog.Location = new System.Drawing.Point(20, 106);
this.rtbLog.Name = "rtbLog";
this.rtbLog.ReadOnly = true;
this.rtbLog.Size = new System.Drawing.Size(433, 536);
this.rtbLog.TabIndex = 138;
this.rtbLog.Text = "Select all the ways you don\'t plan to use your device to get personalized tip, ad" +
"s, recommendation within Microsoft expericences. You can always revert these Set" +
"tings to default.";
//
// btnApply
//
this.btnApply.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.btnApply.AutoEllipsis = true;
this.btnApply.BackColor = System.Drawing.Color.LightSteelBlue;
this.btnApply.FlatAppearance.BorderSize = 0;
this.btnApply.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnApply.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnApply.ForeColor = System.Drawing.Color.Black;
this.btnApply.Location = new System.Drawing.Point(104, 705);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(120, 35);
this.btnApply.TabIndex = 27;
this.btnApply.TabStop = false;
this.btnApply.Text = "Apply";
this.btnApply.UseVisualStyleBackColor = false;
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// btnRestore
//
this.btnRestore.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.btnRestore.AutoEllipsis = true;
this.btnRestore.BackColor = System.Drawing.Color.LightSteelBlue;
this.btnRestore.FlatAppearance.BorderSize = 0;
this.btnRestore.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnRestore.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRestore.ForeColor = System.Drawing.Color.Black;
this.btnRestore.Location = new System.Drawing.Point(230, 705);
this.btnRestore.Name = "btnRestore";
this.btnRestore.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
this.btnRestore.Size = new System.Drawing.Size(120, 35);
this.btnRestore.TabIndex = 178;
this.btnRestore.TabStop = false;
this.btnRestore.Text = "Restore";
this.btnRestore.UseVisualStyleBackColor = false;
this.btnRestore.Click += new System.EventHandler(this.btnRestore_Click);
//
// border
//
this.border.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.border.BackColor = System.Drawing.SystemColors.Control;
this.border.FlatAppearance.BorderColor = System.Drawing.Color.Gainsboro;
this.border.FlatAppearance.BorderSize = 0;
this.border.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.border.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.border.Location = new System.Drawing.Point(3, 14);
this.border.Name = "border";
this.border.Size = new System.Drawing.Size(462, 677);
this.border.TabIndex = 204;
this.border.TabStop = false;
this.border.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.border.UseVisualStyleBackColor = false;
//
// pnlNav
//
this.pnlNav.Controls.Add(this.btnNotePlugins);
this.pnlNav.Controls.Add(this.btnHamburger);
this.pnlNav.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlNav.Location = new System.Drawing.Point(0, 0);
this.pnlNav.Name = "pnlNav";
this.pnlNav.Size = new System.Drawing.Size(49, 759);
this.pnlNav.TabIndex = 209;
//
// NosyPageView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.pnlNav);
this.Controls.Add(this.sc);
this.Name = "NosyPageView";
this.Size = new System.Drawing.Size(942, 759);
this.contextKebapMenu.ResumeLayout(false);
this.contextKebapMenu.PerformLayout();
this.contextAppMenuOptions.ResumeLayout(false);
this.sc.Panel1.ResumeLayout(false);
this.sc.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.sc)).EndInit();
this.sc.ResumeLayout(false);
this.pnlNav.ResumeLayout(false);
this.pnlNav.PerformLayout();
this.ResumeLayout(false);
}
#endregion
internal System.Windows.Forms.TreeView tvwFeatures;
private System.Windows.Forms.Button btnHamburger;
private System.Windows.Forms.ContextMenuStrip contextKebapMenu;
private System.Windows.Forms.ToolStripTextBox textHeaderAppInfo;
private System.Windows.Forms.ToolStripTextBox textHeaderExperience;
private System.Windows.Forms.ToolStripComboBox cbProfiles;
private System.Windows.Forms.ToolStripMenuItem menuLoadProfile;
private System.Windows.Forms.ToolStripMenuItem menuExportProfile;
private System.Windows.Forms.Button btnNotePlugins;
private System.Windows.Forms.ContextMenuStrip contextAppMenuOptions;
private System.Windows.Forms.ToolStripMenuItem menuAnalyzeThis;
public System.Windows.Forms.SplitContainer sc;
private System.Windows.Forms.Label lblHeader;
private System.Windows.Forms.ProgressBar progress;
private System.Windows.Forms.Button btnApply;
private System.Windows.Forms.Button btnRestore;
private System.Windows.Forms.Button border;
private System.Windows.Forms.Panel pnlNav;
private System.Windows.Forms.LinkLabel lnkStatus;
private System.Windows.Forms.Button btnAnalyze;
private System.Windows.Forms.RichTextBox rtbLog;
}
}

View File

@ -0,0 +1,681 @@
using Bloatynosy.ITreeNode;
using Features.Feature;
using HelperTool;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Bloatynosy.Views
{
public partial class NosyPageView : UserControl
{
private MainForm mainForm;
private static readonly ErrorHelper logger = ErrorHelper.Instance;
private int progression = 0;
private int progressionIncrease = 0;
public NosyPageView(MainForm mainForm)
{
InitializeComponent();
this.mainForm = mainForm;
this.AddDefaultFeatures();
this.SetStyle();
this.SetProfile();
}
private void SetStyle()
{
// Segoe MDL2 Assets
btnHamburger.Text = "\uE700";
btnNotePlugins.Text = "\uE8C3";
// Some color styling
pnlNav.BackColor = Color.FromArgb(245, 241, 249);
BackColor =
border.BackColor =
sc.Panel1.BackColor =
sc.Panel2.BackColor =
lblHeader.BackColor =
lnkStatus.BackColor =
rtbLog.BackColor = Color.FromArgb(243, 243, 243);
// Log messages to target richLog
logger.SetTarget(rtbLog);
// Border of middle page navigation
border.FlatAppearance.MouseOverBackColor = border.BackColor;
border.BackColorChanged += (s, e) =>
{
border.FlatAppearance.MouseOverBackColor = border.BackColor;
};
}
private void SetProfile()
{
cbProfiles.Items.Clear();
cbProfiles.Items.Insert(0, "Select profile");
cbProfiles.SelectedIndex = 0;
try
{
string[] files = Directory.GetFiles(HelperTool.Utils.Data.DataRootDir, "*.bloos");
cbProfiles.Items.AddRange(files.Select((string filePath) => Path.GetFileNameWithoutExtension(filePath)).ToArray());
}
catch { cbProfiles.Text = "No profiles found."; }
}
public void Reset()
{
progression = 0;
progressionIncrease = 0;
progress.Value = 0;
progress.Visible = true;
rtbLog.Visible = true;
rtbLog.Text = "";
}
private void DoProgress(int value)
{
progression = value;
progress.Value = progression;
}
private void IncrementProgress()
{
progression += progressionIncrease;
progress.Value = progression;
}
public void AddDefaultFeatures()
{
tvwFeatures.Nodes.Clear();
tvwFeatures.BeginUpdate();
// Root node
TreeNode root = new TreeNode("Potential issues on Windows 11 " + OsHelper.GetVersion())
{
Checked = true,
};
TreeNode browser = new TreeNode("1. Browser", new TreeNode[] {
new FeatureNode(new Features.Feature.Browser.EdgeBingAIButton()),
new FeatureNode(new Features.Feature.Browser.ChromeTelemetry()),
new FeatureNode(new Features.Feature.Browser.FirefoxTelemetry()),
})
{
Checked = true,
};
TreeNode explorer = new TreeNode("2. Explorer", new TreeNode[] {
new FeatureNode(new Features.Feature.Explorer.HiddenFileFolder()),
new FeatureNode(new Features.Feature.Explorer.HiddenFileExt()),
})
{
Checked = true,
};
TreeNode desktop = new TreeNode("3. Desktop", new System.Windows.Forms.TreeNode[] {
new FeatureNode(new Features.Feature.Desktop.AppsTheme()),
new FeatureNode(new Features.Feature.Desktop.WindowsTheme()),
new FeatureNode(new Features.Feature.Desktop.Transparency()),
new FeatureNode(new Features.Feature.Desktop.SnapAssistFlyout()),
new FeatureNode(new Features.Feature.Desktop.Widgets()),
new FeatureNode(new Features.Feature.Desktop.WidgetsRemove()),
new FeatureNode(new Features.Feature.Desktop.Stickers()),
})
{
Checked = true,
};
TreeNode taskbar = new TreeNode("4. Taskbar and Start menu", new System.Windows.Forms.TreeNode[] {
new FeatureNode(new Features.Feature.Taskbar.Copilot()),
new FeatureNode(new Features.Feature.Taskbar.TaskbarSearch()),
new FeatureNode(new Features.Feature.Taskbar.TaskbarChat()),
new FeatureNode(new Features.Feature.Taskbar.TaskView()),
new FeatureNode(new Features.Feature.Taskbar.MostUsedApps()),
new FeatureNode(new Features.Feature.Taskbar.StartmenuLayout()),
new FeatureNode(new Features.Feature.Taskbar.StartmenuSearch()),
})
{
Checked = true,
};
TreeNode system = new TreeNode("5. System", new System.Windows.Forms.TreeNode[] {
new FeatureNode(new Features.Feature.System.FullContextMenus()),
new FeatureNode(new Features.Feature.System.RemoveW11Watermark()),
new FeatureNode(new Features.Feature.System.TeamsAutostart()),
new FeatureNode(new Features.Feature.System.Fax()),
new FeatureNode(new Features.Feature.System.XPSWriter()),
new FeatureNode(new Features.Feature.System.TPMCheck()),
})
{
Checked = true,
};
TreeNode gaming = new TreeNode("6. Gaming", new TreeNode[] {
new FeatureNode(new Features.Feature.Gaming.GameDVR()),
new FeatureNode(new Features.Feature.Gaming.PowerThrottling()),
new FeatureNode(new Features.Feature.Gaming.VisualFX()),
})
{
Checked = true,
};
TreeNode privacy = new TreeNode("7. Privacy", new TreeNode[] {
new FeatureNode(new Features.Feature.Privacy.DiagnosticData()),
new FeatureNode(new Features.Feature.Privacy.Telemetry()),
new FeatureNode(new Features.Feature.Privacy.CompatibilityTelemetry()),
new FeatureNode(new Features.Feature.Privacy.LocationTracking()),
new FeatureNode(new Features.Feature.Privacy.Advertising()),
new FeatureNode(new Features.Feature.Privacy.Feedback()),
new FeatureNode(new Features.Feature.Privacy.SuggestedContent()),
new FeatureNode(new Features.Feature.Privacy.AppsAutoInstall()),
new FeatureNode(new Features.Feature.Privacy.WindowsTips()),
new FeatureNode(new Features.Feature.Privacy.TailoredExperiences()),
new FeatureNode(new Features.Feature.Privacy.BackgroundApps()),
})
{
Checked = true
};
TreeNode bloatware = new TreeNode("8. Bloatware", new TreeNode[] {
new FeatureNode(new Features.Feature.Bloatware.StoreApps()),
new FeatureNode(new Features.Feature.Bloatware.StoreAppsPrivate()),
new FeatureNode(new Features.Feature.Bloatware.OneDriveRemove()),
})
{
Checked = true,
};
root.Nodes.AddRange(new TreeNode[]
{
browser,
explorer,
desktop,
taskbar,
system,
gaming,
privacy,
bloatware,
});
tvwFeatures.Nodes.Add(root);
// 9. Plugins
List<string> pluginFiles = AddPluginFeatures(HelperTool.Utils.Data.PluginsRootDir);
if (pluginFiles.Count > 0)
{
// Create node for the plugins
TreeNode pluginsNode = new TreeNode("9. Plugins");
// Add PowerShell plugin files to the plugins node
foreach (string pluginFile in pluginFiles)
{
string fileName = Path.GetFileNameWithoutExtension(pluginFile);
pluginsNode.Nodes.Add(new TreeNode(fileName));
}
// Add plugins node to the root node
root.Nodes.Add(pluginsNode);
}
// Some tvw nicety
foreach (TreeNode tn in tvwFeatures.Nodes) { tn.Expand(); }
tvwFeatures.Nodes[0].NodeFont = new Font(tvwFeatures.Font, FontStyle.Bold);
tvwFeatures.EndUpdate();
}
private List<string> AddPluginFeatures(string directory)
{
List<string> pluginFiles = new List<string>();
try
{
// Get all PowerShell script files (*.ps1) in Plugins directory
string[] files = Directory.GetFiles(directory, "*.ps1", SearchOption.AllDirectories);
foreach (string file in files)
{
// Add script file path to list
pluginFiles.Add(file);
}
}
catch (Exception ex)
{
logger.Log("Error searching for Plugin files: " + ex.Message);
}
return pluginFiles;
}
public List<TreeNode> GetCheckedPluginNodes()
{
List<TreeNode> checkedNodes = new List<TreeNode>();
// Iterate through all root nodes in the tree view
foreach (TreeNode rootNode in tvwFeatures.Nodes)
{
// Check if root node has child nodes
if (rootNode.Nodes.Count > 0)
{
// Iterate through child nodes of the root
foreach (TreeNode childNode in rootNode.Nodes)
{
// Check if child node is a Plugins node
if (childNode.Text.Contains("Plugins"))
{
// Iterate through child nodes of Plugins node (plugin scripts) and add checked nodes
foreach (TreeNode scriptNode in childNode.Nodes)
{
// Debugging
// Console.WriteLine($"Plugin Node Text: {scriptNode.Text}, Checked: {scriptNode.Checked}");
if (scriptNode.Checked)
{
checkedNodes.Add(scriptNode);
}
}
}
}
}
}
// No checked nodes found?
if (checkedNodes.Count == 0)
{ // Debugging
// Console.WriteLine("No plugin script is checked");
}
return checkedNodes;
}
internal List<FeatureNode> CollectFeatureNodes()
{
List<FeatureNode> selectedFeatures = new List<FeatureNode>();
foreach (TreeNode treeNode in tvwFeatures.Nodes.All())
{
if (treeNode.Checked && treeNode.GetType() == typeof(FeatureNode))
{
selectedFeatures.Add((FeatureNode)treeNode);
}
}
progressionIncrease = (int)Math.Floor(100.0f / selectedFeatures.Count);
return selectedFeatures;
}
private void tvwFeatures_AfterCheck(object sender, TreeViewEventArgs e)
{
tvwFeatures.BeginUpdate();
foreach (TreeNode child in e.Node.Nodes)
{
child.Checked = e.Node.Checked;
}
tvwFeatures.EndUpdate();
}
private void tvwFeatures_AfterSelect(object sender, TreeViewEventArgs e)
{
if (e.Node is FeatureNode featureNode)
{
logger.ClearLog();
logger.Log(featureNode.GetFeatureInfo());
}
}
public void SelectFeatureNodes(TreeNodeCollection trNodeCollection, bool isCheck)
{
foreach (TreeNode trNode in trNodeCollection)
{
trNode.Checked = isCheck;
if (trNode.Nodes.Count > 0)
SelectFeatureNodes(trNode.Nodes, isCheck);
}
}
private void ResetColorNode(TreeNodeCollection nodes, Color Color)
{
foreach (System.Windows.Forms.TreeNode child in nodes)
{
child.BackColor = Color;
if (child.Nodes != null && child.Nodes.Count > 0)
ResetColorNode(child.Nodes, Color);
}
}
private void menuLoadProfile_Click(object sender, EventArgs e)
{
string filePath = HelperTool.Utils.Data.DataRootDir + "\\" + cbProfiles.Text + ".bloos";
ResetColorNode(tvwFeatures.Nodes, Color.White);
SelectFeatureNodes(tvwFeatures.Nodes, false);
tvwFeatures.ExpandAll();
tvwFeatures.Nodes[0].EnsureVisible();
try
{
using (StreamReader reader = new StreamReader(filePath))
{
while (!reader.EndOfStream)
{
string line = reader.ReadLine();
foreach (System.Windows.Forms.TreeNode treeNode in tvwFeatures.Nodes.All())
{
if (treeNode.Text.Contains(line))
{
treeNode.BackColor = Color.Yellow;
treeNode.Checked = true;
tvwFeatures.SelectedNode = treeNode;
}
}
}
if (new FileInfo(filePath).Length == 0) logger.Log("- Empty configuration loaded.");
}
btnAnalyze.PerformClick();
logger.Log($"[{cbProfiles.Text} has been successfully loaded].\nWe have highlighted the configuration that would be enabled (no changes are done yet).");
}
catch { { MessageBox.Show("No profile selected."); } }
}
private void menuExportProfile_Click(object sender, EventArgs e)
{
SaveFileDialog f = new SaveFileDialog();
f.InitialDirectory = HelperTool.Utils.Data.DataRootDir;
f.FileName = "Bloatynosy-profile";
f.Filter = "Bloatynosy files *.bloos|*.bloos";
if (f.ShowDialog() == DialogResult.OK)
{
using (StreamWriter writer = new StreamWriter(f.OpenFile()))
{
foreach (TreeNode treeNode in tvwFeatures.Nodes.All())
{
if (!treeNode.Checked)
continue;
writer.WriteLine(String.Format("{0}", treeNode.Text));
}
writer.Close();
}
MessageBox.Show("Profile has been successfully exported.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private FeatureNode GetSelectedFeatureNode()
{
if (tvwFeatures.SelectedNode is FeatureNode featureNode)
{
return featureNode;
}
return null;
}
private async Task<int> AnalyzeNode(FeatureNode node)
{
var feature = node.Feature;
ConfiguredTaskAwaitable<bool> analyzeTask = Task<bool>.Factory.StartNew(() => feature.CheckFeature()).ConfigureAwait(true);
bool shouldPerform = await analyzeTask;
// Console.WriteLine($"Analyzing feature: {feature.ID()}, shouldPerform: {shouldPerform}, node.Text: {node.Text}");
if (feature != null)
{
lnkStatus.Text = "Check " + feature.ID();
if (shouldPerform && (!mainForm.CheckIgnoreLowIssuesChecked || !node.Text.Contains("LOW")))
{
logger.Log("Problem on " + node.Parent.Text + ": " + feature.ID());
node.ForeColor = Color.MediumVioletRed;
return 1;
}
else
{
// Console.WriteLine($"No action required for feature: {feature.ID()}, shouldPerform: {shouldPerform}, node.Text: {node.Text}");
node.Checked = false;
node.ForeColor = Color.Gray;
}
}
return 0;
}
private async void menuAnalyzeThis_Click(object sender, EventArgs e)
{
Reset();
btnApply.Enabled = false;
int performFeaturesCount = 0;
// Check if any node is selected
FeatureNode selectedNode = GetSelectedFeatureNode();
if (selectedNode != null)
{
performFeaturesCount += await AnalyzeNode(selectedNode);
}
StringBuilder sum = new StringBuilder();
sum.Append(Environment.NewLine);
if (performFeaturesCount > 0)
{
sum.Append($"We've checked the selected feature of your Windows 11 installation.\r\n");
sum.Append($"We recommend to disable this feature.\r\n");
}
else
{
sum.Append($"The selected feature does not require action.\r\n");
}
logger.Log(sum.ToString(), "");
btnApply.Enabled = true;
lnkStatus.Text = $"There are {performFeaturesCount} features that require your attention.\r\n";
}
private void tvwFeatures_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
tvwFeatures.SelectedNode = tvwFeatures.GetNodeAt(e.X, e.Y);
contextAppMenuOptions.Show(tvwFeatures, e.Location);
}
}
private async void btnApply_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Do you want to apply selected fixes?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
{
Reset();
// Apply regular features
List<FeatureNode> regularFeatureNodes = CollectFeatureNodes();
ApplyFeatures(regularFeatureNodes);
// Apply plugin features
List<TreeNode> checkedPluginNodes = GetCheckedPluginNodes();
if (checkedPluginNodes.Count > 0)
{
// Apply features from the checked plugin nodes
await ApplyPlugins(checkedPluginNodes);
}
}
}
private void btnRestore_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Do you want to restore selected fixes to Windows default state?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
{
Reset();
List<FeatureNode> performNodes = CollectFeatureNodes();
UndoFeatures(performNodes);
}
}
private async Task ApplyPlugins(List<TreeNode> pluginNodes)
{
foreach (TreeNode selectedPluginNode in pluginNodes)
{
string pluginFilePath = Path.Combine(HelperTool.Utils.Data.PluginsRootDir, selectedPluginNode.Text + ".ps1");
try
{
// Call WindowsHelper > RunPowerShellScriptAsync
logger.Log($"Running plugin {selectedPluginNode.Text}...");
await WindowsHelper.RunPowerShellScript(pluginFilePath);
logger.Log($"- Running with plugin {selectedPluginNode.Text} [Done]");
}
catch (Exception ex)
{
logger.Log(ex.Message);
}
}
}
private async void ApplyFeatures(List<FeatureNode> treeNodes)
{
tvwFeatures.Enabled = false;
foreach (FeatureNode node in treeNodes)
{
var assessment = node.Feature;
ConfiguredTaskAwaitable<bool> performTask = Task<bool>.Factory.StartNew(() => assessment.DoFeature()).ConfigureAwait(true);
lnkStatus.Text = "Fixing " + node.Text;
var result = await performTask;
IncrementProgress();
}
DoProgress(100);
lnkStatus.Text = "Fixing complete (click for details).";
tvwFeatures.Enabled = true;
}
private async void UndoFeatures(List<FeatureNode> treeNodes)
{
tvwFeatures.Enabled = false;
foreach (FeatureNode node in treeNodes)
{
var assessment = node.Feature;
ConfiguredTaskAwaitable<bool> performTask = Task<bool>.Factory.StartNew(() => assessment.UndoFeature()).ConfigureAwait(true);
lnkStatus.Text = "Restore " + node.Text;
var result = await performTask;
IncrementProgress();
}
DoProgress(100);
lnkStatus.Text = "Undo complete (click for details).";
tvwFeatures.Enabled = true;
}
private async void btnAnalyze_Click(object sender, EventArgs e)
{
Reset();
btnApply.Enabled = false;
int performFeaturesCount = 0;
List<FeatureNode> selectedFeatures = CollectFeatureNodes();
foreach (FeatureNode node in selectedFeatures)
{
var feature = node.Feature;
ConfiguredTaskAwaitable<bool> analyzeTask = Task<bool>.Factory.StartNew(() => feature.CheckFeature()).ConfigureAwait(true);
bool shouldPerform = await analyzeTask;
if (feature != null)
{
lnkStatus.Text = "Check " + feature.ID();
if (mainForm.CheckIgnoreLowIssuesChecked == true)
if (shouldPerform & !node.Text.Contains("LOW"))
{
logger.Log(node.Parent.Text + ": " + feature.ID());
performFeaturesCount += 1;
node.ForeColor = Color.MediumVioletRed;
}
else
{
node.Checked = false; // Uncheck all fixed
node.ForeColor = Color.Gray;
}
else if (shouldPerform)
{
logger.Log(node.Parent.Text + ": " + feature.ID());
performFeaturesCount += 1;
node.ForeColor = Color.MediumVioletRed;
}
else
{
node.Checked = false;
node.ForeColor = Color.Gray;
}
}
}
tvwFeatures.ExpandAll();
DoProgress(100);
StringBuilder sum = new StringBuilder();
sum.Append(Environment.NewLine);
sum.Append("======= Summary =======\n");
sum.Append($"We've checked {selectedFeatures.Count} features of your Windows 11 installation.\r\n");
sum.Append($"We like {selectedFeatures.Count - performFeaturesCount} of these features (no need for action).\r\n");
sum.Append($"We recommend to disable {performFeaturesCount} of these features (highlighted in color).\r\n");
logger.Log(sum.ToString(), "");
btnApply.Enabled = true;
lnkStatus.Text = $"There are {performFeaturesCount} features which require your attention.\r\n";
}
private void btnHamburger_Click(object sender, EventArgs e)
=> this.contextKebapMenu.Show(Cursor.Position.X, Cursor.Position.Y);
private void btnNotePlugins_Click(object sender, EventArgs e)
{
string message = "This version introduces an integrated plugin function that replaces the old WinModder module. The plugin scripts still rely on PowerShell code. Please note that as of today, no analysis takes place, and the plugins can only be applied.";
MessageBox.Show(message, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void lnkStatus_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
// Extract summary from Status text
string summary = lnkStatus.Text.Replace("======= Summary =======", "").Trim();
DialogResult result = MessageBox.Show(
"Summary of problems:\n" + summary + "\n\nDo you want to ask the community for advice on applying these changes?",
"Analysis advice",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question
);
if (result == DialogResult.Yes)
{
Process.Start(HelperTool.Utils.Uri.URL_HELP);
}
}
}
}

View File

@ -117,4 +117,10 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextKebapMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="contextAppMenuOptions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>180, 19</value>
</metadata>
</root>

View File

@ -1,6 +1,6 @@
namespace BloatyNosy
namespace Bloatynosy.Views
{
partial class SetupPageView
partial class WizardPageView
{
/// <summary>
/// Erforderliche Designervariable.
@ -37,20 +37,21 @@
this.pbView = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.btnAssist = new System.Windows.Forms.Button();
this.lnkCustomize = new System.Windows.Forms.LinkLabel();
this.lnkConfigure = new System.Windows.Forms.LinkLabel();
this.btnCustomize = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pbView)).BeginInit();
this.SuspendLayout();
//
// lblHeader
//
this.lblHeader.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblHeader.AutoEllipsis = true;
this.lblHeader.AutoSize = true;
this.lblHeader.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblHeader.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.lblHeader.Location = new System.Drawing.Point(60, 4);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Size = new System.Drawing.Size(144, 26);
this.lblHeader.Size = new System.Drawing.Size(973, 26);
this.lblHeader.TabIndex = 180;
this.lblHeader.Text = "Setup Windows";
//
@ -71,29 +72,29 @@
//
// btnHome
//
this.btnHome.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnHome.AutoEllipsis = true;
this.btnHome.BackColor = System.Drawing.Color.Gainsboro;
this.btnHome.FlatAppearance.BorderSize = 0;
this.btnHome.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnHome.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnHome.Font = new System.Drawing.Font("Segoe UI Variable Display", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnHome.ForeColor = System.Drawing.Color.Black;
this.btnHome.Location = new System.Drawing.Point(669, 750);
this.btnHome.Location = new System.Drawing.Point(42, 82);
this.btnHome.Name = "btnHome";
this.btnHome.Size = new System.Drawing.Size(89, 29);
this.btnHome.Size = new System.Drawing.Size(212, 29);
this.btnHome.TabIndex = 182;
this.btnHome.Text = "Home";
this.btnHome.UseVisualStyleBackColor = false;
this.btnHome.Click += new System.EventHandler(this.btnHome_Click);
//
// btnNext
//
this.btnNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnNext.BackColor = System.Drawing.Color.DeepPink;
this.btnNext.AutoEllipsis = true;
this.btnNext.BackColor = System.Drawing.Color.Gainsboro;
this.btnNext.FlatAppearance.BorderSize = 0;
this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnNext.Font = new System.Drawing.Font("Segoe UI Variable Text", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnNext.ForeColor = System.Drawing.Color.White;
this.btnNext.Location = new System.Drawing.Point(859, 750);
this.btnNext.Font = new System.Drawing.Font("Segoe UI Variable Display", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnNext.ForeColor = System.Drawing.Color.Black;
this.btnNext.Location = new System.Drawing.Point(42, 168);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(89, 29);
this.btnNext.Size = new System.Drawing.Size(212, 29);
this.btnNext.TabIndex = 183;
this.btnNext.Text = "Next";
this.btnNext.UseVisualStyleBackColor = false;
@ -101,52 +102,54 @@
//
// btnPrev
//
this.btnPrev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnPrev.AutoEllipsis = true;
this.btnPrev.BackColor = System.Drawing.Color.Gainsboro;
this.btnPrev.FlatAppearance.BorderSize = 0;
this.btnPrev.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnPrev.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnPrev.Font = new System.Drawing.Font("Segoe UI Variable Display", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnPrev.ForeColor = System.Drawing.Color.Black;
this.btnPrev.Location = new System.Drawing.Point(764, 750);
this.btnPrev.Location = new System.Drawing.Point(42, 133);
this.btnPrev.Name = "btnPrev";
this.btnPrev.Size = new System.Drawing.Size(89, 29);
this.btnPrev.Size = new System.Drawing.Size(212, 29);
this.btnPrev.TabIndex = 184;
this.btnPrev.Text = "Previous";
this.btnPrev.UseVisualStyleBackColor = false;
this.btnPrev.Click += new System.EventHandler(this.btnPrev_Click);
//
// cbTable
//
this.cbTable.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cbTable.BackColor = System.Drawing.Color.White;
this.cbTable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbTable.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbTable.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbTable.FormattingEnabled = true;
this.cbTable.Location = new System.Drawing.Point(55, 756);
this.cbTable.Location = new System.Drawing.Point(42, 256);
this.cbTable.Name = "cbTable";
this.cbTable.Size = new System.Drawing.Size(121, 23);
this.cbTable.Size = new System.Drawing.Size(212, 25);
this.cbTable.TabIndex = 185;
this.cbTable.SelectedIndexChanged += new System.EventHandler(this.cbTable_SelectedIndexChanged);
//
// pbView
//
this.pbView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pbView.BackColor = System.Drawing.Color.Transparent;
this.pbView.ErrorImage = null;
this.pbView.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.pbView.InitialImage = null;
this.pbView.Location = new System.Drawing.Point(37, 133);
this.pbView.Location = new System.Drawing.Point(272, 42);
this.pbView.Name = "pbView";
this.pbView.Size = new System.Drawing.Size(457, 330);
this.pbView.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pbView.Size = new System.Drawing.Size(779, 437);
this.pbView.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pbView.TabIndex = 186;
this.pbView.TabStop = false;
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(52, 738);
this.label1.Font = new System.Drawing.Font("Segoe UI Variable Display Semib", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(39, 238);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 15);
this.label1.Size = new System.Drawing.Size(49, 15);
this.label1.TabIndex = 189;
this.label1.Text = "Jump to";
//
@ -154,64 +157,68 @@
//
this.btnAssist.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnAssist.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.btnAssist.FlatAppearance.BorderSize = 2;
this.btnAssist.FlatAppearance.BorderColor = System.Drawing.Color.Gainsboro;
this.btnAssist.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAssist.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAssist.Location = new System.Drawing.Point(546, 131);
this.btnAssist.Location = new System.Drawing.Point(289, 447);
this.btnAssist.Name = "btnAssist";
this.btnAssist.Size = new System.Drawing.Size(466, 332);
this.btnAssist.Size = new System.Drawing.Size(762, 200);
this.btnAssist.TabIndex = 190;
this.btnAssist.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnAssist.UseVisualStyleBackColor = true;
//
// lnkCustomize
//
this.lnkCustomize.ActiveLinkColor = System.Drawing.Color.HotPink;
this.lnkCustomize.AutoSize = true;
this.lnkCustomize.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lnkCustomize.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkCustomize.LinkColor = System.Drawing.Color.DeepPink;
this.lnkCustomize.Location = new System.Drawing.Point(554, 481);
this.lnkCustomize.Name = "lnkCustomize";
this.lnkCustomize.Size = new System.Drawing.Size(177, 20);
this.lnkCustomize.TabIndex = 191;
this.lnkCustomize.TabStop = true;
this.lnkCustomize.Text = "Customizations available";
this.lnkCustomize.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkCustomize_LinkClicked);
//
// lnkConfigure
//
this.lnkConfigure.ActiveLinkColor = System.Drawing.Color.HotPink;
this.lnkConfigure.AutoSize = true;
this.lnkConfigure.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lnkConfigure.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkConfigure.AutoEllipsis = true;
this.lnkConfigure.Font = new System.Drawing.Font("Segoe UI Variable Display", 10.25F);
this.lnkConfigure.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkConfigure.LinkColor = System.Drawing.Color.DeepPink;
this.lnkConfigure.Location = new System.Drawing.Point(554, 516);
this.lnkConfigure.LinkColor = System.Drawing.Color.MediumVioletRed;
this.lnkConfigure.Location = new System.Drawing.Point(657, 668);
this.lnkConfigure.Name = "lnkConfigure";
this.lnkConfigure.Size = new System.Drawing.Size(126, 20);
this.lnkConfigure.Size = new System.Drawing.Size(160, 19);
this.lnkConfigure.TabIndex = 192;
this.lnkConfigure.TabStop = true;
this.lnkConfigure.Text = "Configure settings";
this.lnkConfigure.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkConfigure_LinkClicked);
//
// SetupPageView
// btnCustomize
//
this.btnCustomize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCustomize.AutoEllipsis = true;
this.btnCustomize.BackColor = System.Drawing.Color.MediumVioletRed;
this.btnCustomize.FlatAppearance.BorderColor = System.Drawing.Color.Gray;
this.btnCustomize.FlatAppearance.BorderSize = 0;
this.btnCustomize.Font = new System.Drawing.Font("Segoe UI Variable Display", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnCustomize.ForeColor = System.Drawing.Color.White;
this.btnCustomize.Location = new System.Drawing.Point(823, 661);
this.btnCustomize.Name = "btnCustomize";
this.btnCustomize.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
this.btnCustomize.Size = new System.Drawing.Size(210, 35);
this.btnCustomize.TabIndex = 218;
this.btnCustomize.TabStop = false;
this.btnCustomize.Text = "Customizations available";
this.btnCustomize.UseVisualStyleBackColor = false;
this.btnCustomize.Click += new System.EventHandler(this.btnCustomize_Click);
//
// WizardPageView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScroll = true;
this.Controls.Add(this.btnCustomize);
this.Controls.Add(this.lnkConfigure);
this.Controls.Add(this.lnkCustomize);
this.Controls.Add(this.btnAssist);
this.Controls.Add(this.label1);
this.Controls.Add(this.pbView);
this.Controls.Add(this.cbTable);
this.Controls.Add(this.btnPrev);
this.Controls.Add(this.btnNext);
this.Controls.Add(this.btnHome);
this.Controls.Add(this.lblHeader);
this.Controls.Add(this.btnBack);
this.Name = "SetupPageView";
this.Controls.Add(this.pbView);
this.Name = "WizardPageView";
this.Size = new System.Drawing.Size(1054, 795);
((System.ComponentModel.ISupportInitialize)(this.pbView)).EndInit();
this.ResumeLayout(false);
@ -230,7 +237,7 @@
public System.Windows.Forms.PictureBox pbView;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnAssist;
private System.Windows.Forms.LinkLabel lnkCustomize;
private System.Windows.Forms.LinkLabel lnkConfigure;
private System.Windows.Forms.Button btnCustomize;
}
}

View File

@ -1,14 +1,13 @@
using BloatyNosy.Setup;
using Bloatynosy.Setup;
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
namespace BloatyNosy
namespace Bloatynosy.Views
{
public partial class SetupPageView : UserControl
public partial class WizardPageView : UserControl
{
private PageTitle INavPage = PageTitle.Setup;
private string wallpaperPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).ToString() + @"\Microsoft\Windows\Themes\TranscodedWallpaper";
@ -16,7 +15,7 @@ namespace BloatyNosy
private MainForm mainForm = null;
public SetupPageView(Form frm)
public WizardPageView(Form frm)
{
mainForm = frm as MainForm;
InitializeComponent();
@ -30,10 +29,12 @@ namespace BloatyNosy
// Some UI nicety
private void SetStyle()
{
// Some color styling
BackColor =
Color.FromArgb(239, 239, 247);
Color.FromArgb(245, 241, 249);
btnBack.Text = "\uE72B";
// Border of description
btnAssist.FlatAppearance.MouseOverBackColor = btnAssist.BackColor;
btnAssist.BackColorChanged += (s, e) =>
{
@ -104,7 +105,7 @@ namespace BloatyNosy
{
case PageTitle.Setup:
lnkConfigure.Visible = false;
lnkCustomize.Visible = false;
btnCustomize.Visible = false;
if (!HelperTool.Utils.IsInet())
lblHeader.Text = "We cannot connect to the Internet. Some functions of the Windows 11 Setup module are not available.";
else lblHeader.Text = "Hi " + Environment.UserName;
@ -121,8 +122,8 @@ namespace BloatyNosy
case PageTitle.NewLook:
lnkConfigure.Visible = true;
lnkCustomize.Visible = true;
lnkCustomize.Text = "Customize Windows 11";
btnCustomize.Visible = true;
btnCustomize.Text = "Customize Windows 11";
lblHeader.Text = "A new look";
btnAssist.Text = "As you already see, Windows 11 features a clean design with rounded corners, pastel shades and a centered Start menu and Taskbar.";
pbView.Visible = true;
@ -132,8 +133,8 @@ namespace BloatyNosy
case PageTitle.StartMenu:
lnkConfigure.Visible = true;
lnkCustomize.Visible = true;
lnkCustomize.Text = defaultCustomizerText;
btnCustomize.Visible = true;
btnCustomize.Text = defaultCustomizerText;
lblHeader.Text = "New Start Menu";
btnAssist.Text = "Of all the new Windows 11 features, the new launcher-style floating Start Menu is the most distinctive part of Microsofts next-gen desktop OS.\n\n" +
"Unlike the traditional Start Menu, the new Start — as Microsoft is calling it — sits right at the center of the taskbar.\n\n" +
@ -145,8 +146,8 @@ namespace BloatyNosy
case PageTitle.Apps:
lnkConfigure.Visible = true;
lnkCustomize.Visible = true;
lnkCustomize.Text = "Remove bloatware";
btnCustomize.Visible = true;
btnCustomize.Text = "Remove bloatware";
lblHeader.Text = "Apps";
btnAssist.Text = "Apparently Windows 11 is also lighter than Windows 10 as for the preinstalled apps.\n\n" +
"The good thing is that at least some of the Windows 10 apps arent installed. However, you will still have installed all the hoard of apps that belong to Microsoft, such as Mail and Calendar, Your Phone, Mixed Reality Portal, Solitaire Collection, Get Help, Paint 3D, XBox Game Bar, etc.";
@ -157,8 +158,8 @@ namespace BloatyNosy
case PageTitle.Privacy:
lnkConfigure.Visible = true;
lnkCustomize.Visible = true;
lnkCustomize.Text = "Fix privacy issues";
btnCustomize.Visible = true;
btnCustomize.Text = "Fix privacy issues";
lblHeader.Text = "Privacy";
btnAssist.Text = "One thing Microsoft didn't discuss is about Windows 11 privacy.\n\n" +
"Since Windows 11 Home will essentially require a Microsoft account for most users, data harvesting is part of the package. \n\n" +
@ -171,8 +172,8 @@ namespace BloatyNosy
case PageTitle.MicrosoftStore:
lnkConfigure.Visible = false;
lnkCustomize.Visible = true;
lnkCustomize.Text = "Install packages";
btnCustomize.Visible = true;
btnCustomize.Text = "Install packages";
lblHeader.Text = "New Microsoft Store";
btnAssist.Text = "Theres a complete UI overhaul on the app store and some speed improvements.\n\n" +
"The key change is allowing more apps into the store. The Microsoft Store is changing on Windows 11, and eventually Windows 10, to include any traditional desktop apps.\n\n" +
@ -184,8 +185,8 @@ namespace BloatyNosy
case PageTitle.ActionCenter:
lnkConfigure.Visible = true;
lnkCustomize.Visible = false;
lnkCustomize.Text = defaultCustomizerText;
btnCustomize.Visible = false;
btnCustomize.Text = defaultCustomizerText;
lblHeader.Text = "Action Center";
btnAssist.Text = "Another great feature of Windows 11 is the revamped Action Center.\n\n" +
"It follows a design language that we have seen on mobile OSes, and I quite like this mobile - first approach to important system toggles\n\n" +
@ -197,8 +198,8 @@ namespace BloatyNosy
case PageTitle.FileExplorer:
lnkConfigure.Visible = true;
lnkCustomize.Visible = true;
lnkCustomize.Text = defaultCustomizerText;
btnCustomize.Visible = true;
btnCustomize.Text = defaultCustomizerText;
lblHeader.Text = "Modern File Explorer";
btnAssist.Text = "The new experience of file explorer didnt come with multiple Tabs options similar to tabs in the Microsoft Edge browser.\n\n" +
"By default, File Explorer is now optimized for tablet users.\n\n" +
@ -210,8 +211,8 @@ namespace BloatyNosy
case PageTitle.SettingsApp:
lnkConfigure.Visible = false;
lnkCustomize.Visible = true;
lnkCustomize.Text = "Check all settings";
btnCustomize.Visible = true;
btnCustomize.Text = "Check all settings";
lblHeader.Text = "Redesigned Settings App";
btnAssist.Text = "The Settings app has been redesigned with a radically different look and it is now using a new navigation menu on the left, similar to Control Panel.\n\n" +
"It comes with a slightly reorganized layout which enables easier access to all your PC settings.\n\n" +
@ -223,7 +224,7 @@ namespace BloatyNosy
case PageTitle.WindowsUpdates:
lnkConfigure.Visible = true;
lnkCustomize.Visible = false;
btnCustomize.Visible = false;
lblHeader.Text = "Faster Windows Updates";
btnAssist.Text = "Yes, you read that right. With Windows 11, you will have a much faster Windows update process, thanks to the background installation mechanism. Microsoft has promised that Windows updates will now be 40% smaller, making the process even more efficient. ";
pbView.Visible = true;
@ -233,8 +234,8 @@ namespace BloatyNosy
case PageTitle.SnapLayouts:
lnkConfigure.Visible = false;
lnkCustomize.Visible = true;
lnkCustomize.Text = "Disable SnapLayouts feature";
btnCustomize.Visible = true;
btnCustomize.Text = "Disable SnapLayouts feature";
lblHeader.Text = "Snap Layouts";
btnAssist.Text = "Snap is a productivity feature that helps users arrange applications and other windows logically on-screen.\n\n" +
"In 2019, Microsoft relaunched the PowerToys brand with a new utility called FancyZones that extends the Snap experience to allow for more complex and useful on-screen window layouts. A key part of this utility, incredibly, has been integrated into Windows 11 and is now called Snap Layouts.\n\n" +
@ -246,8 +247,8 @@ namespace BloatyNosy
case PageTitle.Widgets:
lnkConfigure.Visible = false;
lnkCustomize.Visible = true;
lnkCustomize.Text = "Disable Widgets feature";
btnCustomize.Visible = true;
btnCustomize.Text = "Disable Widgets feature";
lblHeader.Text = "Widgets";
btnAssist.Text = "With Windows 11, Microsoft has brought Widgets, where you can find all kinds of information with just a click. Its similar to Google Assistants Snapshot and the “Today View” in Apples iOS 15 or macOS Monterey.";
pbView.Visible = true;
@ -257,7 +258,7 @@ namespace BloatyNosy
case PageTitle.GestureControls:
lnkConfigure.Visible = true;
lnkCustomize.Visible = false;
btnCustomize.Visible = false;
lblHeader.Text = "Advanced Gesture Controls";
btnAssist.Text = "Gestures have long been part of Windows 10, but frankly speaking, they were not very smooth, and the transitions between apps and virtual desktops were awful. With the new Advanced Gesture Controls and mandatory precision touchpad requirement for Windows 11, things might get better.\n\n" +
"Now, you can customize three-finger and four-finger swipes according to your preference.";
@ -268,7 +269,7 @@ namespace BloatyNosy
case PageTitle.WallpapersNSounds:
lnkConfigure.Visible = true;
lnkCustomize.Visible = false;
btnCustomize.Visible = false;
lblHeader.Text = "New Wallpapers && Sounds";
btnAssist.Text = "Along with Windows 11, Microsoft has also brought a series of beautiful wallpapers, sounds, and themes. Wallpapers such as Captured Motion, Flow, Sunrise, Glow are some of the nicest wallpapers you can find on a desktop OS.\n\n" +
"Also, the startup and notification sound is really good.\nPress the Magic Button to listen to the startup sound.\n\n" +
@ -280,7 +281,7 @@ namespace BloatyNosy
case PageTitle.LockScreen:
lnkConfigure.Visible = true;
lnkCustomize.Visible = false;
btnCustomize.Visible = false;
lblHeader.Text = "New Minimal Lock Screen";
btnAssist.Text = "Windows 11 supports animated lock-screen background on PCs that have accelerometer.\n\n" +
"It applies an acrylic blur in the background, and the new variable Segoe UI font makes things even better. If you dont want all the links and recommendations on the lock screen, you can disable them from Settings for a clean lock screen.";
@ -291,7 +292,7 @@ namespace BloatyNosy
case PageTitle.TouchKeyboard:
lnkConfigure.Visible = true;
lnkCustomize.Visible = false;
btnCustomize.Visible = false;
lblHeader.Text = "Touch Keyboard Improvements";
btnAssist.Text = "Windows 11 comes with a Touch Keyboard feature that remains turned off by default. You can use this touch keyboard on a computer or laptop, which is not a touch screen. It is a handy application if your physical keyboard is totally not working or a few keys are not working.\n\n" +
"Microsoft made it more intuitive to use by drawing inspiration from smartphone keyboards.\n\nEven you can use this Touch Keyboard as a substitute for a mechanical keyboard.";
@ -301,8 +302,8 @@ namespace BloatyNosy
case PageTitle.AndroidApps:
lnkConfigure.Visible = false;
lnkCustomize.Visible = true;
lnkCustomize.Text = "Install Windows Subsystem for Android";
btnCustomize.Visible = true;
btnCustomize.Text = "Install Windows Subsystem for Android";
lblHeader.Text = "Android Apps Support";
btnAssist.Text = "Microsoft has released Android apps support in the Beta Channel of Windows 11.\n\n" +
"The experience of installing apps is very simple. Microsoft has partnered with Amazon, so the Microsoft Store will list apps but send you over to Amazons Appstore app to get them installed or updated.\n\n" +
@ -314,9 +315,9 @@ namespace BloatyNosy
case PageTitle.Gaming:
lnkConfigure.Visible = true;
lnkCustomize.Visible = true;
btnCustomize.Visible = true;
lblHeader.Text = "Gaming";
lnkCustomize.Text = "Improve Gaming";
btnCustomize.Text = "Improve Gaming";
btnAssist.Text = "If you're a gamer, Windows 11 was made for you and the following three features will make it great for gaming.\n\n" +
"1. During the Windows 11 unveiling, Microsoft announced support for Auto HDR that would elevate the viewing experience while playing games.\n\n" +
"HDR stands for High Dynamic Range, as opposed to SDR or Standard Dynamic Range. With a higher range of colors, HDR gives more vibrant and realistic colors to your video games and makes the sceneries look even better.\n\n" +
@ -329,9 +330,9 @@ namespace BloatyNosy
case PageTitle.Finish:
lnkConfigure.Visible = false;
lnkCustomize.Visible = true;
btnCustomize.Visible = true;
lblHeader.Text = "See you in a bit";
lnkCustomize.Text = "We have some tips for you!";
btnCustomize.Text = "We have some tips for you!";
btnAssist.Text = "We're finish setting up your device.";
pbView.Visible = true;
pbView.ImageLocation = "https://github.com/builtbybel/ThisIsWin11/blob/main/assets/pages/endpage.png?raw=true";
@ -340,10 +341,10 @@ namespace BloatyNosy
case PageTitle.Custom:
lnkConfigure.Visible = false;
lnkCustomize.Visible = true;
lnkCustomize.Text = "Customize Windows 11";
lblHeader.Text = "Customization marketplace";
btnAssist.Text = "You will find here code snippets (Mods) to customize Windows 11 according to your wishes.";
btnCustomize.Visible = true;
btnCustomize.Text = "Customize Windows 11";
lblHeader.Text = "Install Plugins for Bloatynosy";
btnAssist.Text = "You will find here Plugins (based on PowerShell script files) to customize Windows 11 according to your wishes.";
pbView.Visible = false;
pbView.ImageLocation = "";
@ -351,50 +352,6 @@ namespace BloatyNosy
}
}
private void btnBack_Click(object sender, EventArgs e)
{
var mainForm = Application.OpenForms.OfType<MainForm>().Single();
mainForm.pnlForm.Controls.Clear();
if (mainForm.INavPage != null) mainForm.pnlForm.Controls.Add(mainForm.INavPage);
}
private void lnkCustomize_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
switch (INavPage)
{
case PageTitle.Apps:
mainForm.SetView(new AppsPageView());
break;
case PageTitle.MicrosoftStore:
mainForm.SetView(new PackagesPageView());
break;
case PageTitle.Custom:
mainForm.SetView(new ModsPageView());
break;
case PageTitle.Finish: // Open Microsoft Tips app
bool tipsApp = Directory.Exists(Path.Combine
(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Packages\\Microsoft.Getstarted_8wekyb3d8bbwe"));
if (!tipsApp) MessageBox.Show("Microsoft Tips app is not installed on this system :(\nYou can get it on the Microsoft Store.", "We are sorry...", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
{
Process.Start(@"shell:appsfolder\Microsoft.Getstarted_8wekyb3d8bbwe!App");
}
break;
default:
btnBack.PerformClick();
break;
}
}
private void lnkConfigure_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
switch (INavPage)
@ -495,5 +452,40 @@ namespace BloatyNosy
break;
}
}
private void btnBack_Click(object sender, EventArgs e) => ViewHelper.SwitchView.SetMainFormAsView();
private void btnCustomize_Click(object sender, EventArgs e)
{
switch (INavPage)
{
case PageTitle.Apps:
ViewHelper.SwitchView.SetView(new BloatyPageView());
break;
case PageTitle.MicrosoftStore:
ViewHelper.SwitchView.SetView(new PackagesPageView());
break;
case PageTitle.Finish: // Open Microsoft Tips app
bool tipsApp = Directory.Exists(Path.Combine
(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Packages\\Microsoft.Getstarted_8wekyb3d8bbwe"));
if (!tipsApp) MessageBox.Show("Microsoft Tips app is not installed on this system :(\nYou can get it on the Microsoft Store.", "We are sorry...", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
{
Process.Start(@"shell:appsfolder\Microsoft.Getstarted_8wekyb3d8bbwe!App");
}
break;
default:
btnBack.PerformClick();
break;
}
}
}
}