Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Encrypten_en_Decrypten
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click_1(object sender, EventArgs e)
- {
- {
- var codes = new[] { 2, 1, 0, 0, 2, 0, 2, 0, 0, 1, 0, 1, 1, 1 };
- textBox2.Text = new String(textBox1.Text.Select((c, index) => (char)(c + codes[index % codes.Length])).ToArray());
- }
- }
- private void button2_Click_1(object sender, EventArgs e)
- {
- var codes = new[] { 2, 1, 0, 0, 2, 0, 2, 0, 0, 1, 0, 1, 1, 1 };
- textBox3.Text = new String(textBox2.Text.Select((c, index) => (char)(c - codes[index % codes.Length])).ToArray());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement