[]
        
(Showing Draft Content)

GrapeCity.Forguncy.Plugin.IReferenceFormula

接口 IReferenceFormula

如果插件中引用了页面中的单元格,一旦被引用的单元格的位置发生了变化,如拖拽,那么插件中的相关单元格引用也应该被同步;

这种情况下就需要实现这个接口,而且,当查找页面中的单元格引用时,插件中的相关属性也会被查找出来。

命名空间: GrapeCity.Forguncy.Plugin
程序集: GrapeCity.Forguncy.Plugin.dll
语法
public interface IReferenceFormula
示例
public class MyCellType : CellType, IReferenceFormula
{
    [FormulaProperty]
    public object ReferCell { get; set; }

    public IEnumerable<LocatedObject<object>> GetFormulaReferObjects(LocationIndicator location)
    {
        var newLocation = location.AppendProperty("MyCellType").AppendProperty("ReferCell");
        yield return new LocatedObject<object>(this.ReferCell, newLocation);
    }
}

方法

GetFormulaReferObjects(LocationIndicator)

获取插件中所有引用单元格或单元格区域的公式对象。

声明
IEnumerable<LocatedObject<object>> GetFormulaReferObjects(LocationIndicator location)
参数
类型 名称 描述
LocationIndicator location

坐标定位器。

返回值
类型 描述
System.Collections.Generic.IEnumerable<T><LocatedObject<object>>

返回所有引用单元格或单元格区域的公式对象。