using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace EliteBGS {
    /// <summary>
    /// Interaction logic for CombatZoneDialog.xaml
    /// </summary>
    public partial class CombatZoneDialog : Window {
        public CombatZoneDialog() {
            InitializeComponent();
        }

        public string Type => (type.SelectedItem as ComboBoxItem).Content.ToString();
        public string Grade => (grade.SelectedItem as ComboBoxItem).Content.ToString();
        public int Amount {
            get {
                try {
                    return int.Parse(amount.Text);
                } catch (Exception) {
                    return 1;
                }
            }
        }

        private void Accept_Click(object sender, RoutedEventArgs e) {
            DialogResult = true;
            Close();
        }

        private void Cancel_Click(object sender, RoutedEventArgs e) {
            DialogResult = false;
            Close();
        }
    }
}
