// Cookie �s���܂��B private EcmResponse Cookie(HttpRequest rq) { XmlDocumentFragment doc = myXhtml.CreateDocumentFragment(); HttpCookieCollection cookies = new HttpCookieCollection(); string pathValue = rq.Form[PathNameInputLabel]; if(!string.IsNullOrEmpty(pathValue)){ XmlElement disp = myXhtml.Create("p"); disp.InnerText = "���[�L���O�R�s�[�̃p�X��ݒ肵�܂��� : " + pathValue; doc.AppendChild(disp); HttpCookie pathCookie = new HttpCookie(PathNameCookieLabelPrefix + myProject.Id, pathValue); DateTime dt = DateTime.Now; TimeSpan ts = new TimeSpan(30, 0, 0, 0); pathCookie.Expires = dt.Add(ts); cookies.Add(pathCookie); } string localUriValue = rq.Form[LocalUriInputLabel]; if(!string.IsNullOrEmpty(localUriValue)){ XmlElement disp = myXhtml.Create("p"); disp.InnerText = "���[�J������ Uri ��ݒ肵�܂��� : " + localUriValue; doc.AppendChild(disp); HttpCookie localUriCookie = new HttpCookie(LocalUriCookieLabelPrefix + myProject.Id, localUriValue); DateTime dt = DateTime.Now; TimeSpan ts = new TimeSpan(30, 0, 0, 0); localUriCookie.Expires = dt.Add(ts); cookies.Add(localUriCookie); } HtmlResponse result = new HtmlResponse(myXhtml, doc); result.Cookies = cookies; return result; }
// �v���W�F�N�gID ���w�肳��Ă��Ȃ��ꍇ�̏��� private void ProjectList() { if(!Directory.Exists(myProjectDir)){ ShowError("�f�B���N�g�� {0} ���݂���܂���B", myProjectDir); return; } if(Request.HttpMethod.Equals("post", StringComparison.CurrentCultureIgnoreCase)){ PostNewProject(); } else { ViewProjectList(); } EcmResponse res = new HtmlResponse(xhtml); res.WriteResponse(Response); }