internal void NotificarEliminacion() { ID = int.MaxValue; _Anterior = null; _Siguiente = null; _Formato = null; }
internal void AumentarEspacioAntesParrafo() { Medicion valor = Formato.ObtenerEspacioAnterior(); valor = valor + new Medicion(5, Unidad.Puntos); Formato = Formato.Fusionar(FormatoParrafo.CrearEspacioAnterior(valor)); _contenedor.NotificarCambio(this); }
internal void AgregarTextoDe(Parrafo parrafo_Siguiente) { bufferTexto.Agregar(parrafo_Siguiente.bufferTexto); if (_Formato != null || parrafo_Siguiente._Formato != null) { _Formato = Formato.Fusionar(parrafo_Siguiente.Formato); } _contenedor.NotificarCambio(this); }
internal Parrafo(Documento _documento, int id, Parrafo anterior, Parrafo siguiente, Parrafo formatoBase) { _contenedor = _documento; ID = id; _Formato = formatoBase._Formato == null?null:formatoBase.Formato.Clonar(); Posicion = 1; _Anterior = anterior; _Siguiente = siguiente; bufferTexto.Iniciar(); }
public void DisminuirInterlineado() { decimal valor = Formato.ObtenerEspaciadoInterlineal() - 0.5m; if (valor < 1) { valor = 1; } Formato = Formato.Fusionar(FormatoParrafo.CrearEspacioInterlineal(valor)); _contenedor.NotificarCambio(this); }
public void IniciarParrafo(FormatoParrafo formato) { Medicion medicionAnterior = formato.ObtenerEspacioAnterior(); Medicion medicionPosterior = formato.ObtenerEspacioPosterior(); string estilos = ""; estilos += "margin-top:" + medicionAnterior.ConvertirA(Unidad.Puntos).Valor.ToString(System.Globalization.CultureInfo.InvariantCulture) + "pt;"; estilos += "margin-bottom:" + medicionPosterior.ConvertirA(Unidad.Puntos).Valor.ToString(System.Globalization.CultureInfo.InvariantCulture) + "pt;"; estilos += "line-spacing:" + formato.ObtenerEspaciadoInterlineal() + "em;"; _html.Append("<p style='" + estilos + "'>"); }
internal void DisminuirEspacioAntesParrafo() { Medicion valor = Formato.ObtenerEspacioAnterior(); valor = valor - new Medicion(5, Unidad.Puntos); if (valor.Valor < 0) { valor = Medicion.Cero; } Formato = Formato.Fusionar(FormatoParrafo.CrearEspacioAnterior(valor)); _contenedor.NotificarCambio(this); }
internal static double Get(FormatoParrafo formato) { if (formato != null) { MemberInfo[] mi = formato.GetType().GetMember(formato.ToString()); if (mi != null && mi.Length > 0) { LineSpacingAttribute attr = Attribute.GetCustomAttribute(mi[0], typeof(LineSpacingAttribute)) as LineSpacingAttribute; if (attr != null) { return(attr.LineSpacing); } } } return(12); // Default: 1.0 equals to 12 points }
internal static int Get(FormatoParrafo formato) { if (formato != null) { MemberInfo[] mi = formato.GetType().GetMember(formato.ToString()); if (mi != null && mi.Length > 0) { AlignmentAttribute attr = Attribute.GetCustomAttribute(mi[0], typeof(AlignmentAttribute)) as AlignmentAttribute; if (attr != null) { return(attr.Alignment); } } } return(0); // Default: Left }
internal static System.Drawing.Color Get(FormatoParrafo formato) { if (formato != null) { MemberInfo[] mi = formato.GetType().GetMember(formato.ToString()); if (mi != null && mi.Length > 0) { ColorAttribute attr = Attribute.GetCustomAttribute(mi[0], typeof(ColorAttribute)) as ColorAttribute; if (attr != null) { return(System.Drawing.Color.FromArgb(attr.Alpha, attr.Red, attr.Green, attr.Blue)); } } } return(System.Drawing.Color.Black); }
internal static bool Get(FormatoParrafo formato) { if (formato != null) { MemberInfo[] mi = formato.GetType().GetMember(formato.ToString()); if (mi != null && mi.Length > 0) { BoldAttribute attr = Attribute.GetCustomAttribute(mi[0], typeof(BoldAttribute)) as BoldAttribute; if (attr != null) { return(attr.Bold); } } } return(false); }
internal static double Get(FormatoParrafo formato) { if (formato != null) { MemberInfo[] mi = formato.GetType().GetMember(formato.ToString()); if (mi != null && mi.Length > 0) { FontSizeAttribute attr = Attribute.GetCustomAttribute(mi[0], typeof(FontSizeAttribute)) as FontSizeAttribute; if (attr != null) { return(attr.FontSize); } } } return(12); }
public void IniciarParrafo(FormatoParrafo formato) { }
public void AumentarInterlineado() { Formato = Formato.Fusionar(FormatoParrafo.CrearEspacioInterlineal(Formato.ObtenerEspaciadoInterlineal() + 0.5m)); _contenedor.NotificarCambio(this); }
public void AlinearCentro() { Formato = Formato.Fusionar(FormatoParrafo.CrearAlineacionCentro()); _contenedor.NotificarCambio(this); }
void IEscritor.IniciarParrafo(FormatoParrafo formato) { parrafoActual = InsertarParrafo(parrafoIns, posicionInsercion); parrafoActual.Formato = formato.Clonar(); posicionInsercion = 0; }