コード例 #1
0
 //Disables Classic Theme and if specified Classic Taskbar.
 public static void MasterDisable(bool taskbar)
 {
     Process.Start("C:\\SCT\\DisableThemeScript.bat", "pre").WaitForExit();
     Registry.CurrentUser.OpenSubKey("SOFTWARE", true).CreateSubKey("1337ftw").CreateSubKey("SimpleClassicTheme");
     Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\1337ftw\SimpleClassicTheme", "Enabled", false.ToString());
     //SCTT
     if ((string)Configuration.GetItem("TaskbarType", "SiB+OS") == "SCTT")
     {
         ClassicTaskbar.DisableSCTT();
         Disable();
     }
     //Windows 8.1
     else if (Environment.OSVersion.Version.Major != 10)
     {
         Disable();
         Process.Start("cmd", "/c taskkill /im explorer.exe /f").WaitForExit();
         Process.Start("explorer.exe", @"C:\Windows\explorer.exe");
     }
     //Windows 10 with taskbar
     else if (taskbar)
     {
         Disable();
         ClassicTaskbar.Disable();
     }
     //Just disable
     else
     {
         Disable();
     }
     Process.Start("C:\\SCT\\DisableThemeScript.bat", "post").WaitForExit();
 }
コード例 #2
0
        //Disables Classic Theme and if specified Classic Taskbar.
        public static void MasterDisable(bool taskbar)
        {
            Process.Start($"{Configuration.InstallPath}DisableThemeScript.bat", "pre").WaitForExit();
            Configuration.Enabled = false;
            if (!taskbar || Configuration.TaskbarType == TaskbarType.ExplorerPatcher)
            {
                Disable();
                if (ExplorerPatcher.Enabled)
                {
                    ExplorerPatcher.ApplyConfiguration(true);
                }
            }
            else if (Configuration.TaskbarType == TaskbarType.StartIsBackOpenShell)
            {
                if (Environment.OSVersion.Version.Major == 10 && Environment.OSVersion.Version.Build < 22000)
                {
                    Disable();
                    ClassicTaskbar.Disable();
                }
            }
            else if (Configuration.TaskbarType == TaskbarType.SimpleClassicThemeTaskbar)
            {
                ClassicTaskbar.DisableSCTT();
                Disable();
                if (ExplorerPatcher.Enabled)
                {
                    ExplorerPatcher.ApplyConfiguration();
                }
                Process.Start("cmd", "/c taskkill /im explorer.exe /f").WaitForExit();
                Process.Start("explorer.exe", @"C:\Windows\explorer.exe");
            }
            else if (Configuration.TaskbarType == TaskbarType.Windows81Vanilla)
            {
                Disable();
                if (ExplorerPatcher.Enabled)
                {
                    ExplorerPatcher.ApplyConfiguration();
                }
                Process.Start("cmd", "/c taskkill /im explorer.exe /f").WaitForExit();
                Process.Start("explorer.exe", @"C:\Windows\explorer.exe");
            }
            else if (Configuration.TaskbarType == TaskbarType.RetroBar)
            {
                foreach (Process p in Process.GetProcessesByName("RetroBar"))
                {
                    p.Kill();
                }

                Disable();
                if (ExplorerPatcher.Enabled)
                {
                    ExplorerPatcher.ApplyConfiguration();
                }
                Process.Start("cmd", "/c taskkill /im explorer.exe /f").WaitForExit();
                Process.Start("explorer.exe", @"C:\Windows\explorer.exe");
            }
            Process.Start($"{Configuration.InstallPath}DisableThemeScript.bat", "post").WaitForExit();
        }
コード例 #3
0
 //Disables Classic Theme and if specified Classic Taskbar.
 public static void MasterDisable(bool taskbar)
 {
     Registry.CurrentUser.OpenSubKey("SOFTWARE", true).CreateSubKey("SimpleClassicTheme");
     Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\SimpleClassicTheme", "Enabled", false.ToString());
     //Windows 8.1
     if (Environment.OSVersion.Version.Major != 10)
     {
         Disable();
         Process.Start("cmd", "/c taskkill /im explorer.exe /f").WaitForExit();
         Process.Start("explorer.exe", @"C:\Windows\explorer.exe");
     }
     //Windows 10 with taskbar
     else if (taskbar)
     {
         Disable();
         ClassicTaskbar.Disable();
     }
     //Just disable
     else
     {
         Disable();
     }
 }