using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MercatorApi;
using MercatorUi;
using System.Windows.Forms;

namespace BrowseStock
{
    public class Customizer : MercatorUi.ICustomizers.IFormLoadCustomizer, MercatorUi.ICustomizers.IFormClosedCustomizer
    {

        public void FormLoadCustomize(Form WindowsForm)
        {
            MercatorUi.Forms.Sig.SigBrowseForm sigBrowseForm = (MercatorUi.Forms.Sig.SigBrowseForm)WindowsForm;
            sigBrowseForm.FullInitialized += new EventHandler(SigBrowseForm_FullInitialized);
        }

        public void FormClosedCustomize(Form WindowsForm)
        {
            MercatorUi.Forms.Sig.SigBrowseForm sigBrowseForm = (MercatorUi.Forms.Sig.SigBrowseForm)WindowsForm;
            sigBrowseForm.FullInitialized -= new EventHandler(SigBrowseForm_FullInitialized);
        }

        void SigBrowseForm_FullInitialized(object sender, EventArgs e)
        {
            MercatorUi.Forms.Sig.SigBrowseForm sigBrowseForm = (MercatorUi.Forms.Sig.SigBrowseForm)sender;
            sigBrowseForm.ComboBoxDepots.SelectedIndex = 1;

        }
    }
}