feat: added encyption table GUI thingy
This commit is contained in:
parent
6a21eb789c
commit
e9af34277e
|
@ -28,6 +28,7 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
|
@ -45,6 +46,9 @@
|
|||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
|
@ -193,12 +197,52 @@
|
|||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
this.dataGridView1.AllowUserToResizeColumns = false;
|
||||
this.dataGridView1.AllowUserToResizeRows = false;
|
||||
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader;
|
||||
this.dataGridView1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders;
|
||||
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
|
||||
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.ColumnHeadersVisible = false;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Verdana", 30F);
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(401, 88);
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.ReadOnly = true;
|
||||
this.dataGridView1.RowHeadersVisible = false;
|
||||
this.dataGridView1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(270, 270);
|
||||
this.dataGridView1.TabIndex = 501;
|
||||
this.dataGridView1.TabStop = false;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(482, 61);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(100, 13);
|
||||
this.label8.TabIndex = 502;
|
||||
this.label8.Text = "encryption alphabet";
|
||||
this.label8.Visible = false;
|
||||
//
|
||||
// main_form
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.ClientSize = new System.Drawing.Size(800, 491);
|
||||
this.ClientSize = new System.Drawing.Size(1140, 491);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.label7);
|
||||
|
@ -216,6 +260,7 @@
|
|||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox2);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.DoubleBuffered = true;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "main_form";
|
||||
|
@ -223,6 +268,7 @@
|
|||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "KRY-0x01-ng";
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -247,6 +293,8 @@
|
|||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
private System.Windows.Forms.Label label8;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
34
main_form.cs
34
main_form.cs
|
@ -110,9 +110,43 @@ namespace KRY_0x01_ng
|
|||
string nualph_str = str_to_check + transientalph_str;
|
||||
tb_nualph.Text = nualph_str;
|
||||
nualphabet = nualph_str.ToCharArray();
|
||||
fill_array_table();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void fill_array_table()
|
||||
{
|
||||
int arrtb_gl = arrayTable.GetLength(0);
|
||||
|
||||
int c = 0;
|
||||
for (int i = 0; i < arrtb_gl; i++)
|
||||
{
|
||||
for (int j = 0; j < arrtb_gl; j++)
|
||||
{
|
||||
arrayTable[i, j] = Convert.ToChar(nualphabet[c]);
|
||||
c++;
|
||||
}
|
||||
}
|
||||
|
||||
dataGridView1.Rows.Clear();
|
||||
dataGridView1.Columns.Clear();
|
||||
|
||||
dataGridView1.ColumnCount = arrtb_gl;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
string[] one_row_plz = new string[arrtb_gl];
|
||||
for (int j = 0; j < arrtb_gl; j++)
|
||||
{
|
||||
one_row_plz[j] = Convert.ToString(arrayTable[i,j]);
|
||||
}
|
||||
dataGridView1.Rows.Add(one_row_plz);
|
||||
}
|
||||
label8.Visible = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void check_message(TextBox tb_m)
|
||||
{
|
||||
if (tb_m.Text.Length == 0)
|
||||
|
|
Loading…
Reference in New Issue