翻譯|行業資訊|編輯:胡濤|2023-09-12 11:10:50.623|閱讀 229 次
概述:在本文中,我們已經介紹了部分產stimulsoft控件的激活方式,接下來繼續向您介紹后續部分~
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
在上篇文章《報表工具Stimulsoft 激活集合,涵蓋大部分控件激活方式(上)》在本文中,我們已經介紹了部分產stimulsoft控件的激活方式,接下來繼續向您介紹后續部分~
需要訂閱:
在頁面初始化事件中激活許可證。
Index.razor
@using Stimulsoft.Report @using Stimulsoft.Report.Blazor @using Stimulsoft.Report.Web <StiBlazorViewer /> @code { protected override void OnInitialized() { //Activation using license code Stimulsoft.Base.StiLicense.Key = "Your activation code..."; base.OnInitialized(); } }
需要訂閱:
在控制器構造函數中激活許可證。
ViewerController.cs
//Activation using license code public class ViewerController : Controller { public ViewerController() { Stimulsoft.Base.StiLicense.Key = "Your activation code..."; } } //Activation using license file public class ViewerController : Controller { public ViewerController(IWebHostEnvironment hostEnvironment) { var path = Path.Combine(hostEnvironment.ContentRootPath, "Content\\license.key"); Stimulsoft.Base.StiLicense.LoadFromFile(path); } }
需要訂閱:
在使用查看器和設計器創建、加載和構建報告之前激活許可證。
index.html
function Start() { //Activation using license code Stimulsoft.Base.StiLicense.key = "Your activation code..."; //Activation using license file Stimulsoft.Base.StiLicense.loadFromFile("license.key"); }
需要訂閱:
在事件處理程序中激活許可證。
index.php
//Activation using license code <?php $handler = new \Stimulsoft\StiHandler(); $handler->license->setKey('Your activation code...'); $handler->renderHtml(); ?> //Activation using license file <?php $handler = new \Stimulsoft\StiHandler(); $handler->license->setFile('license.key'); $handler->renderHtml(); ?>
項目頁面上存在使用 JavaScript 代碼下載許可證密鑰的選項。在創建、加載和呈現報表之前以及使用查看器和設計器之前,有必要添加此代碼。
index.html
function Start() { //Activation using license code Stimulsoft.Base.StiLicense.key = "Your activation code..."; //Activation using license file Stimulsoft.Base.StiLicense.loadFromFile("license.key"); }
需要訂閱:
在使用查看器和設計器之前,使用字符串許可證密鑰或使用許可證密鑰文件(例如 *.jsp 文件中的許可證密鑰文件)激活許可證。
需要訂閱:
在控制器的靜態構造函數中激活許可證。
HomeController.cs
//Activation using license code public class HomeController : Controller { static HomeController() { Stimulsoft.Base.StiLicense.Key = "Your activation code..."; } } //Activation using license file public class HomeController : Controller { public HomeController(IHostingEnvironment hostEnvironment) { var path = Path.Combine(hostEnvironment.ContentRootPath, "Content\\license.key"); Stimulsoft.Base.StiLicense.LoadFromFile(path); } }
想要了解Stimulsoft Reports 報價信息的朋友,歡迎咨詢。
加入官方社群:740060302,歡迎相互交流
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn