private void Cuenta_SIZUC_EliminarElemento2(SIZUCContabilizacionCapturaLibre objeto) { if (stpModulos.Children.IndexOf(objeto) == stpModulos.Children.Count - 1) { stpModulos.Children.Remove(objeto); stpModulos.Children.Remove(objeto.Separador); ActualizarElimninarControles(); } }
private void DibujarControlLibre(string parte, int caracteres) { //CalcularCaracteres(); SIZUCContabilizacionCapturaLibre cuenta = new SIZUCContabilizacionCapturaLibre(); cuenta.SetColor(ColorBase); cuenta.BotonEliminarVisible = false; cuenta.CaracteresFaltantes = caracteres; if (stpModulos.Children.Count > 0) { SIZUCContabilizacionCapturaSeparador separador = new SIZUCContabilizacionCapturaSeparador(); cuenta.Separador = separador; stpModulos.Children.Add(separador); } if (parte != null) { cuenta.Captura = parte; } stpModulos.Children.Add(cuenta); cuenta.SIZUC_EliminarElemento += Cuenta_SIZUC_EliminarElemento2; cuenta.SIZUC_Actualizar += SIZUC_Actualizar; }
private void BtnAgregarModuloCapturaLibre_MouseUp(object sender, MouseButtonEventArgs e) { if (ValidarCuentasCapturadas()) { return; } CalcularCaracteres(); SIZUCContabilizacionCapturaLibre cuenta = new SIZUCContabilizacionCapturaLibre(); cuenta.SetColor(ColorBase); cuenta.BotonEliminarVisible = true; cuenta.CaracteresFaltantes = caracteresFaltantes; if (stpModulos.Children.Count > 0) { SIZUCContabilizacionCapturaSeparador separador = new SIZUCContabilizacionCapturaSeparador(); cuenta.Separador = separador; stpModulos.Children.Add(separador); } stpModulos.Children.Add(cuenta); cuenta.SIZUC_EliminarElemento += Cuenta_SIZUC_EliminarElemento1; cuenta.SIZUC_Actualizar += SIZUC_Actualizar; ActualizarElimninarControles(); }