You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.2 KiB
C#
77 lines
2.2 KiB
C#
namespace com.azkoss.excellite
|
|
{
|
|
using System;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
|
|
///<summary>
|
|
///Base class for classes representing one or more excel cells.
|
|
///</summary>
|
|
public abstract class AbstractRange
|
|
{
|
|
// Methods
|
|
///<summary>
|
|
///Internal.
|
|
///</summary>
|
|
///<param name="parent"></param>
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
protected AbstractRange(ExcelWorksheet parent)
|
|
{
|
|
this.parent = parent;
|
|
}
|
|
|
|
internal void CheckMultiline(object val)
|
|
{
|
|
string text1 = val as string;
|
|
if ((text1 != null) && (text1.IndexOf('\n') != -1))
|
|
{
|
|
this.Style.WrapText = true;
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
///Sets borders on one or more excel cells, taking cell position into account.
|
|
///</summary>
|
|
///<param name="multipleBorders">Borders to set.</param>
|
|
///<param name="lineColor">Line color.</param>
|
|
///<param name="lineStyle">Line style.</param>
|
|
public abstract void SetBorders(MultipleBorders multipleBorders, Color lineColor, LineStyle lineStyle);
|
|
|
|
|
|
// Properties
|
|
///<summary>
|
|
///Gets or sets formula string.
|
|
///</summary>
|
|
public abstract string Formula { get; set; }
|
|
|
|
///<summary>
|
|
///Returns <b>true</b> if all cells in <see cref="com.azkoss.excellite.AbstractRange">AbstractRange</see> have default
|
|
///cell style; otherwise, <b>false</b>.
|
|
///</summary>
|
|
public abstract bool IsStyleDefault { get; }
|
|
|
|
internal ExcelWorksheet Parent
|
|
{
|
|
get
|
|
{
|
|
return this.parent;
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
///Gets or sets cell style (<see cref="com.azkoss.excellite.CellStyle">CellStyle</see>) on one or more excel cells.
|
|
///</summary>
|
|
public abstract CellStyle Style { get; set; }
|
|
|
|
///<summary>
|
|
///Gets or sets cell value on one or more excel cells.
|
|
///</summary>
|
|
public abstract object Value { get; set; }
|
|
|
|
|
|
// Fields
|
|
private ExcelWorksheet parent;
|
|
}
|
|
}
|
|
|