private Settings ReadTestSettings(string settingsXml, out string fullPath) { DirectoryInfo projectRoot = PathUtility.FindProjectRoot(new DirectoryInfo(Directory.GetCurrentDirectory())); FileInfo originalPath = getSettingsPath(projectRoot, settingsXml); string dir = Path.Combine(PathUtility.GetBuildDirectory(projectRoot).FullName, "test-workbench"); Directory.CreateDirectory(dir); fullPath = Path.Combine(dir, settingsXml); originalPath.CopyTo(fullPath, true); return(SettingsUtil.ReadSettings(originalPath)); }
public ConfigureMavenRepositoryForm() { InitializeComponent(); settingsPath = SettingsUtil.GetUserSettingsPath(); try { settings = SettingsUtil.ReadSettings(new FileInfo(settingsPath)); } catch (Exception e) { MessageBox.Show(e.Message + e.StackTrace); } }
private void loadSettings() { settingsPath = SettingsUtil.GetUserSettingsPath(); try { if (File.Exists(settingsPath)) { settings = SettingsUtil.ReadSettings(new FileInfo(settingsPath)); } else { throw new Exception("Sorry, but no settings.xml file was found in your Local Repository."); } } catch (Exception ex) { MessageBox.Show("Invalid settings.xml File:" + " " + ex.Message, "Configuration Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } }