public VirtualSiteEditDialog(VirtualSite site)
 {
     InitializeComponent();
     DialogResult = System.Windows.Forms.DialogResult.Cancel;
     virtualSite_ = site;
     if (virtualSite_.DocumentRoot != null)
         documentRootBox_.Text = virtualSite_.DocumentRoot.FullName;
     if (!String.IsNullOrEmpty(virtualSite_.ServerName))
         serverNameBox_.Text = virtualSite_.ServerName;
     StringBuilder bd = new StringBuilder();
     foreach (IPPair p in virtualSite_.IPPairs)
         bd.AppendLine(p.ToString());
     addressListBox_.Text = bd.ToString();
 }
 public void SetVirtualSites(VirtualSite[] sites)
 {
     virtualSites_.Clear();
     virtualSiteListBox_.Items.Clear();
     for (int idx = 0; idx < sites.Length; idx++)
     {
         virtualSites_.Add(sites[idx]);
         virtualSiteListBox_.Items.Add(sites[idx]);
     }
 }
 public VirtualSite[] GetVirtualSites()
 {
     VirtualSite[] sites = new VirtualSite[virtualSites_.Count];
     virtualSites_.CopyTo(sites, 0);
     return sites;
 }