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 ExcelRedmineAddIn
{
    public partial class FormOption : Form
    {
        public Option Option
        {
            get;
            set;
        }

        public FormOption( Option option )
        {
            InitializeComponent();

            Option = option;
        }

        private void buttonOK_Click( object sender, EventArgs e )
        {
            Option.Url = textUrl.Text;
            Option.ApiKey = textApiKey.Text;
            Option.MailAddress = textMailAddress.Text;
            Option.Project = textProject.Text;
        }

        private void FormOption_Shown( object sender, EventArgs e )
        {
            textUrl.Text = Option.Url;
            textApiKey.Text = Option.ApiKey;
            textMailAddress.Text = Option.MailAddress;
            textProject.Text = Option.Project;
        }
    }
}
