//Записывает в текущую ячейку значение свойства выделенного параметра, field - имя поля //Транзакция создается из одной ячейки и добавляется в Transactions public void WriteValue(LinkField field, Transaction tlist) { try { if (!GeneralRep.CheckOneSheet(true)) { return; } var v = CurParam.GetField(field); var shape = _book.ActiveShape(); if (shape == null) { Range cell = GeneralRep.Application.ActiveCell; var t = new TransactionCell(cell) { NewValue = v, Value = v }; tlist.AddCell(t); } else if (shape.Type == MsoShapeType.msoTextBox) { var t = new TransactionShape(shape) { NewValue = v, Value = v }; tlist.AddShape(t); } } catch {} }
//Добавление фигуры в транзакцию public void AddShape(TransactionShape shape) { if (shape.NewLink != shape.OldLink || shape.NewValue != shape.OldValue) { TrShape = shape; } }
//Добавляет примечание comment в фигуру private void AddShapeLink(string comment, Transaction tlist, Shape shape) { var t = new TransactionShape(shape) { NewLink = comment }; shape.Title = comment; tlist.AddShape(t); GetCurrentLink(comment, shape.Name); }