From 700c82a37080b76975e1c583cdfd2009932f9595 Mon Sep 17 00:00:00 2001 From: corsicanu Date: Fri, 19 Jan 2024 15:55:43 +0200 Subject: [PATCH] Form: visual tweaks --- Form1.cs | 744 ++++++++++++++++++++++++++++------------------------- Form1.resx | 50 ++-- 2 files changed, 412 insertions(+), 382 deletions(-) diff --git a/Form1.cs b/Form1.cs index 612444e..bb60b05 100644 --- a/Form1.cs +++ b/Form1.cs @@ -54,6 +54,7 @@ public class Form1 : Form private ToolTip tooltip_binary; public Label lbl_speed; private Label label1; + private Label label2; private System.Windows.Forms.SaveFileDialog saveFileDialog1; public Label lbl_transferred; private Label imei_lbl; @@ -454,468 +455,493 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); - this.model_textbox = new System.Windows.Forms.ComboBox(); - this.model_lbl = new System.Windows.Forms.Label(); - this.download_button = new System.Windows.Forms.Button(); - this.log_textbox = new System.Windows.Forms.RichTextBox(); - this.region_lbl = new System.Windows.Forms.Label(); - this.region_textbox = new System.Windows.Forms.ComboBox(); - this.pda_lbl = new System.Windows.Forms.Label(); - this.pda_textbox = new System.Windows.Forms.TextBox(); - this.csc_lbl = new System.Windows.Forms.Label(); - this.csc_textbox = new System.Windows.Forms.TextBox(); - this.update_button = new System.Windows.Forms.Button(); - this.phone_lbl = new System.Windows.Forms.Label(); - this.phone_textbox = new System.Windows.Forms.TextBox(); - this.file_lbl = new System.Windows.Forms.Label(); - this.file_textbox = new System.Windows.Forms.TextBox(); - this.version_lbl = new System.Windows.Forms.Label(); - this.version_textbox = new System.Windows.Forms.TextBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.imei_lbl = new System.Windows.Forms.Label(); - this.imei_textbox = new System.Windows.Forms.TextBox(); - this.searchButton = new System.Windows.Forms.Button(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.checkbox_manual = new System.Windows.Forms.CheckBox(); - this.checkbox_auto = new System.Windows.Forms.CheckBox(); - this.binary_checkbox = new System.Windows.Forms.CheckBox(); - this.binary_lbl = new System.Windows.Forms.Label(); - this.progressBar = new System.Windows.Forms.ProgressBar(); - this.decrypt_button = new System.Windows.Forms.Button(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.lbl_transferred = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.lbl_speed = new System.Windows.Forms.Label(); - this.checkbox_autodecrypt = new System.Windows.Forms.CheckBox(); - this.checkbox_crc = new System.Windows.Forms.CheckBox(); - this.size_textbox = new System.Windows.Forms.TextBox(); - this.size_lbl = new System.Windows.Forms.Label(); - this.tooltip_binary = new System.Windows.Forms.ToolTip(this.components); - this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); - this.tooltip_binary_box = new System.Windows.Forms.ToolTip(this.components); - this.groupBox1.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.groupBox2.SuspendLayout(); + components = new Container(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(Form1)); + model_textbox = new ComboBox(); + model_lbl = new Label(); + download_button = new Button(); + log_textbox = new RichTextBox(); + region_lbl = new Label(); + region_textbox = new ComboBox(); + pda_lbl = new Label(); + pda_textbox = new TextBox(); + csc_lbl = new Label(); + csc_textbox = new TextBox(); + update_button = new Button(); + phone_lbl = new Label(); + phone_textbox = new TextBox(); + file_lbl = new Label(); + file_textbox = new TextBox(); + version_lbl = new Label(); + version_textbox = new TextBox(); + groupBox1 = new GroupBox(); + imei_lbl = new Label(); + imei_textbox = new TextBox(); + searchButton = new Button(); + groupBox3 = new GroupBox(); + checkbox_manual = new CheckBox(); + checkbox_auto = new CheckBox(); + binary_checkbox = new CheckBox(); + binary_lbl = new Label(); + progressBar = new ProgressBar(); + decrypt_button = new Button(); + groupBox2 = new GroupBox(); + lbl_transferred = new Label(); + label1 = new Label(); + label2 = new Label(); + lbl_speed = new Label(); + checkbox_autodecrypt = new CheckBox(); + checkbox_crc = new CheckBox(); + size_textbox = new TextBox(); + size_lbl = new Label(); + tooltip_binary = new ToolTip(components); + saveFileDialog1 = new SaveFileDialog(); + tooltip_binary_box = new ToolTip(components); + groupBox1.SuspendLayout(); + groupBox3.SuspendLayout(); + groupBox2.SuspendLayout(); this.SuspendLayout(); // // model_textbox // - this.model_textbox.Items.AddRange(new object[] { - "SM-F936B", - "SM-G970F", - "SM-G973F", - "SM-G975F", - "SM-N970F", - "SM-N975F", - "SM-G998B", - "SM-G996B", - "SM-G991B", - "SM-T865", - "SM-T875", - "SM-T976B"}); - this.model_textbox.Location = new System.Drawing.Point(85, 22); - this.model_textbox.Name = "model_textbox"; - this.model_textbox.Size = new System.Drawing.Size(149, 21); - this.model_textbox.TabIndex = 0; + model_textbox.Items.AddRange(new object[] { "SM-F936B", "SM-G970F", "SM-G973F", "SM-G975F", "SM-N970F", "SM-N975F", "SM-G998B", "SM-G996B", "SM-G991B", "SM-T865", "SM-T875", "SM-T976B" }); + model_textbox.Location = new Point(99, 25); + model_textbox.Margin = new Padding(4, 3, 4, 3); + model_textbox.Name = "model_textbox"; + model_textbox.Size = new Size(173, 23); + model_textbox.TabIndex = 0; // // model_lbl // - this.model_lbl.AutoSize = true; - this.model_lbl.Location = new System.Drawing.Point(8, 25); - this.model_lbl.Name = "model_lbl"; - this.model_lbl.Size = new System.Drawing.Size(36, 13); - this.model_lbl.TabIndex = 1; - this.model_lbl.Text = "Model"; + model_lbl.AutoSize = true; + model_lbl.Location = new Point(9, 29); + model_lbl.Margin = new Padding(4, 0, 4, 0); + model_lbl.Name = "model_lbl"; + model_lbl.Size = new Size(41, 15); + model_lbl.TabIndex = 1; + model_lbl.Text = "Model"; // // download_button // - this.download_button.Location = new System.Drawing.Point(74, 117); - this.download_button.Margin = new System.Windows.Forms.Padding(0); - this.download_button.Name = "download_button"; - this.download_button.Size = new System.Drawing.Size(94, 23); - this.download_button.TabIndex = 13; - this.download_button.Text = "Download"; - this.download_button.UseVisualStyleBackColor = true; - this.download_button.Click += new System.EventHandler(this.download_button_Click); + download_button.Location = new Point(86, 135); + download_button.Margin = new Padding(0); + download_button.Name = "download_button"; + download_button.Size = new Size(110, 27); + download_button.TabIndex = 13; + download_button.Text = "Download"; + download_button.UseVisualStyleBackColor = true; + download_button.Click += this.download_button_Click; // // log_textbox // - this.log_textbox.Location = new System.Drawing.Point(12, 301); - this.log_textbox.Name = "log_textbox"; - this.log_textbox.ReadOnly = true; - this.log_textbox.Size = new System.Drawing.Size(639, 138); - this.log_textbox.TabIndex = 3; - this.log_textbox.TabStop = false; - this.log_textbox.Text = ""; - this.log_textbox.LinkClicked += LogTextBox_LinkClicked; + log_textbox.Location = new Point(14, 347); + log_textbox.Margin = new Padding(4, 3, 4, 3); + log_textbox.Name = "log_textbox"; + log_textbox.ReadOnly = true; + log_textbox.Size = new Size(745, 159); + log_textbox.TabIndex = 3; + log_textbox.TabStop = false; + log_textbox.Text = ""; + log_textbox.LinkClicked += this.LogTextBox_LinkClicked; // // region_lbl // - this.region_lbl.AutoSize = true; - this.region_lbl.Location = new System.Drawing.Point(8, 51); - this.region_lbl.Name = "region_lbl"; - this.region_lbl.Size = new System.Drawing.Size(41, 13); - this.region_lbl.TabIndex = 5; - this.region_lbl.Text = "Region"; + region_lbl.AutoSize = true; + region_lbl.Location = new Point(9, 59); + region_lbl.Margin = new Padding(4, 0, 4, 0); + region_lbl.Name = "region_lbl"; + region_lbl.Size = new Size(44, 15); + region_lbl.TabIndex = 5; + region_lbl.Text = "Region"; // // region_textbox // - this.region_textbox.Items.AddRange(new object[] { - "DBT", - "AUT", - "BTU", - "NEE", - "SEK", - "PHE", - "ROM", - "XSG", - "KSA", - "XXV", - "EUX"}); - this.region_textbox.Location = new System.Drawing.Point(85, 48); - this.region_textbox.Name = "region_textbox"; - this.region_textbox.Size = new System.Drawing.Size(149, 21); - this.region_textbox.TabIndex = 1; + region_textbox.Items.AddRange(new object[] { "DBT", "AUT", "BTU", "NEE", "SEK", "PHE", "ROM", "XSG", "KSA", "XXV", "EUX" }); + region_textbox.Location = new Point(99, 55); + region_textbox.Margin = new Padding(4, 3, 4, 3); + region_textbox.Name = "region_textbox"; + region_textbox.Size = new Size(173, 23); + region_textbox.TabIndex = 1; // // pda_lbl // - this.pda_lbl.AutoSize = true; - this.pda_lbl.Location = new System.Drawing.Point(10, 15); - this.pda_lbl.Name = "pda_lbl"; - this.pda_lbl.Size = new System.Drawing.Size(29, 13); - this.pda_lbl.TabIndex = 7; - this.pda_lbl.Text = "PDA"; + pda_lbl.AutoSize = true; + pda_lbl.Location = new Point(12, 17); + pda_lbl.Margin = new Padding(4, 0, 4, 0); + pda_lbl.Name = "pda_lbl"; + pda_lbl.Size = new Size(30, 15); + pda_lbl.TabIndex = 7; + pda_lbl.Text = "PDA"; // // pda_textbox // - this.pda_textbox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; - this.pda_textbox.Location = new System.Drawing.Point(79, 12); - this.pda_textbox.Name = "pda_textbox"; - this.pda_textbox.Size = new System.Drawing.Size(149, 20); - this.pda_textbox.TabIndex = 4; + pda_textbox.CharacterCasing = CharacterCasing.Upper; + pda_textbox.Location = new Point(92, 14); + pda_textbox.Margin = new Padding(4, 3, 4, 3); + pda_textbox.Name = "pda_textbox"; + pda_textbox.Size = new Size(173, 23); + pda_textbox.TabIndex = 4; // // csc_lbl // - this.csc_lbl.AutoSize = true; - this.csc_lbl.Location = new System.Drawing.Point(10, 41); - this.csc_lbl.Name = "csc_lbl"; - this.csc_lbl.Size = new System.Drawing.Size(28, 13); - this.csc_lbl.TabIndex = 9; - this.csc_lbl.Text = "CSC"; + csc_lbl.AutoSize = true; + csc_lbl.Location = new Point(12, 47); + csc_lbl.Margin = new Padding(4, 0, 4, 0); + csc_lbl.Name = "csc_lbl"; + csc_lbl.Size = new Size(29, 15); + csc_lbl.TabIndex = 9; + csc_lbl.Text = "CSC"; // // csc_textbox // - this.csc_textbox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; - this.csc_textbox.Location = new System.Drawing.Point(79, 38); - this.csc_textbox.Name = "csc_textbox"; - this.csc_textbox.Size = new System.Drawing.Size(149, 20); - this.csc_textbox.TabIndex = 5; + csc_textbox.CharacterCasing = CharacterCasing.Upper; + csc_textbox.Location = new Point(92, 44); + csc_textbox.Margin = new Padding(4, 3, 4, 3); + csc_textbox.Name = "csc_textbox"; + csc_textbox.Size = new Size(173, 23); + csc_textbox.TabIndex = 5; // // update_button // - this.update_button.Location = new System.Drawing.Point(140, 240); - this.update_button.Name = "update_button"; - this.update_button.Size = new System.Drawing.Size(93, 23); - this.update_button.TabIndex = 10; - this.update_button.Text = "Check Update"; - this.update_button.UseVisualStyleBackColor = true; - this.update_button.Click += new System.EventHandler(this.update_button_Click); + update_button.Location = new Point(163, 277); + update_button.Margin = new Padding(4, 3, 4, 3); + update_button.Name = "update_button"; + update_button.Size = new Size(108, 27); + update_button.TabIndex = 10; + update_button.Text = "Check Update"; + update_button.UseVisualStyleBackColor = true; + update_button.Click += this.update_button_Click; // // phone_lbl // - this.phone_lbl.AutoSize = true; - this.phone_lbl.Location = new System.Drawing.Point(10, 67); - this.phone_lbl.Name = "phone_lbl"; - this.phone_lbl.Size = new System.Drawing.Size(38, 13); - this.phone_lbl.TabIndex = 12; - this.phone_lbl.Text = "Phone"; + phone_lbl.AutoSize = true; + phone_lbl.Location = new Point(12, 77); + phone_lbl.Margin = new Padding(4, 0, 4, 0); + phone_lbl.Name = "phone_lbl"; + phone_lbl.Size = new Size(41, 15); + phone_lbl.TabIndex = 12; + phone_lbl.Text = "Phone"; // // phone_textbox // - this.phone_textbox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; - this.phone_textbox.Location = new System.Drawing.Point(79, 64); - this.phone_textbox.Name = "phone_textbox"; - this.phone_textbox.Size = new System.Drawing.Size(149, 20); - this.phone_textbox.TabIndex = 6; + phone_textbox.CharacterCasing = CharacterCasing.Upper; + phone_textbox.Location = new Point(92, 74); + phone_textbox.Margin = new Padding(4, 3, 4, 3); + phone_textbox.Name = "phone_textbox"; + phone_textbox.Size = new Size(173, 23); + phone_textbox.TabIndex = 6; // // file_lbl // - this.file_lbl.AutoSize = true; - this.file_lbl.Location = new System.Drawing.Point(6, 25); - this.file_lbl.Name = "file_lbl"; - this.file_lbl.Size = new System.Drawing.Size(23, 13); - this.file_lbl.TabIndex = 13; - this.file_lbl.Text = "File"; + file_lbl.AutoSize = true; + file_lbl.Location = new Point(7, 29); + file_lbl.Margin = new Padding(4, 0, 4, 0); + file_lbl.Name = "file_lbl"; + file_lbl.Size = new Size(25, 15); + file_lbl.TabIndex = 13; + file_lbl.Text = "File"; // // file_textbox // - this.file_textbox.Location = new System.Drawing.Point(75, 18); - this.file_textbox.Name = "file_textbox"; - this.file_textbox.ReadOnly = true; - this.file_textbox.Size = new System.Drawing.Size(290, 20); - this.file_textbox.TabIndex = 20; - this.file_textbox.TabStop = false; + file_textbox.Location = new Point(88, 21); + file_textbox.Margin = new Padding(4, 3, 4, 3); + file_textbox.Name = "file_textbox"; + file_textbox.ReadOnly = true; + file_textbox.Size = new Size(338, 23); + file_textbox.TabIndex = 20; + file_textbox.TabStop = false; // // version_lbl // - this.version_lbl.AutoSize = true; - this.version_lbl.Location = new System.Drawing.Point(6, 51); - this.version_lbl.Name = "version_lbl"; - this.version_lbl.Size = new System.Drawing.Size(42, 13); - this.version_lbl.TabIndex = 15; - this.version_lbl.Text = "Version"; + version_lbl.AutoSize = true; + version_lbl.Location = new Point(7, 59); + version_lbl.Margin = new Padding(4, 0, 4, 0); + version_lbl.Name = "version_lbl"; + version_lbl.Size = new Size(45, 15); + version_lbl.TabIndex = 15; + version_lbl.Text = "Version"; // // version_textbox // - this.version_textbox.Location = new System.Drawing.Point(75, 44); - this.version_textbox.Name = "version_textbox"; - this.version_textbox.ReadOnly = true; - this.version_textbox.Size = new System.Drawing.Size(290, 20); - this.version_textbox.TabIndex = 30; - this.version_textbox.TabStop = false; + version_textbox.Location = new Point(88, 51); + version_textbox.Margin = new Padding(4, 3, 4, 3); + version_textbox.Name = "version_textbox"; + version_textbox.ReadOnly = true; + version_textbox.Size = new Size(338, 23); + version_textbox.TabIndex = 30; + version_textbox.TabStop = false; // // groupBox1 // - this.groupBox1.Controls.Add(this.imei_lbl); - this.groupBox1.Controls.Add(this.imei_textbox); - this.groupBox1.Controls.Add(this.searchButton); - this.groupBox1.Controls.Add(this.groupBox3); - this.groupBox1.Controls.Add(this.checkbox_manual); - this.groupBox1.Controls.Add(this.checkbox_auto); - this.groupBox1.Controls.Add(this.binary_checkbox); - this.groupBox1.Controls.Add(this.binary_lbl); - this.groupBox1.Controls.Add(this.model_textbox); - this.groupBox1.Controls.Add(this.model_lbl); - this.groupBox1.Controls.Add(this.update_button); - this.groupBox1.Controls.Add(this.region_textbox); - this.groupBox1.Controls.Add(this.region_lbl); - this.groupBox1.Location = new System.Drawing.Point(12, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(262, 273); - this.groupBox1.TabIndex = 17; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Firmware Info"; + groupBox1.Controls.Add(imei_lbl); + groupBox1.Controls.Add(imei_textbox); + groupBox1.Controls.Add(searchButton); + groupBox1.Controls.Add(groupBox3); + groupBox1.Controls.Add(checkbox_manual); + groupBox1.Controls.Add(checkbox_auto); + groupBox1.Controls.Add(binary_checkbox); + groupBox1.Controls.Add(binary_lbl); + groupBox1.Controls.Add(model_textbox); + groupBox1.Controls.Add(model_lbl); + groupBox1.Controls.Add(update_button); + groupBox1.Controls.Add(region_textbox); + groupBox1.Controls.Add(region_lbl); + groupBox1.Location = new Point(14, 14); + groupBox1.Margin = new Padding(4, 3, 4, 3); + groupBox1.Name = "groupBox1"; + groupBox1.Padding = new Padding(4, 3, 4, 3); + groupBox1.Size = new Size(306, 315); + groupBox1.TabIndex = 17; + groupBox1.TabStop = false; + groupBox1.Text = "Firmware Info"; // // imei_lbl // - this.imei_lbl.AutoSize = true; - this.imei_lbl.Location = new System.Drawing.Point(8, 79); - this.imei_lbl.Name = "imei_lbl"; - this.imei_lbl.Size = new System.Drawing.Size(57, 13); - this.imei_lbl.TabIndex = 19; - this.imei_lbl.Text = "Imei/Serial"; - this.imei_lbl.Click += new System.EventHandler(this.imei_lbl_Click); + imei_lbl.AutoSize = true; + imei_lbl.Location = new Point(9, 91); + imei_lbl.Margin = new Padding(4, 0, 4, 0); + imei_lbl.Name = "imei_lbl"; + imei_lbl.Size = new Size(63, 15); + imei_lbl.TabIndex = 19; + imei_lbl.Text = "Imei/Serial"; + imei_lbl.Click += this.imei_lbl_Click; // // imei_textbox // - this.imei_textbox.Location = new System.Drawing.Point(85, 72); - this.imei_textbox.Name = "imei_textbox"; - this.imei_textbox.Size = new System.Drawing.Size(149, 20); - this.imei_textbox.TabIndex = 18; + imei_textbox.Location = new Point(99, 83); + imei_textbox.Margin = new Padding(4, 3, 4, 3); + imei_textbox.Name = "imei_textbox"; + imei_textbox.Size = new Size(173, 23); + imei_textbox.TabIndex = 18; // // searchButton // - this.searchButton.Enabled = true; - this.searchButton.Location = new System.Drawing.Point(85, 97); - this.searchButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.searchButton.Name = "searchButton"; - this.searchButton.Size = new System.Drawing.Size(148, 23); - this.searchButton.TabIndex = 20; - this.searchButton.Text = "Search for IMEI online"; - this.searchButton.Click += new System.EventHandler(this.searchButton_Click); + searchButton.Location = new Point(99, 112); + searchButton.Margin = new Padding(2); + searchButton.Name = "searchButton"; + searchButton.Size = new Size(173, 27); + searchButton.TabIndex = 20; + searchButton.Text = "Search for IMEI online"; + searchButton.Click += this.searchButton_Click; // // groupBox3 // - this.groupBox3.Controls.Add(this.phone_textbox); - this.groupBox3.Controls.Add(this.csc_lbl); - this.groupBox3.Controls.Add(this.csc_textbox); - this.groupBox3.Controls.Add(this.pda_lbl); - this.groupBox3.Controls.Add(this.pda_textbox); - this.groupBox3.Controls.Add(this.phone_lbl); - this.groupBox3.Location = new System.Drawing.Point(6, 146); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(250, 89); - this.groupBox3.TabIndex = 17; - this.groupBox3.TabStop = false; + groupBox3.Controls.Add(phone_textbox); + groupBox3.Controls.Add(csc_lbl); + groupBox3.Controls.Add(csc_textbox); + groupBox3.Controls.Add(pda_lbl); + groupBox3.Controls.Add(pda_textbox); + groupBox3.Controls.Add(phone_lbl); + groupBox3.Location = new Point(7, 168); + groupBox3.Margin = new Padding(4, 3, 4, 3); + groupBox3.Name = "groupBox3"; + groupBox3.Padding = new Padding(4, 3, 4, 3); + groupBox3.Size = new Size(292, 103); + groupBox3.TabIndex = 17; + groupBox3.TabStop = false; // // checkbox_manual // - this.checkbox_manual.AutoSize = true; - this.checkbox_manual.Location = new System.Drawing.Point(140, 125); - this.checkbox_manual.Name = "checkbox_manual"; - this.checkbox_manual.Size = new System.Drawing.Size(61, 17); - this.checkbox_manual.TabIndex = 3; - this.checkbox_manual.Text = "Manual"; - this.checkbox_manual.UseVisualStyleBackColor = true; - this.checkbox_manual.CheckedChanged += new System.EventHandler(this.checkbox_manual_CheckedChanged); + checkbox_manual.AutoSize = true; + checkbox_manual.Location = new Point(163, 144); + checkbox_manual.Margin = new Padding(4, 3, 4, 3); + checkbox_manual.Name = "checkbox_manual"; + checkbox_manual.Size = new Size(66, 19); + checkbox_manual.TabIndex = 3; + checkbox_manual.Text = "Manual"; + checkbox_manual.UseVisualStyleBackColor = true; + checkbox_manual.CheckedChanged += this.checkbox_manual_CheckedChanged; // // checkbox_auto // - this.checkbox_auto.AutoSize = true; - this.checkbox_auto.Location = new System.Drawing.Point(11, 123); - this.checkbox_auto.Name = "checkbox_auto"; - this.checkbox_auto.Size = new System.Drawing.Size(48, 17); - this.checkbox_auto.TabIndex = 2; - this.checkbox_auto.Text = "Auto"; - this.checkbox_auto.UseVisualStyleBackColor = true; - this.checkbox_auto.CheckedChanged += new System.EventHandler(this.checkbox_auto_CheckedChanged); + checkbox_auto.AutoSize = true; + checkbox_auto.Location = new Point(13, 142); + checkbox_auto.Margin = new Padding(4, 3, 4, 3); + checkbox_auto.Name = "checkbox_auto"; + checkbox_auto.Size = new Size(52, 19); + checkbox_auto.TabIndex = 2; + checkbox_auto.Text = "Auto"; + checkbox_auto.UseVisualStyleBackColor = true; + checkbox_auto.CheckedChanged += this.checkbox_auto_CheckedChanged; // // binary_checkbox // - this.binary_checkbox.AutoSize = true; - this.binary_checkbox.Location = new System.Drawing.Point(85, 249); - this.binary_checkbox.Name = "binary_checkbox"; - this.binary_checkbox.Size = new System.Drawing.Size(15, 14); - this.binary_checkbox.TabIndex = 7; - this.binary_checkbox.UseVisualStyleBackColor = true; + binary_checkbox.AutoSize = true; + binary_checkbox.Location = new Point(99, 287); + binary_checkbox.Margin = new Padding(4, 3, 4, 3); + binary_checkbox.Name = "binary_checkbox"; + binary_checkbox.Size = new Size(15, 14); + binary_checkbox.TabIndex = 7; + binary_checkbox.UseVisualStyleBackColor = true; // // binary_lbl // - this.binary_lbl.AutoSize = true; - this.binary_lbl.Location = new System.Drawing.Point(8, 249); - this.binary_lbl.Name = "binary_lbl"; - this.binary_lbl.Size = new System.Drawing.Size(71, 13); - this.binary_lbl.TabIndex = 13; - this.binary_lbl.Text = "Binary Nature"; + binary_lbl.AutoSize = true; + binary_lbl.Location = new Point(9, 287); + binary_lbl.Margin = new Padding(4, 0, 4, 0); + binary_lbl.Name = "binary_lbl"; + binary_lbl.Size = new Size(79, 15); + binary_lbl.TabIndex = 13; + binary_lbl.Text = "Binary Nature"; // // progressBar // - this.progressBar.Location = new System.Drawing.Point(75, 146); - this.progressBar.Name = "progressBar"; - this.progressBar.Size = new System.Drawing.Size(290, 23); - this.progressBar.TabIndex = 18; + progressBar.Location = new Point(88, 168); + progressBar.Margin = new Padding(4, 3, 4, 3); + progressBar.Name = "progressBar"; + progressBar.Size = new Size(338, 27); + progressBar.TabIndex = 18; // // decrypt_button // - this.decrypt_button.Enabled = false; - this.decrypt_button.Location = new System.Drawing.Point(188, 117); - this.decrypt_button.Name = "decrypt_button"; - this.decrypt_button.Size = new System.Drawing.Size(127, 23); - this.decrypt_button.TabIndex = 14; - this.decrypt_button.Text = "Decrypt"; - this.decrypt_button.UseVisualStyleBackColor = true; - this.decrypt_button.Click += new System.EventHandler(this.decrypt_button_Click); + decrypt_button.Enabled = false; + decrypt_button.Location = new Point(219, 135); + decrypt_button.Margin = new Padding(4, 3, 4, 3); + decrypt_button.Name = "decrypt_button"; + decrypt_button.Size = new Size(148, 27); + decrypt_button.TabIndex = 14; + decrypt_button.Text = "Decrypt"; + decrypt_button.UseVisualStyleBackColor = true; + decrypt_button.Click += this.decrypt_button_Click; // // groupBox2 // - this.groupBox2.Controls.Add(this.lbl_transferred); - this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Controls.Add(this.lbl_speed); - this.groupBox2.Controls.Add(this.checkbox_autodecrypt); - this.groupBox2.Controls.Add(this.checkbox_crc); - this.groupBox2.Controls.Add(this.size_textbox); - this.groupBox2.Controls.Add(this.size_lbl); - this.groupBox2.Controls.Add(this.progressBar); - this.groupBox2.Controls.Add(this.decrypt_button); - this.groupBox2.Controls.Add(this.download_button); - this.groupBox2.Controls.Add(this.file_lbl); - this.groupBox2.Controls.Add(this.file_textbox); - this.groupBox2.Controls.Add(this.version_textbox); - this.groupBox2.Controls.Add(this.version_lbl); - this.groupBox2.Location = new System.Drawing.Point(280, 12); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(371, 273); - this.groupBox2.TabIndex = 20; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Download"; + groupBox2.Controls.Add(lbl_transferred); + groupBox2.Controls.Add(label1); + groupBox2.Controls.Add(label2); + groupBox2.Controls.Add(lbl_speed); + groupBox2.Controls.Add(checkbox_autodecrypt); + groupBox2.Controls.Add(checkbox_crc); + groupBox2.Controls.Add(size_textbox); + groupBox2.Controls.Add(size_lbl); + groupBox2.Controls.Add(progressBar); + groupBox2.Controls.Add(decrypt_button); + groupBox2.Controls.Add(download_button); + groupBox2.Controls.Add(file_lbl); + groupBox2.Controls.Add(file_textbox); + groupBox2.Controls.Add(version_textbox); + groupBox2.Controls.Add(version_lbl); + groupBox2.Location = new Point(327, 14); + groupBox2.Margin = new Padding(4, 3, 4, 3); + groupBox2.Name = "groupBox2"; + groupBox2.Padding = new Padding(4, 3, 4, 3); + groupBox2.Size = new Size(433, 315); + groupBox2.TabIndex = 20; + groupBox2.TabStop = false; + groupBox2.Text = "Download"; // // lbl_transferred // - this.lbl_transferred.AutoSize = true; - this.lbl_transferred.Location = new System.Drawing.Point(185, 176); - this.lbl_transferred.Name = "lbl_transferred"; - this.lbl_transferred.Size = new System.Drawing.Size(32, 13); - this.lbl_transferred.TabIndex = 41; - this.lbl_transferred.Text = "0 MB"; + lbl_transferred.AutoSize = true; + lbl_transferred.Location = new Point(145, 245); + lbl_transferred.Margin = new Padding(4, 0, 4, 0); + lbl_transferred.Name = "lbl_transferred"; + lbl_transferred.Size = new Size(34, 15); + lbl_transferred.TabIndex = 41; + lbl_transferred.Text = "0 MB"; // // label1 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(6, 176); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(38, 13); - this.label1.TabIndex = 25; - this.label1.Text = "Speed"; + label1.AutoSize = true; + label1.Location = new Point(9, 215); + label1.Margin = new Padding(4, 0, 4, 0); + label1.Name = "label1"; + label1.Size = new Size(98, 15); + label1.TabIndex = 25; + label1.Text = "Download speed:"; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new Point(9, 245); + label2.Margin = new Padding(4, 0, 4, 0); + label2.Name = "label2"; + label2.Size = new Size(99, 15); + label2.TabIndex = 25; + label2.Text = "Downloaded size:"; // // lbl_speed // - this.lbl_speed.AutoSize = true; - this.lbl_speed.Location = new System.Drawing.Point(72, 176); - this.lbl_speed.Name = "lbl_speed"; - this.lbl_speed.Size = new System.Drawing.Size(40, 13); - this.lbl_speed.TabIndex = 24; - this.lbl_speed.Text = "0 KB/s"; + lbl_speed.AutoSize = true; + lbl_speed.Location = new Point(145, 215); + lbl_speed.Margin = new Padding(4, 0, 4, 0); + lbl_speed.Name = "lbl_speed"; + lbl_speed.Size = new Size(40, 15); + lbl_speed.TabIndex = 24; + lbl_speed.Text = "0 KB/s"; // // checkbox_autodecrypt // - this.checkbox_autodecrypt.AutoSize = true; - this.checkbox_autodecrypt.Checked = true; - this.checkbox_autodecrypt.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkbox_autodecrypt.Location = new System.Drawing.Point(189, 96); - this.checkbox_autodecrypt.Name = "checkbox_autodecrypt"; - this.checkbox_autodecrypt.Size = new System.Drawing.Size(127, 17); - this.checkbox_autodecrypt.TabIndex = 12; - this.checkbox_autodecrypt.Text = "Decrypt automatically"; - this.checkbox_autodecrypt.UseVisualStyleBackColor = true; + checkbox_autodecrypt.AutoSize = true; + checkbox_autodecrypt.Checked = true; + checkbox_autodecrypt.CheckState = CheckState.Checked; + checkbox_autodecrypt.Location = new Point(220, 111); + checkbox_autodecrypt.Margin = new Padding(4, 3, 4, 3); + checkbox_autodecrypt.Name = "checkbox_autodecrypt"; + checkbox_autodecrypt.Size = new Size(142, 19); + checkbox_autodecrypt.TabIndex = 12; + checkbox_autodecrypt.Text = "Decrypt automatically"; + checkbox_autodecrypt.UseVisualStyleBackColor = true; // // checkbox_crc // - this.checkbox_crc.AutoSize = true; - this.checkbox_crc.Checked = true; - this.checkbox_crc.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkbox_crc.Location = new System.Drawing.Point(75, 96); - this.checkbox_crc.Name = "checkbox_crc"; - this.checkbox_crc.Size = new System.Drawing.Size(94, 17); - this.checkbox_crc.TabIndex = 11; - this.checkbox_crc.Text = "Check CRC32"; - this.checkbox_crc.UseVisualStyleBackColor = true; + checkbox_crc.AutoSize = true; + checkbox_crc.Checked = true; + checkbox_crc.CheckState = CheckState.Checked; + checkbox_crc.Location = new Point(88, 111); + checkbox_crc.Margin = new Padding(4, 3, 4, 3); + checkbox_crc.Name = "checkbox_crc"; + checkbox_crc.Size = new Size(97, 19); + checkbox_crc.TabIndex = 11; + checkbox_crc.Text = "Check CRC32"; + checkbox_crc.UseVisualStyleBackColor = true; // // size_textbox // - this.size_textbox.Location = new System.Drawing.Point(75, 70); - this.size_textbox.Name = "size_textbox"; - this.size_textbox.ReadOnly = true; - this.size_textbox.Size = new System.Drawing.Size(290, 20); - this.size_textbox.TabIndex = 40; - this.size_textbox.TabStop = false; + size_textbox.Location = new Point(88, 81); + size_textbox.Margin = new Padding(4, 3, 4, 3); + size_textbox.Name = "size_textbox"; + size_textbox.ReadOnly = true; + size_textbox.Size = new Size(338, 23); + size_textbox.TabIndex = 40; + size_textbox.TabStop = false; // // size_lbl // - this.size_lbl.AutoSize = true; - this.size_lbl.Location = new System.Drawing.Point(6, 75); - this.size_lbl.Name = "size_lbl"; - this.size_lbl.Size = new System.Drawing.Size(27, 13); - this.size_lbl.TabIndex = 20; - this.size_lbl.Text = "Size"; + size_lbl.AutoSize = true; + size_lbl.Location = new Point(7, 87); + size_lbl.Margin = new Padding(4, 0, 4, 0); + size_lbl.Name = "size_lbl"; + size_lbl.Size = new Size(27, 15); + size_lbl.TabIndex = 20; + size_lbl.Text = "Size"; // // saveFileDialog1 // - this.saveFileDialog1.SupportMultiDottedExtensions = true; + saveFileDialog1.SupportMultiDottedExtensions = true; // // Form1 // - this.AcceptButton = this.update_button; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(668, 441); - this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); - this.Controls.Add(this.log_textbox); - this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon"))); - this.Name = "Form1"; - this.Text = "hadesFirm (2k24 Edition)"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_Close); - this.Load += new System.EventHandler(this.Form1_Load); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); + AcceptButton = update_button; + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(779, 509); + Controls.Add(groupBox2); + Controls.Add(groupBox1); + Controls.Add(log_textbox); + Icon = (Icon) resources.GetObject("$this.Icon"); + Margin = new Padding(4, 3, 4, 3); + Name = "Form1"; + Text = "hadesFirm (2k24 Edition)"; + FormClosing += this.Form1_Close; + Load += this.Form1_Load; + groupBox1.ResumeLayout(false); + groupBox1.PerformLayout(); + groupBox3.ResumeLayout(false); + groupBox3.PerformLayout(); + groupBox2.ResumeLayout(false); + groupBox2.PerformLayout(); this.ResumeLayout(false); - } public class DownloadEventArgs : EventArgs @@ -927,17 +953,27 @@ private void imei_lbl_Click(object sender, EventArgs e) { } - private void LogTextBox_LinkClicked(object sender, LinkClickedEventArgs e) + private void OpenLinkInBrowser(string link) { try { - Process.Start(e.LinkText); + Process.Start(new ProcessStartInfo + { + FileName = link, + UseShellExecute = true + }); } catch (Exception ex) { MessageBox.Show($"Error opening link:\n{ex.Message}"); } } + + private void LogTextBox_LinkClicked(object sender, LinkClickedEventArgs e) + { + OpenLinkInBrowser(e.LinkText); + } + private void searchButton_Click(object sender, EventArgs e) { string model = this.model_textbox.Text; @@ -949,17 +985,11 @@ private void searchButton_Click(object sender, EventArgs e) else { string searchLink = $"https://www.google.com/search?q={model}+imei+swappa"; - try - { - Process.Start(searchLink); - Logger.WriteLog($"Opening {searchLink} in browser", false); - } - catch (Exception ex) - { - MessageBox.Show($"Error opening link:\n{ex.Message}"); - } + Logger.WriteLog($"Opening {searchLink} in browser", false); + OpenLinkInBrowser(searchLink); } } + } } \ No newline at end of file diff --git a/Form1.resx b/Form1.resx index 311ea34..54c7651 100644 --- a/Form1.resx +++ b/Form1.resx @@ -1,17 +1,17 @@ -