예제 #1
0
        public void EditFile(string file)
        {
            string args = string.Format(EditFileCommand, file);
            //AppProcessor.StartNewCMDProcess(VSDevenvFileFullPath, args);
            var p = AppProcessor.StartNewProcess(vsDevenvFileFullPath.Replace(".exe", ""), args);

            p.WaitForExit();
            p.Close();
        }
예제 #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();
        }