Ejemplo n.º 1
0
 private void AddSite(Site site)
 {
     UCSite uc = new UCSite();
     uc.WebSite = site;
     uc.Dock = DockStyle.Top;
     uc.DeleteHandler = DeleteUCSite;
     uc.Show();
     panSites.Controls.Add(uc);
 }
Ejemplo n.º 2
0
        public static void Start(Site site)
        {
            if (site == null) return;
            //if (SiteProcessDic.ContainsKey(site.Name)) return;

            //C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40 /port:9010 /path: "E:\DEV\WWW\Look\WebSite" /vpath:"/"

            string exe = WebDev_WebServer_Exe.LastIndexOf(".exe", StringComparison.OrdinalIgnoreCase) > 0 ? "" : ".exe";

            string fileName = WebDev_WebServer_Path + WebDev_WebServer_Exe + exe;
            string arguments = string.Format("/port:{0} /path:\"{1}\" /vpath:\"/\" ", site.Port, site.Path);

            var p = AppProcessor.StartNewProcess(fileName, arguments);
            p.WaitForExit(1000);
            p.Close();
        }