private void NewfacturaExecuted(object sender, EventArgs e) { Debug.Assert(factura == null); _Commands.FacturaCommands.New.Enabled = false; // Disable new client command to prevent re-entrancy factura = new VFacturas(); factura.Commands = _Commands; this.ShowModalPanel(factura, DevComponents.DotNetBar.Controls.eSlideSide.Right); if (!_StartControl.Visible) { _StartControl.SlideOutButtonVisible = false; } }
private void CloseFacturaDialog() { if (!_StartControl.Visible) { _StartControl.SlideOutButtonVisible = true; } _Commands.FacturaCommands.New.Enabled = true; // Enable new client command this.CloseModalPanel(factura, DevComponents.DotNetBar.Controls.eSlideSide.Right); factura.Commands = null; factura.Dispose(); factura = null; }