Esempio n. 1
0
        private void toBaseTray_Click(object sender, EventArgs e)
        {
            string clipboard = Clipboard.GetText();

            if (clipboard != "")
            {
                clipboard = EasyBase64.Encode(clipboard);
                Clipboard.SetText(clipboard);
                tray.ShowBalloonTip(1000, Translate.convertedToBaseTray, Translate.copiedToClipboard, tray.BalloonTipIcon);
            }
            else
            {
                tray.ShowBalloonTip(1000, "Text'O'Glitch", Translate.clipboardEmpty, tray.BalloonTipIcon);
            }
        }
Esempio n. 2
0
        private void toTextTray_Click(object sender, EventArgs e)
        {
            string clipboard = Clipboard.GetText();

            if (clipboard != "")
            {
                clipboard = EasyBase64.Decode(clipboard);
                if (clipboard != "It is not Base64.")
                {
                    Clipboard.SetText(clipboard);
                    tray.ShowBalloonTip(1000, Translate.decodedFromBaseTray, Translate.decodedFromBaseTray2 + clipboard + "\"." + Translate.copiedToClipboard, tray.BalloonTipIcon);
                }
                else
                {
                    tray.ShowBalloonTip(1000, Translate.itsNotBase, Translate.itsNotBase2, tray.BalloonTipIcon);
                }
            }
            else
            {
                tray.ShowBalloonTip(1000, "Text'O'Glitch", Translate.clipboardEmpty, tray.BalloonTipIcon);
            }
        }
Esempio n. 3
0
        private void working()
        {
            TextOGlitchForm1.threadLocalization();
            CheckForIllegalCrossThreadCalls = false;
            switch (mode)
            {
            case 0:
                string output;
                if (!lightGlitch.Checked)
                {
                    output       = Glitch.Text(textIn.Text, Convert.ToInt32(glitchExtent.Value), false);
                    output       = output.Replace("\r", null);
                    output       = output.Replace("\n", null);
                    textOut.Text = output;
                }
                else if (lightGlitch.Checked)
                {
                    output       = Glitch.Text(textIn.Text, Convert.ToInt32(glitchExtent.Value), true);
                    output       = output.Replace("\r", null);
                    output       = output.Replace("\n", null);
                    textOut.Text = output;
                }
                break;

            case 1:
                textOut.Text = Replace.Text(textIn.Text);
                break;

            case 2:
                textOut.Text = Reverse.Text(textIn.Text);
                break;

            case 3:
                textOut.Text = Generate.TextAndNumbers(Convert.ToInt32(glitchExtent.Value));
                break;

            case 4:
                textOut.Text = Generate.OnlyText(Convert.ToInt32(glitchExtent.Value));
                break;

            case 5:
                textOut.Text = Generate.OnlyNumbers(Convert.ToInt32(glitchExtent.Value));
                break;

            case 6:
                textOut.Text = EasyBase64.Encode(textIn.Text);
                break;

            case 7:
                string outText = textOut.Text = EasyBase64.Decode(textIn.Text);
                if (outText == "It is not Base64.")
                {
                    textOut.Text = Translate.itsNotBase;
                }
                else
                {
                    textOut.Text = outText;
                }
                break;
            }
            try
            {
                EmptyWorkingSet(System.Diagnostics.Process.GetCurrentProcess().Handle);
            }
            catch
            {
            }
        }