Skip to content

Commit

Permalink
Updated to 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
hellzerg committed May 12, 2019
1 parent af99ce2 commit a4ce435
Show file tree
Hide file tree
Showing 9 changed files with 991 additions and 891 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [4.8] - 2019-05-12
- Added: Disable Sticky Keys (for current user)
- Added: Enable Long Paths (removes 260 character path limit, for Windows 10)

## [4.7] - 2019-02-03
- Added: Disable Cloud Clipboard experience (for Windows 10 1809)

Expand Down
4 changes: 2 additions & 2 deletions Optimizer/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void t2_Tick(object sender, EventArgs e)
string s10 = "deadmoon © 2";
string s11 = "deadmoon © 20";
string s12 = "deadmoon © 201";
string s13 = "deadmoon © 2018";
string s13 = "deadmoon © 2019";

switch (l2.Text)
{
Expand Down Expand Up @@ -142,7 +142,7 @@ private void t2_Tick(object sender, EventArgs e)
t2.Stop();
//t1.Start();
break;
case "deadmoon © 2018":
case "deadmoon © 2019":
l2.Text = s0;
break;
}
Expand Down
1,798 changes: 914 additions & 884 deletions Optimizer/MainForm.Designer.cs

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions Optimizer/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,34 @@ private void EnableToggleEvents()
toggleSwitch35.Click += new EventHandler(ToggleSwitch35_Click);
toggleSwitch36.Click += new EventHandler(ToggleSwitch36_Click);
toggleSwitch37.Click += new EventHandler(ToggleSwitch37_Click);
toggleSwitch38.Click += new EventHandler(ToggleSwitch38_Click);
toggleSwitch39.Click += new EventHandler(ToggleSwitch39_Click);
}

private void ToggleSwitch39_Click(object sender, EventArgs e)
{
if (!toggleSwitch39.Checked)
{
Optimize.EnableLongPaths();
}
else
{
Optimize.DisableLongPaths();
}
Options.CurrentOptions.EnableLongPaths = !toggleSwitch39.Checked;
}

private void ToggleSwitch38_Click(object sender, EventArgs e)
{
if (!toggleSwitch38.Checked)
{
Optimize.DisableStickyKeys();
}
else
{
Optimize.EnableStickyKeys();
}
Options.CurrentOptions.DisableStickyKeys = !toggleSwitch38.Checked;
}

private void ToggleSwitch37_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -471,6 +499,7 @@ private void LoadUniversalToggleStates()
toggleSwitch32.Checked = Options.CurrentOptions.DisableCompatibilityAssistant;
toggleSwitch33.Checked = Options.CurrentOptions.DisableFaxService;
toggleSwitch36.Checked = Options.CurrentOptions.DisableSmartScreen;
toggleSwitch38.Checked = Options.CurrentOptions.DisableStickyKeys;
}

private void LoadWindowsVIIIToggleStates()
Expand Down Expand Up @@ -501,6 +530,7 @@ private void LoadWindowsXToggleStates()
toggleSwitch34.Checked = Options.CurrentOptions.DisableInsiderService;
toggleSwitch35.Checked = Options.CurrentOptions.DisableFeatureUpdates;
toggleSwitch37.Checked = Options.CurrentOptions.DisableCloudClipboard;
toggleSwitch39.Checked = Options.CurrentOptions.EnableLongPaths;
}

private void Main_Load(object sender, EventArgs e)
Expand Down
32 changes: 32 additions & 0 deletions Optimizer/Optimize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -951,5 +951,37 @@ internal static void EnableCloudClipboard()
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Clipboard", "EnableClipboardHistory", "1", RegistryValueKind.DWord);
Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Clipboard", "EnableClipboardHistory", "1", RegistryValueKind.DWord);
}

// Working only on Windows 10
// Removes 260 character path limit
internal static void EnableLongPaths()
{
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem", "LongPathsEnabled", "1", RegistryValueKind.DWord);
}

internal static void DisableLongPaths()
{
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem", "LongPathsEnabled", "0", RegistryValueKind.DWord);
}

internal static void DisableStickyKeys()
{
Registry.SetValue(@"HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys", "Flags", "506", RegistryValueKind.String);
Registry.SetValue(@"HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response", "Flags", "122", RegistryValueKind.String);
Registry.SetValue(@"HKEY_CURRENT_USER\Control Panel\Accessibility\ToggleKeys", "Flags", "58", RegistryValueKind.String);
Registry.SetValue(@"HKEY_USERS\.DEFAULT\Control Panel\Accessibility\StickyKeys", "Flags", "506", RegistryValueKind.String);
Registry.SetValue(@"HKEY_USERS\.DEFAULT\Control Panel\Accessibility\Keyboard Response", "Flags", "122", RegistryValueKind.String);
Registry.SetValue(@"HKEY_USERS\.DEFAULT\Control Panel\Accessibility\ToggleKeys", "Flags", "58", RegistryValueKind.String);
}

internal static void EnableStickyKeys()
{
Registry.SetValue(@"HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys", "Flags", "510", RegistryValueKind.String);
Registry.SetValue(@"HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response", "Flags", "126", RegistryValueKind.String);
Registry.SetValue(@"HKEY_CURRENT_USER\Control Panel\Accessibility\ToggleKeys", "Flags", "62", RegistryValueKind.String);
Registry.SetValue(@"HKEY_USERS\.DEFAULT\Control Panel\Accessibility\StickyKeys", "Flags", "510", RegistryValueKind.String);
Registry.SetValue(@"HKEY_USERS\.DEFAULT\Control Panel\Accessibility\Keyboard Response", "Flags", "126", RegistryValueKind.String);
Registry.SetValue(@"HKEY_USERS\.DEFAULT\Control Panel\Accessibility\ToggleKeys", "Flags", "62", RegistryValueKind.String);
}
}
}
6 changes: 5 additions & 1 deletion Optimizer/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class SettingsJson
public bool DisableFaxService { get; set; }
public bool DisableSmartScreen { get; set; }
public bool DisableCloudClipboard { get; set; }
public bool DisableStickyKeys { get; set; }

public bool EnableLegacyVolumeSlider { get; set; }
public bool EnableTaskbarColor { get; set; }
Expand All @@ -51,6 +52,7 @@ public class SettingsJson
public bool DisableGameBar { get; set; }
public bool DisableInsiderService { get; set; }
public bool DisableFeatureUpdates { get; set; }
public bool EnableLongPaths { get; set; }

public bool DisableOneDrive { get; set; }
}
Expand Down Expand Up @@ -165,7 +167,7 @@ internal static void LoadSettings()
CurrentOptions.DisableCompatibilityAssistant = false;
CurrentOptions.DisableFaxService = false;
CurrentOptions.DisableSmartScreen = false;
CurrentOptions.DisableCloudClipboard = false;
CurrentOptions.DisableStickyKeys = false;

CurrentOptions.EnableLegacyVolumeSlider = false;
CurrentOptions.EnableTaskbarColor = false;
Expand All @@ -187,6 +189,8 @@ internal static void LoadSettings()
CurrentOptions.DisableGameBar = false;
CurrentOptions.DisableInsiderService = false;
CurrentOptions.DisableFeatureUpdates = false;
CurrentOptions.DisableCloudClipboard = false;
CurrentOptions.EnableLongPaths = false;

CurrentOptions.DisableOneDrive = false;

Expand Down
2 changes: 1 addition & 1 deletion Optimizer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static class Program

// Enter current version here
internal readonly static float Major = 4;
internal readonly static float Minor = 7;
internal readonly static float Minor = 8;

internal static string GetCurrentVersionTostring()
{
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ https://github.com/hellzerg/optimizer/blob/master/IMAGES.md

## Details: ##

* Latest version: 4.7
* Released: February 3, 2019
* Latest version: 4.8
* Released: May 12, 2019
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.7
4.8

0 comments on commit a4ce435

Please sign in to comment.