• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

图表控件LightningChart.NET 系列教程六许可证管理

武飞扬头像
慧都科技3D
帮助1

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

LightningChart® .NET | 下载试用(qun:740060302)学新通https://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系列教程

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfjbaci
系列文章
更多 icon
同类精品
更多 icon
继续加载