/// <summary> /// 获取COOKIE /// </summary> /// <param name="var">变量</param> /// <returns>状态</returns> private double GETCOOKIE(CVariable var) { string cookieName = m_indicator.GetText(var.m_parameters[1]); UserCookieService cookieService = DataCenter.UserCookieService; UserCookie cookie = new UserCookie(); if (cookieService.GetCookie(cookieName, ref cookie) > 0) { CVariable newVar = new CVariable(m_indicator); newVar.m_expression = "'" + cookie.m_value + "'"; m_indicator.SetVariable(var.m_parameters[0], newVar); return(1); } return(0); }
/// <summary> /// 显示 /// </summary> public override void Show() { UserCookieService cookieService = DataCenter.UserCookieService; UserCookie cookie = new UserCookie(); if (cookieService.GetCookie("LOGININFO", ref cookie) > 0) { String[] strs = cookie.m_value.Split(','); if (strs.Length >= 2) { TextBoxA txtUserName = GetTextBox("txtUserName"); TextBoxA txtPassword = GetTextBox("txtPassword"); txtUserName.Text = strs[0]; txtPassword.Text = strs[1]; } } base.Show(); }