-
Notifications
You must be signed in to change notification settings - Fork 0
/
ToolEncoderForm.cs
45 lines (36 loc) · 1.22 KB
/
ToolEncoderForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Windows.Forms;
using System.Web;
namespace PT_Sguil
{
public partial class ToolEncoderForm : Form
{
public ToolEncoderForm(string inputData)
{
InitializeComponent();
this.tbEncodedText.Text = inputData;
}
private void btnBase64Decode_Click(object sender, EventArgs e)
{
tbPlainText.Text = Tools.Base64Decode(tbEncodedText.Text);
}
private void btnBase64Encode_Click(object sender, EventArgs e)
{
tbEncodedText.Text = Tools.Base64Encode(tbPlainText.Text);
}
private void btnURLDecode_Click(object sender, EventArgs e)
{
tbPlainText.Text = HttpUtility.UrlDecode(tbEncodedText.Text);
}
private void btnURLEncode_Click(object sender, EventArgs e)
{
tbEncodedText.Text = HttpUtility.UrlEncode(tbPlainText.Text);
}
private void btnSwapText_Click(object sender, EventArgs e)
{
string tmpSwap = this.tbPlainText.Text;
this.tbPlainText.Text = this.tbEncodedText.Text;
this.tbEncodedText.Text = tmpSwap;
}
}
}