internal void Init() { this.data = null; this.group = null; this.dataReference = null; this.dataOrientation = Dt.Cells.Data.DataOrientation.Vertical; this.Row = 0; this.Column = 0; this.cachedFormula = null; }
internal Sparkline(int row, int column, CalcExpression dataReference, Dt.Cells.Data.DataOrientation dataOrientation, Dt.Cells.Data.SparklineType type, SparklineSetting setting) { this.Row = row; this.Column = column; this.DataReference = dataReference; this.DataOrientation = dataOrientation; this.group = new SparklineGroup(); this.group.Add(this); this.SparklineType = type; this.Setting = setting; }
internal SparklineGroup Clone() { SparklineGroup group = new SparklineGroup(this.sparklineType, this.setting.Clone()) { dateAxisReference = this.dateAxisReference, axisOrientation = this.axisOrientation }; if (this.isDateAxisDataSet) { group.DateAxisData = this.DateAxisData; } return(group); }
public void Clear(int row, int column, int rowCount, int columnCount) { for (int i = row; i < (row + rowCount); i++) { for (int j = column; j < (column + columnCount); j++) { Sparkline item = this.Find(i, j); if (item != null) { SparklineGroup group = item.Group; group.Remove(item); if (group.Count == 0) { this.Remove(group); } } } } }
public void Move(Worksheet src, int fromRow, int fromColumn, int toRow, int toColumn, int rowCount, int columnCount) { if (object.ReferenceEquals(src, this.Sheet)) { this.Move(fromRow, fromColumn, toRow, toColumn, rowCount, columnCount); } else { this.MoveDataRange(src, fromRow, fromColumn, toRow, toColumn, rowCount, columnCount); for (int i = 0; i < rowCount; i++) { for (int j = 0; j < columnCount; j++) { Sparkline item = src.GetSparkline(fromRow + i, fromColumn + j); if (item != null) { item.Row = toRow + i; item.Column = toColumn + j; SparklineGroup group = item.Group; SparklineGroup group2 = group.Clone(); group.Remove(item); if (group.Count <= 0) { src.SheetSparklineGroupManager.Remove(group); } group2.Add(item); this.Add(group2); this.Sheet.SetSparkline(toRow + i, toColumn + j, item); } else { this.Sheet.SetSparkline(toRow + i, toColumn + j, null); } ((ISparklineSheet)src).SetSparkline(fromRow + i, fromColumn + j, null); } } } }
public void Remove(SparklineGroup group) { this.Groups.Remove(group); group.SparklineGroupManager = null; }
public void Add(SparklineGroup group) { this.Groups.Add(group); group.SparklineGroupManager = this; }
public bool Contains(SparklineGroup group) { return(this.Groups.Contains(group)); }