.NET圖表控件(LightningChart )的用法

概述

LightningChart (LightningChart Ultimate) 軟件開發工具包是微軟Visual Studio 的一個插件,專攻大數據可視化呈現問題,用於 WPF(Windows Presentation Foundation)和 Windows Forms .NET 平臺。

Arction 公司的組件主要爲具有嚴謹的科學,工程,測量和交易提供解決方案,特別專注於產品的執行性能和先進的功能。

LightningChart 組件使用低級 DirectX9 和 DirectX11 GPU 加速,而不是較慢的 GDI / GDI +或 WPF Graphics APIs。當 GPU 無法訪問或沒有顯卡的情況下,例如在某些虛擬機中, LightningChart WARP 將自動渲染軟件。

 

1.   安裝

 

1.1安裝前請確保您的電腦配置符合以下要求:

 

DirectX 9.0c (shader model 3) 圖形適配器或更新版本,或DirectX11兼容操作系統,用於沒有顯卡硬件時的渲染。推薦使用DirectX11兼容顯卡硬件。

Windows Vista, 7, 8 ,10(支持32 位或64 位), Windows Server 2008 R2 或更高。

Visual Studio 2010, 2012, 2013, 2015, 或2017,對部署無要求。

.NET框架v. 4.0或更新版本

 

1.2 運行安裝嚮導

右鍵單擊 setup.exe。 安裝程序會將組件安裝到 Visual Studio 工具箱中。 此外,它還會安裝相關聯的幫助文件。 如果組件或幫助文件安裝失敗,請按照以下部分(1.3) 的說明手動安裝。

 

1.3   手動將 LightningChart 組件添加至 Visual Studio Toolbox工具中

 

WinForms

 

(1)    啓動 Visual studio,創建一個新的 WinForms 項目,右擊工具箱,選擇 Add Tab,並命名爲“Arction”。

 

(2) 右擊 Arction 標籤,選擇 Choose Items…

(3) 在 Choose Toolbox items 窗口中,選中.NET Framework components框架組件頁面,點擊 Browse…

 

瀏覽Arction.WinForms.Charting.LightningChartUltimate.dll和Arction.WinForms.SignalProcessing.SignalTools.dll,從文件中安裝組件,通常在 c:\program files (x86)\Arction\LightningChart Ultimate SDK v.7\LibNet4,單擊打開。現在可在工具箱中找到組件。

 

WPF

 

(1) 打開 Visual Studio,創建一個新的 WPF 程序,右擊工具箱,選擇 Add Tab 並命名爲“Arction”

(2) 右擊 Arction 標籤,選擇 Choose Items…

(3) 在 Choose Toolbox items 窗口中,選中.NET Framework components 頁面,點擊 Browse…

 

瀏覽Arction.Wpf.Charting.LightningChartUltimate.dll、

Arction.Wpf.SemibindableCharting.LightningChartUltimate.dll、

Arction.Wpf.BindableCharting.LightningChartUltimate.dll 和

Arction.Wpf.SignalProcessing.SignalTools.dll, 在安裝的文件夾中, 通常在 c:\program files (x86)\Arction\LightningChart Ultimate SDK v.7\LibNet4 中,   單擊打開。

現在可在工具箱中找到組件。

 

 2.       許可證管理

 

2.3   添加許可證

 

通過運行 License Manager 應用程序來管理許可證,在Windows 的開始菜單程序中找到      / Arction / LightningChart Ultimate SDK / License Manager

Arction 公司的組件使用許可證密鑰保護系統。您只有在使用有效許可證時才能使用組件。許可證包含以下信息:

  • •啓用功能,如 ViewXY,View3D,ViewPie3D,Maps,ViewPolar,ViewSmith,Volume

渲染,信號工具

  • •WPF / WinForms /同時使用兩者
  • •許可證可以在多少臺電腦上激活(標準配置爲 1 臺)。
  • •訂購到期日(結束版本更新和技術支持)
  • •技術支持包容性
  • •開發者許可證或浮動許可證
  • •學生許可證

 

當您將 Arction 組件從 Toolbox 拖到應用程序中時,您可能會被要求在許可證管理器窗口中提供許可證密鑰。請添加您收到的所有許可證密鑰。 單擊Add from a file查看.alf 文件。

 

 

圖2-1.在 LicenseManager 中添加許可證密鑰。

 

添加許可證後,每個開發人員的許可證都將通過網絡在Arction License Server服務器自動激活。

 

在沒有互聯網連接的情況下,請使用“Activate / Deactivate via e-mail””功能進行郵件激活。

 

 

圖 2-3。通過電子郵件離線激活許可證。

 

按照屏幕上的說明,向 Arction 授權團隊發送電子郵件: [email protected]

 

 Arction 收到電子郵件後,將提供如何安裝離線許可證的說明指導。

 

 注:通過手機啓動/禁用不可行,因爲密鑰代碼包含數千個字符。

 注:從 LightningChart v.7.1 起,ChartManager 組件不再需要許可證密鑰。

 

注:從 LightningChart v.8.0 起,不支持 LIC 格式的許可證授權,提供 ALF 文件許可證授權。 如果您沒有收到 ALF 文件許可證,請聯繫 Arction。

 

2.2 刪除許可證

 

在有網絡的情況下,許可證可以通過點擊“Remove”按鈕從系統中刪除。如果沒有互聯網連接接,請使用“Activate / Deactivate via e-mail”功能, 使用Mode = Deactivate。

 

許可證被刪除後,可以將其安裝到另一臺計算機上使用。

 

 2.3 提取部署密鑰 (Deployment Key)

 

爲了能夠將 Lightning Chart 應用程序應用到您所部署軟件的計算機上,必須在代碼中應用部署密鑰。 請點擊(Copy deployment key to Clipboard)複製部署鍵到剪貼板按鈕從許可證密鑰中提取部署密鑰。

 

 2.4 在您的應用程序中使用部署密鑰

 

 在代碼中,爲組件使用靜態 SetDeploymentKey 方法。 例如:

 

WinForms

 

在使用組件之前,調用 SetDeploymentKey 方法。 例如: 在主要(Main)方法的開頭,或在表單(Form)或用戶 控件(UserControl)的構造函數之中。 以下是一個在Main方法的開頭如何應用的示例。

using System;

using System.Collections.Generic;

using System.Linq;

using System.Windows.Forms;

namespace WindowsFormsApplication1

{

static class Program

{

 /// <summary>

 /// The main entry point for the application.

 /// </summary>

 [STAThread]

 static void Main()

 {

 //Set Deployment Key for Arction components

 string deploymentKey = "VMalgCAAO6kO1RgiNIBJABVcG.R..Kikfd...";

 Arction.WinForms.Charting.LightningChartUltimate.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);

 Application.EnableVisualStyles();

 Application.SetCompatibleTextRenderingDefault(false);

 Application.Run(new Form1());

 }

 }

}

 

 

WPF

 

 在使用組件之前,調用 SetDeploymentKey 方法。 例如: 在App class constructor的開頭, 或在 Window 或UserControl中。 以下是一個如何在 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>

 /// Interaction logic for App.xaml

 /// </summary>

 public partial class App : Application

 {

 public App()

 {

 //Set Deployment Key for Arction components

 string deploymentKey = "lfngCAAO6kOfjh…";

//Set Deployment Key for fully bindable chart, if you use it

Arction.Wpf.BindableCharting.LightningChartUltimate

.SetDeploymentKey(deploymentKey);

//Set Deployment Key for semi-bindable chart, if you use it

Arction.Wpf.SemibindableCharting.LightningChartUltimate

.SetDeploymentKey(deploymentKey);

//Set Deployment Key for non-bindable chart, if you use it

Arction.Wpf.Charting.LightningChartUltimate

.SetDeploymentKey(deploymentKey);

 SignalGenerator.SetDeploymentKey(deploymentKey);

 AudioInput.SetDeploymentKey(deploymentKey);

 AudioOutput.SetDeploymentKey(deploymentKey);

 SpectrumCalculator.SetDeploymentKey(deploymentKey);

 SignalReader.SetDeploymentKey(deploymentKey);

 }

 }

}

 

 

 

注意!在應用程序中沒有設置部署密鑰時,將自動轉成 30 天試用模式。

 

2.5 運行調試

 

在部署密鑰設置正確的情況下,在Visual Studio中 通過調試器來運行項目。如果從系統中找不到開發許可證密鑰時,圖表進入慢渲染模式,最大 FPS 爲〜1,同時圖表顯示文本消息。

 

在無開發許可密匙時,禁止使用 LightningChart 直接開發和調試。

 

2.6 試用期

 

試用期爲 30 天,之後,您必須購買許可證才能繼續使用本產品。許可證生效後,所有通過試用版創建的項目也將自動更新到新的授權中。當運行使用試用許可證構建的圖表應用程序時,您將看到一個試用版 nag 水印消息。

 

2.7 浮動許可證(Floating licenses)

 

浮動許可證可以安裝到無限數量的計算機上,由 Arction 公司配置併發開發人員數。允許併發用戶同時使用LightningChart。在一個開發人員完成 LightningChart 開發之後,到另一個開發人員開始使用之前,大約需間隔 10-15 分鐘時間。

 

必須設置與開發人員許可證相同的部署密鑰。

 

默認情況下,浮動許可證由 Arction 公司的許可證服務器(Arction Licensing Server)控制。 開發時需要連續的網絡連接。

 

Arction提供浮動許可證客戶端控制(Customer-side floating license controller)。也就是用來開發的計算機通過連接客戶公司局域網來運行。不會出現與 Arction 公司或其他各方的在線溝通情況。 通過許可證,Arction 公司提供了安裝控制器服務和浮動許可證的單獨說明。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章