Ejemplo n.º 1
0
 static void SaveToCookie(UserOptions options, HttpCookie cookie)
 {
     cookie["Cookies"]     = Convert.ToByte(options.Cookies).ToString();
     cookie["DocT"]        = Convert.ToByte(options.DocType).ToString();
     cookie["EncUrl"]      = Convert.ToByte(options.EncodeUrl).ToString();
     cookie["ForceEncode"] = Convert.ToByte(options.ForceEncoding).ToString();
     cookie["Frames"]      = Convert.ToByte(options.Frames).ToString();
     cookie["ZIP"]         = Convert.ToByte(options.HttpCompression).ToString();
     cookie["ImgZip"]      = Convert.ToByte(options.ImageCompressor).ToString();
     cookie["Img"]         = Convert.ToByte(options.Images).ToString();
     cookie["Links"]       = Convert.ToByte(options.Links).ToString();
     cookie["Float"]       = Convert.ToByte(options.OrginalUrl).ToString();
     cookie["Title"]       = Convert.ToByte(options.PageTitle).ToString();
     cookie["RemImg"]      = Convert.ToByte(options.RemoveImages).ToString();
     cookie["RemObj"]      = Convert.ToByte(options.RemoveObjects).ToString();
     cookie["RemScript"]   = Convert.ToByte(options.RemoveScripts).ToString();
     cookie["Forms"]       = Convert.ToByte(options.SubmitForms).ToString();
     cookie["TempCookies"] = Convert.ToByte(options.TempCookies).ToString();
 }
Ejemplo n.º 2
0
        static UserOptions ReadFromCookie(HttpCookie cookie)
        {
            UserOptions result = LoadDefaults();

            result.Cookies         = ConvertToBool(cookie["Cookies"], result.Cookies);
            result.DocType         = ConvertToBool(cookie["DocT"], result.DocType);
            result.EncodeUrl       = ConvertToBool(cookie["EncUrl"], result.EncodeUrl);
            result.ForceEncoding   = ConvertToBool(cookie["PgEnc"], result.ForceEncoding);
            result.Frames          = ConvertToBool(cookie["Frames"], result.Frames);
            result.HttpCompression = ConvertToBool(cookie["ZIP"], result.HttpCompression);
            result.ImageCompressor = ConvertToBool(cookie["ImgZip"], result.ImageCompressor);
            result.Images          = ConvertToBool(cookie["Img"], result.Images);
            result.Links           = ConvertToBool(cookie["Links"], result.Links);
            result.OrginalUrl      = ConvertToBool(cookie["FloatBar"], result.OrginalUrl);
            result.PageTitle       = ConvertToBool(cookie["Title"], result.PageTitle);
            result.RemoveImages    = ConvertToBool(cookie["RemImg"], result.RemoveImages);
            result.RemoveObjects   = ConvertToBool(cookie["RemObj"], result.RemoveObjects);
            result.RemoveScripts   = ConvertToBool(cookie["RemScript"], result.RemoveScripts);
            result.SubmitForms     = ConvertToBool(cookie["Forms"], result.SubmitForms);
            result.TempCookies     = ConvertToBool(cookie["TempCookies"], result.TempCookies);

            return(result);
        }
Ejemplo n.º 3
0
		static void SaveToCookie(UserOptions options, HttpCookie cookie)
		{
			cookie["Cookies"] = Convert.ToByte(options.Cookies).ToString();
			cookie["DocT"] = Convert.ToByte(options.DocType).ToString();
			cookie["EncUrl"] = Convert.ToByte(options.EncodeUrl).ToString();
			cookie["ForceEncode"] = Convert.ToByte(options.ForceEncoding).ToString();
			cookie["Frames"] = Convert.ToByte(options.Frames).ToString();
			cookie["ZIP"] = Convert.ToByte(options.HttpCompression).ToString();
			cookie["ImgZip"] = Convert.ToByte(options.ImageCompressor).ToString();
			cookie["Img"] = Convert.ToByte(options.Images).ToString();
			cookie["Links"] = Convert.ToByte(options.Links).ToString();
			cookie["Float"] = Convert.ToByte(options.OrginalUrl).ToString();
			cookie["Title"] = Convert.ToByte(options.PageTitle).ToString();
			cookie["RemImg"] = Convert.ToByte(options.RemoveImages).ToString();
			cookie["RemObj"] = Convert.ToByte(options.RemoveObjects).ToString();
			cookie["RemScript"] = Convert.ToByte(options.RemoveScripts).ToString();
			cookie["Forms"] = Convert.ToByte(options.SubmitForms).ToString();
			cookie["TempCookies"] = Convert.ToByte(options.TempCookies).ToString();
		}