예제 #1
0
 private void reversing()
 {
     TextOGlitchForm1.threadLocalization();
     CheckForIllegalCrossThreadCalls = false;
     ////for (int i = 0; i < work.Length; i++)
     ////{
     //if (work[i] != '\r')
     //{
     ////    reverseWork[reverseWork.Length - i - 1] = work[i];
     ////    label1.Text = "Реверснуто символов: " + (i + 1) + "/" + work.Length;
     //}
     //else
     //{
     //    reverseWork[reverseWork.Length - i - 1] = work[i + 1];
     //    reverseWork[reverseWork.Length - i - 2] = work[i];
     //    i++;
     //}
     ////label1.Update();
     ////}
     output = new string(work);
     output = output.Trim('\r');
     output = Reverse.Text(output);
     ////output = new string(reverseWork);
     richTextBox2.Text    = output;
     label1.Text          = Translate.done;
     richTextBox1.Enabled = true;
     glitchMass.Enabled   = true;
     replaceMass.Enabled  = true;
     reverseMass.Enabled  = true;
     startMass.Enabled    = true;
     paste.Enabled        = true;
 }
예제 #2
0
 private void glitching()
 {
     TextOGlitchForm1.threadLocalization();
     CheckForIllegalCrossThreadCalls = false;
     label1.Text = Translate.fg_waiting;
     label1.Update();
     output = Glitch.Text(workString, Convert.ToInt32(numericUpDown1.Value), false);
     if (!lightMass.Checked)
     {
         richTextBox2.Text = output;
     }
     else if (lightMass.Checked)
     {
         //char[] light = output.ToCharArray();
         //int count = 0;
         //foreach(char b in light)
         //{
         //    if(b == '�' || unicodeSquares.Contains(b))
         //    {
         //        count++;
         //    }
         //}
         //char[] outputLight = new char[light.Length - count];
         //int i = 0;
         //foreach (char b in light)
         //{
         //    if(b != '�' && !unicodeSquares.Contains(b))
         //    {
         //        outputLight[i] = b;
         //        i++;
         //    }
         //    else
         //    {
         //        continue;
         //    }
         //}
         //output = new string(outputLight);
         richTextBox2.Text = Glitch.Text(richTextBox1.Text, Convert.ToInt32(numericUpDown1.Value), true);
     }
     label1.Text                     = Translate.done;
     richTextBox1.Enabled            = true;
     glitchOneStringCheckBox.Enabled = true;
     glitchMass.Enabled              = true;
     replaceMass.Enabled             = true;
     reverseMass.Enabled             = true;
     numericUpDown1.Enabled          = true;
     lightMass.Enabled               = true;
     startMass.Enabled               = true;
     paste.Enabled                   = true;
 }
예제 #3
0
 private void replacing()
 {
     TextOGlitchForm1.threadLocalization();
     CheckForIllegalCrossThreadCalls = false;
     label1.Text = Translate.fg_waiting;
     label1.Update();
     output               = Replace.Text(workString);
     label1.Text          = Translate.done;
     richTextBox2.Text    = output;
     richTextBox1.Enabled = true;
     glitchMass.Enabled   = true;
     replaceMass.Enabled  = true;
     reverseMass.Enabled  = true;
     startMass.Enabled    = true;
     paste.Enabled        = true;
 }
예제 #4
0
 private void glitchingOneString()
 {
     TextOGlitchForm1.threadLocalization();
     CheckForIllegalCrossThreadCalls = false;
     richTextBox2.Text = "";
     workString        = richTextBox1.Text;
     if (lightMass.Checked)
     {
         for (int i = 0; i < glitchOneStringCount.Value; i++)
         {
             richTextBox2.Text = richTextBox2.Text + TextGlitch.Glitch.Text(workString, (int)numericUpDown1.Value, true) + "\n";
             //tempOutput = tempOutput.Replace("\n", null);
             //tempOutput = tempOutput.Replace("\r", null);
             //output = output + tempOutput + "\n";
             richTextBox2.Update();
             label1.Text = (i + 1) + "/" + glitchOneStringCount.Value + Translate.doneWithDots;
             label1.Update();
         }
     }
     else
     {
         for (int i = 0; i < glitchOneStringCount.Value; i++)
         {
             richTextBox2.Text = richTextBox2.Text + TextGlitch.Glitch.Text(workString, (int)numericUpDown1.Value, false) + "\n";
             //tempOutput = TextGlitch.Glitch.Text(workString, (int)numericUpDown1.Value, false);
             //tempOutput = tempOutput.Replace("\n", null);
             //tempOutput = tempOutput.Replace("\r", null);
             //output = output + tempOutput + "\n";
             richTextBox2.Update();
             label1.Text = (i + 1) + "/" + glitchOneStringCount.Value + Translate.doneWithDots;
             label1.Update();
         }
     }
     label1.Text                     = Translate.done;
     richTextBox1.Enabled            = true;
     glitchMass.Enabled              = true;
     reverseMass.Enabled             = true;
     replaceMass.Enabled             = true;
     lightMass.Enabled               = true;
     glitchOneStringCheckBox.Enabled = true;
     glitchOneStringCount.Enabled    = true;
     numericUpDown1.Enabled          = true;
     startMass.Enabled               = true;
     paste.Enabled                   = true;
     return;
 }
예제 #5
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
            {
            }
        }
예제 #6
0
        private void working()
        {
            TextOGlitchForm1.threadLocalization();
            CheckForIllegalCrossThreadCalls = false;
            switch (TextOGlitchForm1.modeTray)
            {
            case 0:
                if (textBox1.Text != "")
                {
                    if (textOutput != textBox1.Text)
                    {
                        textOriginal  = textBox1.Text;
                        textOutput    = Glitch.Text(textOriginal, Convert.ToInt32(numericUpDown1.Value), false);
                        textBox1.Text = textOutput;
                    }
                    else
                    {
                        textOutput    = Glitch.Text(textOriginal, Convert.ToInt32(numericUpDown1.Value), false);
                        textBox1.Text = textOutput;
                    }
                }
                break;

            case 1:
                if (textOutput != textBox1.Text)
                {
                    textOriginal  = textBox1.Text;
                    textOutput    = Glitch.Text(textOriginal, Convert.ToInt32(numericUpDown1.Value), true);
                    textBox1.Text = textOutput;
                }
                else
                {
                    textOutput    = Glitch.Text(textOriginal, Convert.ToInt32(numericUpDown1.Value), true);
                    textBox1.Text = textOutput;
                }
                break;

            case 2:
                if (textBox1.Text != "")
                {
                    if (textOutput != textBox1.Text)
                    {
                        textOriginal  = textBox1.Text;
                        textOutput    = Replace.Text(textOriginal);
                        textBox1.Text = textOutput;
                    }
                    else
                    {
                        textOutput    = Replace.Text(textOriginal);
                        textBox1.Text = textOutput;
                    }
                }
                break;

            case 3:
                if (textBox1.Text != "")
                {
                    textBox1.Text = Reverse.Text(textBox1.Text);
                }
                break;

            case 4:
                if (radioButton1.Checked)
                {
                    textBox1.Text = Generate.TextAndNumbers(Convert.ToInt32(numericUpDown1.Value));
                }
                else if (radioButton2.Checked)
                {
                    textBox1.Text = Generate.OnlyText(Convert.ToInt32(numericUpDown1.Value));
                }
                else if (radioButton3.Checked)
                {
                    textBox1.Text = Generate.OnlyNumbers(Convert.ToInt32(numericUpDown1.Value));
                }
                break;
            }
            try
            {
                EmptyWorkingSet(System.Diagnostics.Process.GetCurrentProcess().Handle);
            }
            catch
            {
            }
        }