Пример #1
0
 public void func_Start()
 {
     try
     {
         if (rd_NoDecryption.Checked)
         {
             var_str = rt_str.Text;
             func_Get_Info();
         }
         else if (rd_UrlDecryption.Checked)
         {
             var_str            = UrlInfo.func_UrlDencode(rt_str.Text);
             rt_decryption.Text = var_str;
             func_Get_Info();
         }
         else if (rd_Base64Decryption.Checked)
         {
             var_str            = Base64Info.func_base64decode(rt_str.Text);
             rt_decryption.Text = var_str;
             func_Get_Info();
         }
         else if (rd_HexDecryption.Checked)
         {
             var_str            = HexInfo.func_HexDecode(rt_str.Text);
             rt_decryption.Text = var_str;
             func_Get_Info();
         }
     }
     catch (Exception)
     {
     }
 }
Пример #2
0
        private void btn_encode_Click(object sender, EventArgs e)
        {
            if (txt_decode.Text == "")
            {
                MessageBox.Show("请输入要转换的内容", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            try
            {
                if (cmbb_choose.SelectedIndex == 0)
                {
                    txt_encode.Text = md5encode.func_Md5EncryptCode(txt_decode.Text);
                }
                else if (cmbb_choose.SelectedIndex == 1)
                {
                    txt_encode.Text = UrlInfo.func_UrlEncode(txt_decode.Text);
                }
                else if (cmbb_choose.SelectedIndex == 2)
                {
                    txt_encode.Text = Base64Info.func_base64encode(txt_decode.Text);
                }
                else if (cmbb_choose.SelectedIndex == 3)
                {
                    txt_encode.Text = HexInfo.func_HexEncode(txt_decode.Text);
                }
                else if (cmbb_choose.SelectedIndex == 4)
                {
                    if (rb_MySqlChar.Checked == true)
                    {
                        txt_encode.Text = ascii_info.func_asciiEncode(txt_decode.Text, "sqlchar");
                    }
                    else if (rb_fromchar.Checked == true)
                    {
                        txt_encode.Text = ascii_info.func_asciiEncode(txt_decode.Text, "fromchar");
                    }
                    else if (rb_MsSqlChar.Checked)
                    {
                        txt_encode.Text = ascii_info.func_asciiEncode(txt_decode.Text, "mssqlchar");
                    }
                    else
                    {
                        txt_encode.Text = ascii_info.func_asciiEncode(txt_decode.Text, "");
                    }
                }
                else if (cmbb_choose.SelectedIndex == 5)
                {
                    txt_encode.Text = UnicodeInfo.func_UnicodeEncode(txt_decode.Text);
                }
            }
            catch (Exception)
            {
                MessageBox.Show("转换失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
        }
Пример #3
0
 private void btn_decode_Click(object sender, EventArgs e)
 {
     if (txt_decode.Text == "")
     {
         MessageBox.Show("请输入要转换的内容", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     try
     {
         if (cmbb_choose.SelectedIndex == 1)
         {
             txt_encode.Text = UrlInfo.func_UrlDencode(txt_decode.Text);
         }
         else if (cmbb_choose.SelectedIndex == 2)
         {
             txt_encode.Text = Base64Info.func_base64decode(txt_decode.Text);
         }
         else if (cmbb_choose.SelectedIndex == 3)
         {
             txt_encode.Text = HexInfo.func_HexDecode(txt_decode.Text);
         }
         else if (cmbb_choose.SelectedIndex == 4)
         {
             txt_encode.Text = ascii_info.func_asciiDecode(txt_decode.Text);
         }
         else if (cmbb_choose.SelectedIndex == 5)
         {
             txt_encode.Text = UnicodeInfo.func_UnicodeDecode(txt_decode.Text);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("转换失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
 }