Ejemplo n.º 1
0
 /// <summary>根据指定的解码模式解码指定的字符串</summary>
 /// <param name="s">指定的字符串</param>
 /// <param name="cMode">解码模式,=0:不解码,=1:Html解码,=2:Url解码,=3:Escape解码,=4:EURI解码,=11:Html编码,=12:Url编码,=13:Escape编码,=14:EURI编码</param>
 /// <returns>根据指定的解码模式解码指定的字符串</returns>
 public static string GetUnCode(string s, int cMode)
 {
     if (cMode == 1)
     {
         return(Often.HtmlDecode(s));
     }
     else if (cMode == 2)
     {
         return(Often.UrlDes(s));
     }
     else if (cMode == 3)
     {
         return(Often.Unescape(s));
     }
     else if (cMode == 4)
     {
         return(Often.DecodeURI(s));
     }
     else if (cMode == 11)
     {
         return(Often.HtmlEncode(s));
     }
     else if (cMode == 12)
     {
         return(Often.UrlEn(s));
     }
     else if (cMode == 13)
     {
         return(Often.Escape(s));
     }
     else if (cMode == 14)
     {
         return(Often.EncodeURI(s));
     }
     return(s);
 }
Ejemplo n.º 2
0
 private void bt02a_Click(object sender, EventArgs e)
 {
     GetOut(Often.EncodeURI(GetInput()));
 }