public void RemoveCustomizationTest() { var maker = new TileMaker(PATH); maker.SetSquareLogo("../../TestFiles/Miku.png"); maker.MakeTile(); maker.RemoveCustomization(); Assert.IsTrue(!File.Exists("../../TestFiles/HelloTileMaker.VisualElementsManifest.xml-wtm")); Assert.IsTrue(!File.Exists("../../TestFiles/Win10TileMaker_Assets")); }
private void RecoverButton_Click(object sender, RoutedEventArgs e) { string appPath = AppPathBox.Text, shortcutPath = ShortcutPathBox.Text; if (appPath == "" || shortcutPath == "") { MessageBox.Show("To remove the customization, the desktop app's path and its shortcut's path should be provided", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning); return; } try { var maker = new TileMaker(appPath, shortcutPath); maker.RemoveCustomization(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } MessageBox.Show("The original Tile has been recovered", "Calm down", MessageBoxButton.OK, MessageBoxImage.Information); }