-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
138 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/> | ||
</startup> | ||
</configuration> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
using System.IO; | ||
using System.Linq; | ||
using System.Windows.Forms; | ||
using WinSlap.Properties; | ||
// TODO: reimplement properly | ||
// using WinSlap.Properties; | ||
|
||
namespace WinSlap | ||
{ | ||
|
@@ -60,7 +61,7 @@ private void Button1_Click(object sender, EventArgs e) | |
|
||
} | ||
|
||
public void SlapTweaks(Slapping slapping) | ||
private void SlapTweaks(Slapping slapping) | ||
{ | ||
for (int x = 0; x <= checkedListBoxTweaks.CheckedItems.Count; x++) | ||
{ | ||
|
@@ -325,21 +326,29 @@ public void SlapTweaks(Slapping slapping) | |
slapping.SetCurrentOp(boxcontent); | ||
Slapper.UninstallXPSWriter(); | ||
break; | ||
case "Disable security questions for local accounts": | ||
slapping.SetCurrentOp(boxcontent); | ||
Slapper.DisableSecurityQuestions(); | ||
break; | ||
case "Disable app suggestions (e.g. use Edge instead of Firefox)": | ||
slapping.SetCurrentOp(boxcontent); | ||
Slapper.DisableAppSuggestions(); | ||
break; | ||
default: | ||
slapping.Hide(); | ||
MessageBox.Show("Error 002 in Tweaks (" + boxcontent + ")\nPlease report this bug to [email protected]", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
MessageBox.Show("Item not found (" + boxcontent + ")\nPlease report this issue at https://github.com/svenmauch/WinSlap", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(1); | ||
break; | ||
} | ||
} | ||
} | ||
|
||
catch (NullReferenceException) | ||
{ | ||
slapping.Hide(); | ||
MessageBox.Show("Error 001 in \"" + boxcontent + "\"\nPlease report this bug to [email protected]", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(1); | ||
} | ||
catch (NullReferenceException ex) | ||
{ | ||
slapping.Hide(); | ||
MessageBox.Show("NullReferenceException in \"" + boxcontent + "\"\nPlease report this issue at https://github.com/svenmauch/WinSlap" + "\n\n" + ex, "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(1); | ||
} | ||
} | ||
} | ||
|
||
private void SlapAppearance(Slapping slapping) | ||
|
@@ -403,21 +412,25 @@ private void SlapAppearance(Slapping slapping) | |
slapping.SetCurrentOp(boxcontent); | ||
Slapper.UseWin7Volume(); | ||
break; | ||
case "Remove Microsoft Edge dekstop shortcut": | ||
case "Remove Microsoft Edge desktop shortcut": | ||
slapping.SetCurrentOp(boxcontent); | ||
Slapper.RemoveEdgeShortcut(); | ||
break; | ||
case "Disable Lockscreen Blur": | ||
slapping.SetCurrentOp(boxcontent); | ||
Slapper.DisableLockscreenBlur(); | ||
break; | ||
default: | ||
slapping.Hide(); | ||
MessageBox.Show("Error 002 in Appearance\nPlease report this bug to [email protected]", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
MessageBox.Show("Item not found in Appearance\nPlease report this issue at https://github.com/svenmauch/WinSlap", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(1); | ||
break; | ||
} | ||
} | ||
catch (NullReferenceException) | ||
{ | ||
slapping.Hide(); | ||
MessageBox.Show("Error 001 in \"" + boxcontent + "\"\nPlease report this bug to [email protected]", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
MessageBox.Show("NullReferenceException in \"" + boxcontent + "\"\nPlease report this issue at https://github.com/svenmauch/WinSlap", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(1); | ||
} | ||
} | ||
|
@@ -470,15 +483,15 @@ private void SlapSoftware(Slapping slapping) | |
break; | ||
default: | ||
slapping.Hide(); | ||
MessageBox.Show("Error 002 in Software\nPlease report this bug to [email protected]", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
MessageBox.Show("Item not found in Software\nPlease report this issue at https://github.com/svenmauch/WinSlap", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(1); | ||
break; | ||
} | ||
} | ||
catch (NullReferenceException) | ||
{ | ||
slapping.Hide(); | ||
MessageBox.Show("Error 001 in \"" + boxcontent + "\"\nPlease report this bug to [email protected]", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
MessageBox.Show("NullReferenceException in \"" + boxcontent + "\"\nPlease report this issue at https://github.com/svenmauch/WinSlap", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(1); | ||
} | ||
} | ||
|
@@ -503,15 +516,15 @@ private void SlapAdvanced(Slapping slapping) | |
break; | ||
default: | ||
slapping.Hide(); | ||
MessageBox.Show("Error 002 in Advanced\nPlease report this bug to [email protected]", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
MessageBox.Show("Item not found in Advanced\nPlease report this issue at https://github.com/svenmauch/WinSlap", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(1); | ||
break; | ||
} | ||
} | ||
catch (NullReferenceException) | ||
{ | ||
slapping.Hide(); | ||
MessageBox.Show("Error 001 in \"" + boxcontent + "\"\nPlease report this bug to [email protected]", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
MessageBox.Show("NullReferenceException in \"" + boxcontent + "\"\nPlease report this issue at https://github.com/svenmauch/WinSlap", "Something went wrong...", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(1); | ||
} | ||
} | ||
|
@@ -524,7 +537,7 @@ private void WinSlap_Load(object sender, EventArgs e) | |
AppDomain.CurrentDomain.ProcessExit += OnProcessExit; | ||
Directory.CreateDirectory(Tmpfolder); | ||
|
||
labelOS.Text = "Windows 10 (" + Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "").ToString() + ")"; | ||
labelOS.Text = "Windows 10 (" + Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "") + ")"; | ||
} | ||
|
||
private static void RestartNow() | ||
|
@@ -540,10 +553,12 @@ private static void RestartNow() | |
|
||
private static void SpendeAutorun() | ||
{ | ||
/* TODO: reimplement properly | ||
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\WinSlap\"); | ||
File.WriteAllBytes(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\WinSlap\" + "Spende.exe", Resources.Spende); | ||
RegistryKey regStartUp = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce", true); | ||
regStartUp.SetValue("WinSlap", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\WinSlap\" + "Spende.exe"); | ||
*/ | ||
} | ||
|
||
private void OnProcessExit(object sender, EventArgs e) | ||
|
@@ -569,8 +584,7 @@ private void InitParameterNotice() | |
private static Boolean ShowDisclaimer() | ||
{ | ||
string disclaimer = "- All changes are made at your own risk.\n" + | ||
"- Any potential damage is your own responsibility.\n" + | ||
"- There is no easy way to restore the changes.\n" + | ||
"- There is no easy way to revert the changes.\n" + | ||
"- Your PC will restart immediately after the changes have been made.\n \n" + | ||
"Are you ready to slap?"; | ||
|
||
|
@@ -611,11 +625,6 @@ private void ButtonUncheckAdvanced_Click(object sender, EventArgs e) | |
CheckAll(checkedListBoxAdvanced, false); | ||
} | ||
|
||
private void LabelWinSlap_DoubleClick(object sender, EventArgs e) | ||
{ | ||
MessageBox.Show("WinSlap by Sven Mauch (2018)"); | ||
} | ||
|
||
private void CheckAll(CheckedListBox list, bool check) | ||
{ | ||
for (int i = 0; i < list.Items.Count; i++) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.