namespace SHNDecrypt
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class TransByList : Form
    {
        private Button button1;
        private IContainer components;
        private frmMain form;
        private Label label1;
        private TextBox textBox1;

        public TransByList(frmMain main)
        {
            this.InitializeComponent();
            this.form = main;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.form.file != null)
            {
                for (int i = 0; i < this.textBox1.Lines.Length; i++)
                {
                    string[] strArray = this.textBox1.Lines[i].Split(new char[] { '@' });
                    int rowByIndex = this.form.file.GetRowByIndex(1, strArray[0]);
                    if (rowByIndex > -1)
                    {
                        this.form.file.table.Rows[rowByIndex][2] = strArray[1];
                    }
                }
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(TransByList));
            this.label1 = new Label();
            this.textBox1 = new TextBox();
            this.button1 = new Button();
            base.SuspendLayout();
            this.label1.AutoSize = true;
            this.label1.Location = new Point(10, 11);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0xa1, 13);
            this.label1.TabIndex = 0;
            this.label1.Text = "Paste the list gained from debug:";
            this.textBox1.Location = new Point(0x12, 0x20);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new Size(0x1a2, 410);
            this.textBox1.TabIndex = 1;
            this.button1.Location = new Point(0x1ba, 0x20);
            this.button1.Name = "button1";
            this.button1.Size = new Size(0x60, 0x22);
            this.button1.TabIndex = 2;
            this.button1.Text = "Go!";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new EventHandler(this.button1_Click);
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(550, 0x1e4);
            base.Controls.Add(this.button1);
            base.Controls.Add(this.textBox1);
            base.Controls.Add(this.label1);
            base.Icon = (Icon) manager.GetObject("$this.Icon");
            base.Name = "TransByList";
            this.Text = "TransByList";
            base.Load += new EventHandler(this.TransByList_Load);
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        private void TransByList_Load(object sender, EventArgs e)
        {
            if (Clipboard.ContainsText())
            {
                this.textBox1.Text = Clipboard.GetText();
            }
        }
    }
}

