Permission.StoreLicenses 属性

定义

获取或设置一个值,指示是否缓存用户查看当前表单的许可,以允许在用户无法连接到权限管理服务器时脱机查看。

public:
 property bool StoreLicenses { bool get(); void set(bool value); };
public bool StoreLicenses { get; set; }
member this.StoreLicenses : bool with get, set
Public Property StoreLicenses As Boolean

属性值

如果缓存用户的许可以便允许脱机查看,则为 true;否则,为 false

示例

在以下示例中,StoreLicenses 属性被设置为 false,然后显示了该属性的当前值。

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisDoc.Permission.StoreLicenses = false;
thisXDocument.UI.Alert(this.Permission.StoreLicenses.ToString());
Dim thisDoc As _XDocument3 = DirectCast(thisXDocument, _XDocument3)
thisDoc.Permission.StoreLicenses = False
thisXDocument.UI.Alert(Me.Permission.StoreLicenses.ToString())

注解

与“权限”对话框内“要求连线验证用户权限”复选框的设置一致。 如果 StoreLicences 属性的设置为 true,则清除该复选框并且在本地缓存用户的许可。 如果该设置为 false,则选中该复选框,这样表单所有者之外的用户每次打开表单时,都必须连接到权限管理服务器并获得使用该表单的许可。

由于 Permission 对象及其成员对 Microsoft InfoPath 不熟悉,因此必须将 thisXDocument 变量返回的对象强制转换为 _XDocument3 类型才能访问此对象及其成员。 有关详细信息,请参阅如何:使用与 InfoPath 2003 不兼容的对象模型成员。

此成员只能由与当前打开的表单在相同域中运行的表单访问,或者由已授予跨域权限的表单访问。

适用于