public TweakControl(TweakManager.Tweak tweak) { Tweak = tweak; //myTweak.StatusChanged += OnStatusChanged; InitializeComponent(); //OnStatusChanged(null, null); string infoStr = ""; switch (tweak.Type) { case TweakManager.TweakType.SetRegistry: case TweakManager.TweakType.SetGPO: infoStr += tweak.Path + "\r\n"; infoStr += tweak.Key + " = " + tweak.Value + "\r\n"; break; case TweakManager.TweakType.DisableTask: infoStr += "Disable Scheduled Task: " + tweak.Path + "\\" + tweak.Key + "\r\n"; break; case TweakManager.TweakType.DisableService: infoStr += "Disable Service: " + tweak.Key + "\r\n"; break; case TweakManager.TweakType.BlockFile: infoStr += "Dissable Access to: " + tweak.Path + "\r\n"; break; //case TweakType.UseFirewall: // infoStr += "Set Firewal roule" + "\r\n"; // break; default: infoStr = "Unknown Tweak Type"; break; } info.Text = infoStr; toggle.Click += new RoutedEventHandler(toggle_Click); toggle.Click += new RoutedEventHandler(rect_Click); rect.MouseDown += new MouseButtonEventHandler(rect_Click); label.MouseDown += new MouseButtonEventHandler(rect_Click); info.PreviewMouseDown += new MouseButtonEventHandler(rect_Click); }
public bool UndoTweak(TweakManager.Tweak tweak) { return(RemoteExec("UndoTweak", tweak, false)); }
public bool TestTweak(TweakManager.Tweak tweak) { return(RemoteExec("TestTweak", tweak, false)); }
///////////////////////////////////////// // Privacy tweaks public bool ApplyTweak(TweakManager.Tweak tweak) { return(RemoteExec("ApplyTweak", tweak, false)); }