private void reload() { lbProjects.BeginUpdate(); lbProjects.Items.Clear(); foreach (var project in projects.getAll()) { lbProjects.Items.Add(project); } lbProjects.EndUpdate(); }
private void writeHosts() { var content = new List <String>(); foreach (var project in projects.getAll()) { foreach (var domain in project.domains) { content.Add("127.0.0.1\t" + domain); } } content.Add(options.extraHostsEntries); var hostsContent = string.Join("\r\n", content.ToArray()); System.IO.File.WriteAllText(options.hostsPath, hostsContent); }