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

namespace SanSystem
{
    public partial class FrmSelectNewSan : Form
    {
        public event EventHandler AddInlinerClicked;
        public event EventHandler AddSchachtAnbindungClicked;

        protected virtual void OnAddSchachtAnbindungClicked(EventArgs e)
        {
            EventHandler handler = AddSchachtAnbindungClicked;
            if (handler != null) handler(this, e);
        }
        protected virtual void OnAddInlinerClicked(EventArgs e)
        {
            EventHandler handler = AddInlinerClicked;
            if (handler != null) handler(this, e);
        }
        public FrmSelectNewSan()
        {
            InitializeComponent();

            btn_inliner.Text = Global.Instance.language.Labels["inliner"];
            btn_hut.Text = Global.Instance.language.Labels["hut"];
            btn_kurzliner.Text = Global.Instance.language.Labels["kurzliner"];
            btn_schacht_anb.Text = Global.Instance.language.Labels["schacht_an"];

            btn_hut.Enabled = btn_kurzliner.Enabled = false;
        }

        private void btn_inliner_Click(object sender, EventArgs e)
        {
            OnAddInlinerClicked(EventArgs.Empty);
            this.Close();
        }

        private void btn_schacht_anb_Click(object sender, EventArgs e)
        {
            OnAddSchachtAnbindungClicked(EventArgs.Empty);
            this.Close();
        }
    }
}
