public override void SetValues(params byte[] values) { int RowSize = (CurrentAlignment.Equals(Alignment.Horizontal)) ? 1 : values.Length; int ColumnSize = (CurrentAlignment.Equals(Alignment.Horizontal)) ? values.Length : 1; StructureSize = new System.Drawing.Size(ColumnSize, RowSize); array = new bool[RowSize][]; for (int row = 0; row < StructureSize.Height; row++) { array[row] = new bool[ColumnSize]; for (int column = 0; column < StructureSize.Width; column++) { array[row][column] = Convert.ToBoolean(values[((row + 1) * (column + 1)) - 1]); //adding 1 to get actual number, removing 1 to get the index number of that number } } }
override public void SetKernelValues(params double[] values) { int kernelRowSize = (CurrentAlignment.Equals(Alignment.Horizontal))? 1: values.Length; int kernelColumnSize = (CurrentAlignment.Equals(Alignment.Horizontal)) ? values.Length : 1; kernelSize = new System.Drawing.Size(kernelColumnSize, kernelRowSize); array = new double[kernelRowSize][]; for (int row = 0; row < kernelSize.Height; row++) { array[row] = new double[kernelColumnSize]; for (int column = 0; column < kernelSize.Width; column++) { array[row][column] = values[((row + 1) * (column + 1)) - 1]; //adding 1 to get actual number, removing 1 to get the index number of that number } } }
public override bool Equals(object obj) { return((obj is StringFormat f) && FormatFlags.Equals(f.FormatFlags) && HotkeyPrefix.Equals(f.HotkeyPrefix) && measurableCharacterRanges == f.measurableCharacterRanges && Alignment.Equals(f.Alignment) && LineAlignment.Equals(f.LineAlignment) && Trimming.Equals(f.Trimming)); }
public bool Equals(IXLStyle other) { return (Font.Equals(other.Font) && Fill.Equals(other.Fill) && Border.Equals(other.Border) && NumberFormat.Equals(other.NumberFormat) && Alignment.Equals(other.Alignment) && Protection.Equals(other.Protection) ); }
/// <summary> /// Indicates whether this instance and a specified object are equal. /// </summary> /// <param name="obj">Another object to compare to.</param> /// <returns> /// true if obj and this instance are the same type and represent the same value; otherwise, false. /// </returns> public override bool Equals(object obj) { if (!(obj is ColumnInfo)) { return(false); } ColumnInfo ci = (ColumnInfo)obj; return(Width.Equals(ci.Width) && Content.Equals(ci.Content) && Alignment.Equals(ci.Alignment) && WordWrappingMethod.Equals(ci.WordWrappingMethod)); }
public override bool Equals(object obj) { // If parameter is null return false. if (obj == null) { return(false); } // If parameter cannot be cast to Text return false. var o = obj as RenderText; if ((System.Object)o == null) { return(false); } bool textRunsEqual = TextRuns.SequenceEqual(o.TextRuns); // Return true if the fields match: return(Location.Equals(o.Location) && Alignment.Equals(o.Alignment) && textRunsEqual); }
public bool Equals(ColumnInfo other) { return(Width.Equals(other.Width) && Content.Equals(other.Content) && Alignment.Equals(other.Alignment) && WordWrappingMethod.Equals(other.WordWrappingMethod)); }