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

namespace TFSBuildManager
{
    public partial class ChangeBuildQualityForm : Form
    {
        public ChangeBuildQualityForm(string teamProject, BuildStoreWrapper buildStoreWrapper)
        {
            InitializeComponent();
            cmbBuildQuality.Items.AddRange(buildStoreWrapper.GetBuildQualities());
        }

        private string selectedBuildQuality;

        public string SelectedBuildQuality
        {
            get { return selectedBuildQuality; }
        }

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

        private void cmbBuildQuality_SelectedIndexChanged(object sender, EventArgs e)
        {
            btnOK.Enabled = cmbBuildQuality.SelectedItem != null;
        }
    }
}