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

namespace TFSBuildManager
{
    public partial class InputQueryForm : Form
    {
        public InputQueryForm(string title)
        {
            InitializeComponent();
            Text = title;
        }

        public InputQueryForm(string title, string defaultValue)
        {
            InitializeComponent();
            txtValue.Text = defaultValue;
            Text = title;
        }

        private string enteredValue;

        public string EnteredValue
        {
            get { return enteredValue; }
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            enteredValue = txtValue.Text;
        }

        private void txtValue_TextChanged(object sender, EventArgs e)
        {
            btnOK.Enabled = ((txtValue.Text != null) && (txtValue.Text != String.Empty));
        }    
    }
}