using System;
using System.IO;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Configuration;

namespace TracLoginInformation
{
    public partial class LoginInformation : Form
    {
        Hashtable fields = new Hashtable();

        public LoginInformation()
        {
            InitializeComponent();

            enableStore.Enabled = false;
        }

        private void textBox3_TextChanged( object sender, EventArgs e )
        {
        }

        private void buttonOK_Click( object sender, EventArgs e )
        {
            DialogResult = DialogResult.OK;

            Close();
        }

        private void button1_Click( object sender, EventArgs e )
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }

        // コンボボックスの表示が変更されたので、
        // それにあわせてユーザ名とパスワードを変更する
        public void ComboChangeEvent( object sender, EventArgs e )
        {
            string[] field = (string[])fields[serverUrl.Text];
            if ( field != null ) {
                userName.Text = field[0];
                password.Text = field[1];
            }
        }

        public string ServerURL
        {
            get
            {
                return serverUrl.Text;
            }
        }

        public string UserName
        {
            get
            {
                return userName.Text;
            }
        }

        public string Password
        {
            get
            {
                return password.Text;
            }
        }

    }
}
