using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Mutation
{
    public partial class CompareDialog : Form
    {
        public CompareDialog()
        {
            InitializeComponent();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "Halo 2 Xbox Map (*.map)|*.map";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                txtBaseMap.Text = ofd.FileName;
            }
        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "Halo 2 Xbox Map (*.map)|*.map";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                txtTargetMap.Text = ofd.FileName;
            }
        }

        private void simpleButton3_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void simpleButton4_Click(object sender, EventArgs e)
        {
            // Get Options
            bool[] Options = new bool[18];
            Options[0] = checkEdit1.Checked;
            Options[1] = checkEdit2.Checked;
            Options[2] = checkEdit3.Checked;
            Options[3] = checkEdit4.Checked;
            Options[4] = checkEdit5.Checked;
            Options[5] = checkEdit6.Checked;
            Options[6] = checkEdit7.Checked;
            Options[7] = checkEdit8.Checked;
            Options[8] = checkEdit9.Checked;
            Options[9] = checkEdit10.Checked;
            Options[10] = checkEdit11.Checked;
            Options[11] = checkEdit12.Checked;
            Options[12] = checkEdit13.Checked;
            Options[13] = checkEdit14.Checked;
            Options[14] = checkEdit15.Checked;
            Options[15] = checkEdit16.Checked;
            Options[16] = checkEdit17.Checked;
            Options[17] = checkEdit18.Checked;

            // Load Updater
            Updater u = new Updater(Options, txtBaseMap.Text, txtTargetMap.Text);
            this.Hide();
            u.Show();
            this.Close();
        }
    }
}
