namespace SHNDecrypt { using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; public class columnRename : Form { private Button button1; private ComboBox comboBox1; private IContainer components; private Label label1; private Label label2; private frmMain mainfrm; private TextBox textBox1; public columnRename(frmMain main) { this.mainfrm = main; this.InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { this.mainfrm.file.EditColumnName(this.comboBox1.Text, this.textBox1.Text); this.mainfrm.SQLStatus.Text = "Changed '" + this.comboBox1.Text + "' to '" + this.textBox1.Text + "'"; } catch (Exception exception) { MessageBox.Show(exception.Message); } } protected override void Dispose(bool disposing) { if (disposing && (this.components != null)) { this.components.Dispose(); } base.Dispose(disposing); } public void init() { if (this.mainfrm.file.table != null) { this.comboBox1.Items.Clear(); for (int i = 0; i < this.mainfrm.file.table.Columns.Count; i++) { this.comboBox1.Items.Add(this.mainfrm.file.table.Columns[i].ColumnName); } this.comboBox1.SelectedIndex = 0; } } private void InitializeComponent() { ComponentResourceManager manager = new ComponentResourceManager(typeof(columnRename)); this.comboBox1 = new ComboBox(); this.textBox1 = new TextBox(); this.button1 = new Button(); this.label1 = new Label(); this.label2 = new Label(); base.SuspendLayout(); this.comboBox1.DropDownStyle = ComboBoxStyle.DropDownList; this.comboBox1.FormattingEnabled = true; this.comboBox1.Location = new Point(60, 12); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new Size(250, 0x15); this.comboBox1.TabIndex = 0; this.textBox1.Location = new Point(60, 0x27); this.textBox1.Name = "textBox1"; this.textBox1.Size = new Size(250, 20); this.textBox1.TabIndex = 1; this.button1.Location = new Point(60, 0x41); this.button1.Name = "button1"; this.button1.Size = new Size(0xf9, 0x1c); this.button1.TabIndex = 2; this.button1.Text = "Rename"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new EventHandler(this.button1_Click); this.label1.AutoSize = true; this.label1.Location = new Point(9, 15); this.label1.Name = "label1"; this.label1.Size = new Size(0x2d, 13); this.label1.TabIndex = 10; this.label1.Text = "Column:"; this.label2.AutoSize = true; this.label2.Location = new Point(0x10, 0x2a); this.label2.Name = "label2"; this.label2.Size = new Size(0x26, 13); this.label2.TabIndex = 9; this.label2.Text = "Name:"; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = AutoScaleMode.Font; base.ClientSize = new Size(0x141, 0x69); base.Controls.Add(this.label1); base.Controls.Add(this.label2); base.Controls.Add(this.button1); base.Controls.Add(this.textBox1); base.Controls.Add(this.comboBox1); base.Icon = (Icon) manager.GetObject("$this.Icon"); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "columnRename"; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Column Rename"; base.Load += new EventHandler(this.RenameBox_Load); base.ResumeLayout(false); base.PerformLayout(); } private void RenameBox_Load(object sender, EventArgs e) { } } }