Exemplo n.º 1
0
        protected virtual void ABMForm_Load(object sender, System.EventArgs e)
        {
            moABMRoutines = new ABMCommonRoutines();
            modoActual    = ABMCommonRoutines.enModes.Normal;

            var _with1 = moABMRoutines;

            _with1.currentForm   = this;
            _with1.cmdSearchName = CMDBuscar.Name;
            _with1.cmdCancelName = CMDCancelar.Name;
            _with1.cmdQueryName  = CMDConsultar.Name;
            _with1.cmdEditName   = CMDEditar.Name;
            _with1.cmdNewName    = CMDNuevo.Name;
            _with1.cmdDeleteName = CMDEliminar.Name;

            UpdateControls(modoActual);
        }
Exemplo n.º 2
0
        protected void EnableControls(bool enable)
        {
            var abmRoutines = new ABMCommonRoutines();

            abmRoutines.currentForm = this;

            bool switchStateWasCancelled;

            BeforeEnablingControls(out switchStateWasCancelled);

            if (!switchStateWasCancelled)
            {
                var excludedControls = new List <Type>();
                excludedControls.Add(typeof(Label));
                excludedControls.Add(typeof(Panel));
                abmRoutines.EnableAllControls(enable, this, excludeTypes: excludedControls);
            }

            AfterEnablingControls();
        }
Exemplo n.º 3
0
 private void ABMForm_FormClosed(System.Object sender, System.Windows.Forms.FormClosedEventArgs e)
 {
     moABMRoutines = null;
 }