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


namespace Param
{
    public class Customizer : MercatorUi.ICustomizers.IFormLoadCustomizer
    {

        public void FormLoadCustomize(Form WindowsForm)
        {
            if (WindowsForm is MercatorUi.Forms.Param.ParamUsersForm) // on est dans l'écran de paramétrage des utilisateurs
            {
                MercatorUi.Forms.Param.ParamUsersForm paramUsersForm = (MercatorUi.Forms.Param.ParamUsersForm)WindowsForm;

                MercatorUi._BaseClasses.BindableCheckBox checkBoxGaNeeded = new MercatorUi._BaseClasses.BindableCheckBox();
                checkBoxGaNeeded.BackgroundStyle.Class = "";
                checkBoxGaNeeded.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
                checkBoxGaNeeded.Location = new System.Drawing.Point(237, 224);
                checkBoxGaNeeded.Name = "checkBoxGaNeeded";
                checkBoxGaNeeded.Size = new System.Drawing.Size(190, 23);
                checkBoxGaNeeded.Source = "GA_needed";
                checkBoxGaNeeded.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
                checkBoxGaNeeded.Text = "Google Authenticator requis";
                checkBoxGaNeeded.TextE = "Google Authenticator required";
                checkBoxGaNeeded.TextN = "Google Authenticator nodig";
                checkBoxGaNeeded.ReadOnly = paramUsersForm.OpenAsReadOnly;
                paramUsersForm.TabControlProfile.TabPages[0].Controls.Add(checkBoxGaNeeded);
                checkBoxGaNeeded.CreateBinding(paramUsersForm.Dt);

                MercatorUi._BaseClasses.BindableCheckBox checkBoxGaActive = new MercatorUi._BaseClasses.BindableCheckBox();
                checkBoxGaActive.BackgroundStyle.Class = "";
                checkBoxGaActive.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
                checkBoxGaActive.Location = new System.Drawing.Point(237, 259);
                checkBoxGaActive.Name = "checkBoxGaActive";
                checkBoxGaActive.Size = new System.Drawing.Size(190, 23);
                checkBoxGaActive.Source = "GA_active";
                checkBoxGaActive.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
                checkBoxGaActive.Text = "Google Authenticator actif";
                checkBoxGaActive.TextE = "Google Authenticator active";
                checkBoxGaActive.TextN = "Google Authenticator actief";
                checkBoxGaActive.ReadOnly = paramUsersForm.OpenAsReadOnly;
                paramUsersForm.TabControlProfile.TabPages[0].Controls.Add(checkBoxGaActive);
                checkBoxGaActive.CreateBinding(paramUsersForm.Dt);
            }
        }
    }
}