namespace SHNDecryptHK { using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; public class columnMultiply : Form { private Button btnGo; private ComboBox comboBox1; private IContainer components; private frmMain frmColMulti; private GroupBox groupBox1; private Label label1; private TextBox txtFactor; public columnMultiply(frmMain form) { this.frmColMulti = form; this.InitializeComponent(); } private void btnGo_Click(object sender, EventArgs e) { int num = this.frmColMulti.file.getColIndex(this.comboBox1.Items[this.comboBox1.SelectedIndex].ToString()); if (num >= 0) { double num2 = 0.0; try { num2 = double.Parse(this.txtFactor.Text); } catch (Exception exception) { MessageBox.Show(exception.Message); return; } string str = this.frmColMulti.file.table.Columns[num].DataType.ToString(); for (int i = 0; i < this.frmColMulti.file.table.Rows.Count; i++) { try { string str2 = str; if (str2 == null) { goto Label_0239; } if (!(str2 == "System.UInt16")) { if (str2 == "System.UInt32") { goto Label_0136; } if (str2 == "System.SByte") { goto Label_018E; } if (str2 == "System.Byte") { goto Label_01E5; } goto Label_0239; } this.frmColMulti.file.table.Rows[i][num] = (ushort) (((ushort) this.frmColMulti.file.table.Rows[i][num]) * num2); continue; Label_0136: this.frmColMulti.file.table.Rows[i][num] = (uint) (((uint) this.frmColMulti.file.table.Rows[i][num]) * num2); continue; Label_018E: this.frmColMulti.file.table.Rows[i][num] = (sbyte) (((sbyte) this.frmColMulti.file.table.Rows[i][num]) * num2); continue; Label_01E5: this.frmColMulti.file.table.Rows[i][num] = (byte) (((byte) this.frmColMulti.file.table.Rows[i][num]) * num2); continue; Label_0239: this.frmColMulti.file.table.Rows[i][num] = (int) (((int) this.frmColMulti.file.table.Rows[i][num]) * num2); } catch (Exception exception2) { MessageBox.Show(exception2.Message); break; } } this.frmColMulti.SQLStatus.Text = this.comboBox1.SelectedItem.ToString() + " column has been multiplied by " + num2.ToString() + "."; } } private void columnMultiply_Load(object sender, EventArgs e) { if (this.frmColMulti.file == null) { base.Close(); } else { this.init(); } } protected override void Dispose(bool disposing) { if (disposing && (this.components != null)) { this.components.Dispose(); } base.Dispose(disposing); } public void init() { if (this.frmColMulti.file.table != null) { this.comboBox1.Items.Clear(); for (int i = 0; i < this.frmColMulti.file.table.Columns.Count; i++) { this.comboBox1.Items.Add(this.frmColMulti.file.table.Columns[i].ColumnName); } this.comboBox1.SelectedIndex = 0; } } private void InitializeComponent() { ComponentResourceManager manager = new ComponentResourceManager(typeof(columnMultiply)); this.groupBox1 = new GroupBox(); this.btnGo = new Button(); this.txtFactor = new TextBox(); this.label1 = new Label(); this.comboBox1 = new ComboBox(); this.groupBox1.SuspendLayout(); base.SuspendLayout(); this.groupBox1.Controls.Add(this.btnGo); this.groupBox1.Controls.Add(this.txtFactor); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Location = new Point(12, 0x27); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new Size(0xde, 0x51); this.groupBox1.TabIndex = 9; this.groupBox1.TabStop = false; this.groupBox1.Text = "Multiply:"; this.btnGo.Location = new Point(0x34, 0x30); this.btnGo.Name = "btnGo"; this.btnGo.Size = new Size(0xa4, 0x1a); this.btnGo.TabIndex = 6; this.btnGo.Text = "Go"; this.btnGo.UseVisualStyleBackColor = true; this.btnGo.Click += new EventHandler(this.btnGo_Click); this.txtFactor.Location = new Point(0x34, 0x16); this.txtFactor.Name = "txtFactor"; this.txtFactor.Size = new Size(0xa4, 20); this.txtFactor.TabIndex = 5; this.txtFactor.Text = "1"; this.label1.AutoSize = true; this.label1.Location = new Point(6, 0x19); this.label1.Name = "label1"; this.label1.Size = new Size(40, 13); this.label1.TabIndex = 4; this.label1.Text = "Factor:"; this.comboBox1.DropDownStyle = ComboBoxStyle.DropDownList; this.comboBox1.FormattingEnabled = true; this.comboBox1.Location = new Point(12, 12); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new Size(0xde, 0x15); this.comboBox1.TabIndex = 8; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = AutoScaleMode.Font; base.ClientSize = new Size(0xf9, 0x84); base.Controls.Add(this.groupBox1); base.Controls.Add(this.comboBox1); base.FormBorderStyle = FormBorderStyle.FixedSingle; base.Icon = (Icon) manager.GetObject("$this.Icon"); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "columnMultiply"; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Column Multiplier"; base.Load += new EventHandler(this.columnMultiply_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); base.ResumeLayout(false); } } }