namespace SHNDecryptHK { using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; public class columnBulkEdit : Form { private Button button1; private ComboBox comboBox1; private IContainer components; private frmMain frmColBulkEdit; private GroupBox groupBox2; private Label label2; private TextBox txtBulk; public columnBulkEdit(frmMain form) { this.frmColBulkEdit = form; this.InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { int num = this.frmColBulkEdit.file.getColIndex(this.comboBox1.Items[this.comboBox1.SelectedIndex].ToString()); if (num >= 0) { for (int i = 0; i < this.frmColBulkEdit.file.table.Rows.Count; i++) { try { this.frmColBulkEdit.file.table.Rows[i][num] = this.txtBulk.Text; } catch (Exception exception) { MessageBox.Show(exception.Message); break; } } this.frmColBulkEdit.SQLStatus.Text = this.comboBox1.SelectedItem.ToString() + " column values have been set to \"" + this.txtBulk.Text + "\"."; } } private void ColMultiplier_Load(object sender, EventArgs e) { if (this.frmColBulkEdit.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.frmColBulkEdit.file.table != null) { this.comboBox1.Items.Clear(); for (int i = 0; i < this.frmColBulkEdit.file.table.Columns.Count; i++) { this.comboBox1.Items.Add(this.frmColBulkEdit.file.table.Columns[i].ColumnName); } this.comboBox1.SelectedIndex = 0; } } private void InitializeComponent() { ComponentResourceManager manager = new ComponentResourceManager(typeof(columnBulkEdit)); this.comboBox1 = new ComboBox(); this.groupBox2 = new GroupBox(); this.button1 = new Button(); this.txtBulk = new TextBox(); this.label2 = new Label(); this.groupBox2.SuspendLayout(); base.SuspendLayout(); 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 = 0; this.groupBox2.Controls.Add(this.button1); this.groupBox2.Controls.Add(this.txtBulk); this.groupBox2.Controls.Add(this.label2); this.groupBox2.Location = new Point(12, 0x27); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new Size(0xde, 0x51); this.groupBox2.TabIndex = 7; this.groupBox2.TabStop = false; this.groupBox2.Text = "Bulk Edit:"; this.button1.Location = new Point(0x34, 0x30); this.button1.Name = "button1"; this.button1.Size = new Size(0xa4, 0x1a); this.button1.TabIndex = 7; this.button1.Text = "Go"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new EventHandler(this.button1_Click); this.txtBulk.Location = new Point(0x34, 0x16); this.txtBulk.Name = "txtBulk"; this.txtBulk.Size = new Size(0xa4, 20); this.txtBulk.TabIndex = 1; this.label2.AutoSize = true; this.label2.Location = new Point(6, 0x19); this.label2.Name = "label2"; this.label2.Size = new Size(0x25, 13); this.label2.TabIndex = 0; this.label2.Text = "Value:"; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = AutoScaleMode.Font; base.ClientSize = new Size(0xf9, 0x84); base.Controls.Add(this.groupBox2); base.Controls.Add(this.comboBox1); base.FormBorderStyle = FormBorderStyle.FixedSingle; base.Icon = (Icon) manager.GetObject("$this.Icon"); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "columnBulkEdit"; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Column Bulk Editor"; base.Load += new EventHandler(this.ColMultiplier_Load); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); base.ResumeLayout(false); } } }