// Event handlers void btnApply_Click(object sender, EventArgs e) { bool resetVS2008 = false; bool resetVS2010 = false; bool resetVWD2010 = false; UpdateApp(appTestDrivenDotNet, chkTestDrivenDotNet); UpdateApp(appWindowsExplorer, chkWindowsExplorer); UpdateApp(appMVC1VS2008, chkMVC1VS2008, ref resetVS2008); UpdateApp(appMVC2VS2008, chkMVC2VS2008, ref resetVS2008); UpdateApp(appMVC2VS2010, chkMVC2VS2010, ref resetVS2010); UpdateApp(appMVC2VWD2010, chkMVC2VWD2010, ref resetVWD2010); UpdateApp(appMVC3VS2010, chkMVC3VS2010, ref resetVS2010); UpdateApp(appMVC3VWD2010, chkMVC3VWD2010, ref resetVWD2010); if (resetVS2008) { VisualStudio2008.ResetVisualStudio(this); } if (resetVS2010) { VisualStudio2010.ResetVisualStudio(this); } if (resetVWD2010) { VisualWebDeveloper2010.ResetVisualStudio(this); } UpdateUI(); }
public string Disable() { using (RegistryKey key = OpenMvc2Key()) key.DeleteSubKeyTree("xUnit.net"); UninstallZipFiles(VisualStudio2010.GetTestProjectTemplatePath("CSharp")); UninstallZipFiles(VisualStudio2010.GetTestProjectTemplatePath("VisualBasic")); return(null); }
public string Enable() { string CSharpPath = VisualStudio2010.GetTestProjectTemplatePath("CSharp"); if (!Directory.Exists(CSharpPath)) { Directory.CreateDirectory(CSharpPath); } ResourceHelper.WriteResourceToFile("Xunit.Installer.Templates.MVC2-CS-VS2010.zip", Path.Combine(CSharpPath, TEMPLATE_NAME_CSHARP)); string VBPath = VisualStudio2010.GetTestProjectTemplatePath("VisualBasic"); if (!Directory.Exists(VBPath)) { Directory.CreateDirectory(VBPath); } ResourceHelper.WriteResourceToFile("Xunit.Installer.Templates.MVC2-VB-VS2010.zip", Path.Combine(VBPath, TEMPLATE_NAME_VB)); using (RegistryKey key = OpenMvc2Key()) using (RegistryKey templateKey = key.CreateSubKey("xUnit.net")) { using (RegistryKey csharpKey = templateKey.CreateSubKey("C#")) { csharpKey.SetValue("AdditionalInfo", "http://xunit.codeplex.com/"); csharpKey.SetValue("Package", ""); csharpKey.SetValue("Path", @"CSharp\Test"); csharpKey.SetValue("Template", TEMPLATE_NAME_CSHARP); csharpKey.SetValue("TestFrameworkName", "xUnit.net build " + Assembly.GetExecutingAssembly().GetName().Version); } using (RegistryKey vbKey = templateKey.CreateSubKey("VB")) { vbKey.SetValue("AdditionalInfo", "http://xunit.codeplex.com/"); vbKey.SetValue("Package", ""); vbKey.SetValue("Path", @"VisualBasic\Test"); vbKey.SetValue("Template", TEMPLATE_NAME_VB); vbKey.SetValue("TestFrameworkName", "xUnit.net build " + Assembly.GetExecutingAssembly().GetName().Version); } } return(null); }