Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <iostream>
- #include <cstddef>
- #include <string>
- #include "padCode/link.h"
- namespace GUI {
- using namespace std;
- using namespace System;
- using namespace System::ComponentModel;
- using namespace System::Collections;
- using namespace System::Windows::Forms;
- using namespace System::Data;
- using namespace System::Drawing;
- /// <summary>
- /// Summary for mainGUI
- /// </summary>
- public ref class mainGUI : public System::Windows::Forms::Form
- {
- public:
- mainGUI(void)
- {
- InitializeComponent();
- //
- //TODO: Add the constructor code here
- //
- }
- protected:
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- ~mainGUI()
- {
- if (components)
- {
- delete components;
- }
- }
- private: System::Windows::Forms::TextBox^ keyBox;
- private: System::Windows::Forms::Label^ lbox1;
- private: System::Windows::Forms::Button^ encode;
- private: System::Windows::Forms::Button^ decrypt;
- private: System::Windows::Forms::Button^ CloseB;
- private: System::Windows::Forms::RadioButton^ aesR;
- private: System::Windows::Forms::RadioButton^ teaR;
- private: System::Windows::Forms::RadioButton^ rc4R;
- private: System::Windows::Forms::RadioButton^ xorR;
- private: System::Windows::Forms::TextBox^ inputBox;
- private: System::Windows::Forms::TextBox^ outputBox;
- private: System::Windows::Forms::Label^ label1;
- private: System::Windows::Forms::Label^ label2;
- protected:
- protected:
- private: System::ComponentModel::IContainer^ components;
- protected:
- private:
- /// <summary>
- /// Required designer variable.
- /// </summary>
- #pragma region Windows Form Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- void InitializeComponent(void)
- {
- this->keyBox = (gcnew System::Windows::Forms::TextBox());
- this->lbox1 = (gcnew System::Windows::Forms::Label());
- this->encode = (gcnew System::Windows::Forms::Button());
- this->decrypt = (gcnew System::Windows::Forms::Button());
- this->CloseB = (gcnew System::Windows::Forms::Button());
- this->aesR = (gcnew System::Windows::Forms::RadioButton());
- this->teaR = (gcnew System::Windows::Forms::RadioButton());
- this->rc4R = (gcnew System::Windows::Forms::RadioButton());
- this->xorR = (gcnew System::Windows::Forms::RadioButton());
- this->inputBox = (gcnew System::Windows::Forms::TextBox());
- this->outputBox = (gcnew System::Windows::Forms::TextBox());
- this->label1 = (gcnew System::Windows::Forms::Label());
- this->label2 = (gcnew System::Windows::Forms::Label());
- this->SuspendLayout();
- //
- // keyBox
- //
- this->keyBox->BackColor = System::Drawing::Color::DarkRed;
- this->keyBox->ForeColor = System::Drawing::Color::DarkRed;
- this->keyBox->Location = System::Drawing::Point(468, 33);
- this->keyBox->MaxLength = 30;
- this->keyBox->Name = L"keyBox";
- this->keyBox->Size = System::Drawing::Size(137, 20);
- this->keyBox->TabIndex = 7;
- //
- // lbox1
- //
- this->lbox1->AutoSize = true;
- this->lbox1->BackColor = System::Drawing::Color::Transparent;
- this->lbox1->ForeColor = System::Drawing::SystemColors::Control;
- this->lbox1->Location = System::Drawing::Point(465, 9);
- this->lbox1->Name = L"lbox1";
- this->lbox1->Size = System::Drawing::Size(46, 13);
- this->lbox1->TabIndex = 8;
- this->lbox1->Text = L"Key Box";
- //
- // encode
- //
- this->encode->BackColor = System::Drawing::Color::DarkRed;
- this->encode->Location = System::Drawing::Point(471, 74);
- this->encode->Name = L"encode";
- this->encode->Size = System::Drawing::Size(90, 45);
- this->encode->TabIndex = 9;
- this->encode->Text = L"Encrypt";
- this->encode->UseVisualStyleBackColor = false;
- this->encode->Click += gcnew System::EventHandler(this, &mainGUI::encode_Click);
- //
- // decrypt
- //
- this->decrypt->BackColor = System::Drawing::Color::DarkRed;
- this->decrypt->Location = System::Drawing::Point(471, 125);
- this->decrypt->Name = L"decrypt";
- this->decrypt->Size = System::Drawing::Size(90, 45);
- this->decrypt->TabIndex = 10;
- this->decrypt->Text = L"Decrypt";
- this->decrypt->UseVisualStyleBackColor = false;
- this->decrypt->Click += gcnew System::EventHandler(this, &mainGUI::decrypt_Click);
- //
- // CloseB
- //
- this->CloseB->BackColor = System::Drawing::Color::DarkRed;
- this->CloseB->Location = System::Drawing::Point(471, 176);
- this->CloseB->Name = L"CloseB";
- this->CloseB->Size = System::Drawing::Size(90, 45);
- this->CloseB->TabIndex = 11;
- this->CloseB->Text = L"Close";
- this->CloseB->UseVisualStyleBackColor = false;
- this->CloseB->Click += gcnew System::EventHandler(this, &mainGUI::CloseB_Click);
- //
- // aesR
- //
- this->aesR->AutoSize = true;
- this->aesR->BackColor = System::Drawing::Color::DarkRed;
- this->aesR->Location = System::Drawing::Point(468, 253);
- this->aesR->Name = L"aesR";
- this->aesR->Size = System::Drawing::Size(46, 17);
- this->aesR->TabIndex = 12;
- this->aesR->TabStop = true;
- this->aesR->Text = L"AES";
- this->aesR->UseVisualStyleBackColor = false;
- this->aesR->CheckedChanged += gcnew System::EventHandler(this, &mainGUI::aesR_CheckedChanged);
- //
- // teaR
- //
- this->teaR->AutoSize = true;
- this->teaR->BackColor = System::Drawing::Color::DarkRed;
- this->teaR->Location = System::Drawing::Point(468, 276);
- this->teaR->Name = L"teaR";
- this->teaR->Size = System::Drawing::Size(46, 17);
- this->teaR->TabIndex = 13;
- this->teaR->TabStop = true;
- this->teaR->Text = L"TEA";
- this->teaR->UseVisualStyleBackColor = false;
- this->teaR->CheckedChanged += gcnew System::EventHandler(this, &mainGUI::teaR_CheckedChanged);
- //
- // rc4R
- //
- this->rc4R->AutoSize = true;
- this->rc4R->BackColor = System::Drawing::Color::DarkRed;
- this->rc4R->Location = System::Drawing::Point(468, 299);
- this->rc4R->Name = L"rc4R";
- this->rc4R->Size = System::Drawing::Size(46, 17);
- this->rc4R->TabIndex = 14;
- this->rc4R->TabStop = true;
- this->rc4R->Text = L"RC4";
- this->rc4R->UseVisualStyleBackColor = false;
- this->rc4R->CheckedChanged += gcnew System::EventHandler(this, &mainGUI::rc4R_CheckedChanged);
- //
- // xorR
- //
- this->xorR->AutoSize = true;
- this->xorR->BackColor = System::Drawing::Color::DarkRed;
- this->xorR->Location = System::Drawing::Point(468, 322);
- this->xorR->Name = L"xorR";
- this->xorR->Size = System::Drawing::Size(48, 17);
- this->xorR->TabIndex = 15;
- this->xorR->TabStop = true;
- this->xorR->Text = L"XOR";
- this->xorR->UseVisualStyleBackColor = false;
- this->xorR->CheckedChanged += gcnew System::EventHandler(this, &mainGUI::xorR_CheckedChanged);
- //
- // inputBox
- //
- this->inputBox->BackColor = System::Drawing::Color::DarkRed;
- this->inputBox->Location = System::Drawing::Point(12, 20);
- this->inputBox->MaxLength = 99999999;
- this->inputBox->Multiline = true;
- this->inputBox->Name = L"inputBox";
- this->inputBox->Size = System::Drawing::Size(405, 150);
- this->inputBox->TabIndex = 16;
- //
- // outputBox
- //
- this->outputBox->BackColor = System::Drawing::Color::DarkRed;
- this->outputBox->Location = System::Drawing::Point(12, 189);
- this->outputBox->MaxLength = 99999999;
- this->outputBox->Multiline = true;
- this->outputBox->Name = L"outputBox";
- this->outputBox->Size = System::Drawing::Size(405, 150);
- this->outputBox->TabIndex = 17;
- //
- // label1
- //
- this->label1->AutoSize = true;
- this->label1->BackColor = System::Drawing::Color::Transparent;
- this->label1->ForeColor = System::Drawing::SystemColors::Control;
- this->label1->Location = System::Drawing::Point(9, 4);
- this->label1->Name = L"label1";
- this->label1->Size = System::Drawing::Size(31, 13);
- this->label1->TabIndex = 18;
- this->label1->Text = L"Input";
- //
- // label2
- //
- this->label2->AutoSize = true;
- this->label2->BackColor = System::Drawing::Color::Transparent;
- this->label2->ForeColor = System::Drawing::SystemColors::Control;
- this->label2->Location = System::Drawing::Point(9, 173);
- this->label2->Name = L"label2";
- this->label2->Size = System::Drawing::Size(39, 13);
- this->label2->TabIndex = 19;
- this->label2->Text = L"Output";
- //
- // mainGUI
- //
- this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
- this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
- this->BackColor = System::Drawing::SystemColors::ActiveCaptionText;
- this->ClientSize = System::Drawing::Size(617, 394);
- this->Controls->Add(this->label2);
- this->Controls->Add(this->label1);
- this->Controls->Add(this->outputBox);
- this->Controls->Add(this->inputBox);
- this->Controls->Add(this->xorR);
- this->Controls->Add(this->rc4R);
- this->Controls->Add(this->teaR);
- this->Controls->Add(this->aesR);
- this->Controls->Add(this->CloseB);
- this->Controls->Add(this->decrypt);
- this->Controls->Add(this->encode);
- this->Controls->Add(this->lbox1);
- this->Controls->Add(this->keyBox);
- this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::Fixed3D;
- this->MaximizeBox = false;
- this->MinimizeBox = false;
- this->Name = L"mainGUI";
- this->Text = L"Atton\'s Encryption Pad v1.0";
- this->ResumeLayout(false);
- this->PerformLayout();
- }
- #pragma endregion
- // This is for the close button.
- private: System::Void CloseB_Click(System::Object^ sender, System::EventArgs^ e)
- {
- mainGUI:Close();
- }
- // CRAP
- /*
- private: System::Void inputBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {}
- private: System::Void outputBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {}
- */
- // Encode & Decode Buttons
- private: System::Void encode_Click(System::Object^ sender, System::EventArgs^ e)
- {
- /*
- String ^ data = inputBox->Text;
- string theData(^data);
- */
- //cout << theData << endl;
- cout << getMode() << endl;
- }
- private: System::Void decrypt_Click(System::Object^ sender, System::EventArgs^ e)
- {
- }
- /*
- Aes 1
- Tea 2
- RC4 3
- XOR 4
- */
- // MODE
- private: System::Void aesR_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {setMode(1);}
- private: System::Void teaR_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {setMode(2);}
- private: System::Void rc4R_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {setMode(3);}
- private: System::Void xorR_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {setMode(4);}
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment