图表控件LightningChart.NET 系列教程(六):许可证管理介绍(中)

LightningChart.NET SDK 是一款高性能数据可视化插件工具,由数据可视化软件组件和工具类组成,可支持基于 Windows 的用户界面框架(Windows Presentation Foundation)、Windows 通用应用平台(Universal Windows Platform)和 Windows Forms.NET 平台。

LightningChart® .NET | 下载试用(qun:740060302)icon-default.png?t=M85Bhttps://www.evget.com/product/3309/download

在 LightningChart .NET系列教程中,上一章我们介绍了许可证管理的前三部分内容,包括“添加许可证”、“删除许可证”、“更新许可证”,本次将详细介绍许可证管理的另一部分内容,包括“提取部署密钥”、在应用程序中应用部署密钥”两部分内容。

四、提取部署密钥

要在配置了该软件的计算机中运行 LightningChart 应用程序,必须以代码形式应用部署密钥。部署密钥可以通过点击“Copy deployment key to Clipboard”按钮从许可证密钥中提取。

图 4-5. 将部署密钥复制到 License Manager 的剪贴板

五、在应用程序中应用部署密钥

在代码中,使用需要的组件时需要用到静态 SetDeploymentKey 方法。用不到的组件则不需要设置密钥(例如,在无绑定应用程序中为全绑定图表设置密钥)。在需要使用组件之前,在某处调用 SetDeploymentKey 方法。调用 SetDeploymentKey 的最佳位置是使用图表的类的静态构造函数,或者在应用程序的主类中。

更多有关发布的详细介绍,请参阅第 299 章。

WinForms

以下示例展示了如何在 Program 类的静态构造函数方法(默认为每个 WinForms 应用程序创建的)上应用密钥。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
static class Program
{
static Program()
{
 //为Arction组件设置部署密钥
 string deploymentKey = "VMalgCAAO6kO1RgiNIBJABVcG.R..Kikfd...";
 Arction.WinForms.Charting.LightningChart.SetDeploymentKey(deploymentKey);
 Arction.WinForms.SignalProcessing.SignalGenerator.SetDeploymentKey(deploymentKey);
 Arction.WinForms.SignalProcessing.AudioInput.SetDeploymentKey(deploymentKey);
 Arction.WinForms.SignalProcessing.AudioOutput.SetDeploymentKey(deploymentKey);
 Arction.WinForms.SignalProcessing.SpectrumCalculator.SetDeploymentKey(deploymentKey);
 Arction.WinForms.SignalProcessing.SignalReader.SetDeploymentKey(deploymentKey);
}
// 其余的类
}
}

WPF
以下示例展示了如何在 App 类的静态构造函数中,在 App.xaml.cs 开头应用密钥。

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using Arction.Wpf.SignalProcessing;
namespace WpfApplication1
{
 /// <summary>
 ///用于App.xaml的交互逻辑
 /// </summary>
 public partial class App : Application
 {
static App()
{
// 为 Arction 组件设置部署密钥
string deploymentKey = "- DEPLOYMENT KEY FROM LICENSE MANAGER
 GOES HERE-";
// 为全绑定图表设置部署密钥
Arction.Wpf.ChartingMVVM.LightningChart
.SetDeploymentKey(deploymentKey);
// 为无绑定图表设置部署密钥
Arction.Wpf.Charting.LightningChart
.SetDeploymentKey(deploymentKey);
// 为其他 Arction 组件设置部署密钥
SignalGenerator.SetDeploymentKey(deploymentKey);
AudioInput.SetDeploymentKey(deploymentKey);
AudioOutput.SetDeploymentKey(deploymentKey);
SpectrumCalculator.SetDeploymentKey(deploymentKey);
SignalReader.SetDeploymentKey(deploymentKey);
}
 }
}

在 UWP 应用中,可以使用开发者密钥或部署密钥,但不能同时使用。在开发和调试 app 时使用开发者密钥,在部署 app 时使用部署密钥。

值得注意的是,如果未能在应用程序中设置部署密钥,目标计算机中的 LightningChart 应用程序将会转成为期 30 天的试用模式(适用于尚未安装开发许可密钥的计算机)。

今天关于LightningChart中许可证管理的介绍到这里了,点击查看LightningChart系列教程

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值