protected void _SetFormulaIgnoreNull(StreamType st, SIDSRC streamitem, FormulaLiteral formula) { if (formula.HasValue) { this._SetFormula(st, streamitem, formula); } }
protected void _SetFormula(StreamType st, SIDSRC streamitem, FormulaLiteral formula) { this.CheckFormulaIsNotNull(formula.Value); var rec = new UpdateRecord(st, streamitem, formula.Value); this._add_update(rec); }
internal UpdateRecord(StreamType st, SIDSRC sidsrc, string result, IVisio.VisUnitCodes unit_code) { this.SIDSRC = sidsrc; this.Formula = null; this.UnitCode = unit_code; this.ResultNumeric = 0.0; this.ResultString = result; this.UpdateType = UpdateType.ResultString; this.StreamType = st; }
internal UpdateRecord(StreamType st, SIDSRC sidsrc, string formula) { this.SIDSRC = sidsrc; this.Formula = formula; this.ResultNumeric = 0.0; this.ResultString = null; this.UnitCode = IVisio.VisUnitCodes.visNumber; this.UpdateType = UpdateType.Formula; this.StreamType = st; }
private short [] build_stream() { var st = this._first_update.Value.StreamType; if (st == StreamType.SRC) { var streamb = new List <SRC>(this._updates.Count); streamb.AddRange(this._updates.Select(i => i.SIDSRC.SRC)); return(SRC.ToStream(streamb)); } else { var streamb = new List <SIDSRC>(this._updates.Count); streamb.AddRange(this._updates.Select(i => i.SIDSRC)); return(SIDSRC.ToStream(streamb)); } }
public void PasteFormat(IVisio.Page page, IList <int> shapeids, FormatCategory category, bool applyformulas) { // Find all the cells that are going to be pasted var matching_cells = this.Cells.Where(c => c.MatchesCategory(category)).ToArray(); // Apply those matched cells to each shape var writer = new FormulaWriterSIDSRC(); foreach (var shape_id in shapeids) { foreach (var cell in matching_cells) { var sidsrc = new VisioAutomation.ShapeSheet.SIDSRC((short)shape_id, cell.SRC); var new_formula = applyformulas ? cell.Formula : cell.Result; writer.SetFormula(sidsrc, new_formula); } } writer.Commit(page); }
public void SetFormulaIgnoreNull(short id, SRC src, FormulaLiteral formula) { var sidsrc = new SIDSRC(id, src); this._SetFormulaIgnoreNull(StreamType.SIDSRC, sidsrc, formula); }
public void SetFormula(short shapeid, SRC src, FormulaLiteral formula) { var streamitem = new SIDSRC(shapeid, src); this._SetFormula(StreamType.SIDSRC, streamitem, formula); }
public void SetFormula(SIDSRC streamitem, FormulaLiteral formula) { this._SetFormula(StreamType.SIDSRC, streamitem, formula); }
public void SetResult(SIDSRC streamitem, string value, IVisio.VisUnitCodes unitcode) { this._SetResult(StreamType.SIDSRC, streamitem, value, unitcode); }
public void SetResult(short shapeid, SRC src, string value, IVisio.VisUnitCodes unitcode) { var streamitem = new SIDSRC(shapeid, src); this._SetResult(StreamType.SIDSRC, streamitem, value, unitcode); }
protected void _SetResult(StreamType st, SIDSRC streamitem, string value, IVisio.VisUnitCodes unitcode) { var rec = new UpdateRecord(st, streamitem, value, unitcode); this._add_update(rec); }
public void AddCell(short id, VisioAutomation.ShapeSheet.SRC src) { var sidsrc = new VisioAutomation.ShapeSheet.SIDSRC(id, src); this.SIDSRCs.Add(sidsrc); }
public void SetFormula(short id, VisioAutomation.ShapeSheet.SRC src, string formula) { var sidsrc = new VisioAutomation.ShapeSheet.SIDSRC(id, src); this.formula_writer.SetFormula(sidsrc, formula); }