Ejemplo n.º 1
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public Style()
 {
     CurrentBorder       = new Border();
     CurrentCellXf       = new CellXf();
     CurrentFill         = new Fill();
     CurrentFont         = new Font();
     CurrentNumberFormat = new NumberFormat();
     styleNameDefined    = false;
     name = CalculateHash();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor with parameters
 /// </summary>
 /// <param name="name">Name of the style</param>
 public Style(string name)
 {
     CurrentBorder       = new Border();
     CurrentCellXf       = new CellXf();
     CurrentFill         = new Fill();
     CurrentFont         = new Font();
     CurrentNumberFormat = new NumberFormat();
     styleNameDefined    = false;
     this.name           = name;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public Style()
 {
     CurrentBorder       = new Border();
     CurrentCellXf       = new CellXf();
     CurrentFill         = new Fill();
     CurrentFont         = new Font();
     CurrentNumberFormat = new NumberFormat();
     styleNameDefined    = false;
     name = this.GetHashCode().ToString();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructor with parameters (internal use)
 /// </summary>
 /// <param name="name">Name of the style</param>
 /// <param name="forcedOrder">Number of the style for sorting purpose. Style will be placed to this position (internal use only)</param>
 /// <param name="internalStyle">If true, the style is marked as internal</param>
 public Style(string name, int forcedOrder, bool internalStyle)
 {
     CurrentBorder       = new Border();
     CurrentCellXf       = new CellXf();
     CurrentFill         = new Fill();
     CurrentFont         = new Font();
     CurrentNumberFormat = new NumberFormat();
     this.name           = name;
     InternalID          = forcedOrder;
     this.internalStyle  = internalStyle;
     styleNameDefined    = true;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Method to copy the current object to a new one without casting
        /// </summary>
        /// <returns>Copy of the current object without the internal ID</returns>
        public override AbstractStyle Copy()
        {
            CellXf copy = new CellXf();

            copy.HorizontalAlign     = HorizontalAlign;
            copy.Alignment           = Alignment;
            copy.TextDirection       = TextDirection;
            copy.TextRotation        = TextRotation;
            copy.VerticalAlign       = VerticalAlign;
            copy.ForceApplyAlignment = ForceApplyAlignment;
            copy.Locked = Locked;
            copy.Hidden = Hidden;
            return(copy);
        }