Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private: System::Void зашифроватьДокументToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
- {
- Form ^ activeChild = this->ActiveMdiChild;
- if (activeChild != nullptr)
- {
- try
- {
- RichTextBox ^ theBox = (RichTextBox ^)activeChild->ActiveControl;
- if (theBox != nullptr)
- {
- vector<char> V1;
- char V1 = Form ^ theBox.Text.ToCharArray();//Разбираем строку на символы и записываем в массив.
- for (int i = 0; i < arr.Length; i++)
- {
- textBox2.Text += ((int)arr[i] * key).ToString() + '-'; //Приводим символ к типу int,умножаем на 2011(переменная key) и разделяем каждый "шифрованный символ символом '-'.
- }
- }
- }
- catch (...)
- {
- MessageBox::Show(L"Ошибка шифрования");
- }
- }
- else
- {
- MessageBox::Show(L"Не выбрано ни одно окно");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement