翻譯|行業資訊|編輯:胡濤|2023-09-12 10:43:27.780|閱讀 291 次
概述:在本文中,我們將討論如何通過指定許可證密鑰來激活組件。我們將考慮各種平臺和框架的激活示例及其功能。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
對于 JS 組件,可以生成鏈接到特定域名的許可證密鑰。該許可證密鑰不會激活任何其他域名上的 Stimulsoft 組件。
在今天的文章中,我們將討論利用儀表板中的 SumIf() 和 CountIf() 函數進行數據分析的功能。這些函數用于對數據字段值求和或根據特定條件對值的出現次數進行計數。在本文中,我們的重點將是這些函數在 Table 元素中的應用。但得注意的是,它們同樣適用于執行數據分析的其他儀表板元素。在進行全面回顧之前,讓我們花點時間回顧一下如何在儀表板中處理數據字段值。
完整的激活方法取決于組件及其運行的框架。在大多數情況下,您可以使用文件或字符串中的密鑰激活組件。然而,對于某些報告組件,激活選項還包括字節數組、流或程序集的利用。
需要訂閱:
請在初始化組件之前使用表單方法激活許可證。
Form1.cs
public partial class Form1 : Form { public Form1() { //Activation with using license code Stimulsoft.Base.StiLicense.Key = "Your activation code..."; //Activation with using license file Stimulsoft.Base.StiLicense.LoadFromFile("license.key"); //Activation from byte array Stimulsoft.Base.StiLicense.LoadFromBytes(bytes); //Activation from stream Stimulsoft.Base.StiLicense.LoadFromStream(stream); //Activation from assembly Stimulsoft.Base.StiLicense.LoadFromEntryAssembly(assembly, "stimulsoft-license.key"); InitializeComponent(); } }
需要訂閱:
在初始化組件之前,在 MainWindow 方法中激活許可證。
MainWindows.xaml.cs
public partial class MainWindow : Window { public MainWindow() { //Activation with using license code Stimulsoft.Base.StiLicense.Key = "Your activation code..."; //Activation with using license file Stimulsoft.Base.StiLicense.LoadFromFile("license.key"); //Activation from byte array Stimulsoft.Base.StiLicense.LoadFromBytes(bytes); //Activation from stream Stimulsoft.Base.StiLicense.LoadFromStream(stream); //Activation from assembly Stimulsoft.Base.StiLicense.LoadFromEntryAssembly(assembly, "stimulsoft-license.key"); InitializeComponent(); } }
需要訂閱:
在類的靜態構造函數中激活許可證。
Default.aspx.cs
public partial class _Default : Page { static _Default() { //Activation with using license code Stimulsoft.Base.StiLicense.Key = "Your activation code..."; //Activation with using license file var path = HttpContext.Current.Server.MapPath("license.key"); Stimulsoft.Base.StiLicense.LoadFromFile(path); } }
需要訂閱:
在控制器的靜態構造函數中激活許可證。
HomeController.cs
public class HomeController : Controller { static HomeController() { //Activation using license code Stimulsoft.Base.StiLicense.Key = "Your activation code..."; //Activation using license file var path = System.Web.HttpContext.Current.Server.MapPath("~/Content/license.key"); Stimulsoft.Base.StiLicense.LoadFromFile(path); } }
需要訂閱:
在控制器的靜態構造函數中激活許可證。
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); } }
需要訂閱:
在頁面的靜態構造函數中激活許可證。
Index.cshtml.cs
//Activation using license code public class IndexModel : PageModel { static IndexModel() { Stimulsoft.Base.StiLicense.Key = "Your activation code..."; } } //Activation using license file public class IndexModel : PageModel { public IndexModel(IWebHostEnvironment webHostEnvironment) { var path = Path.Combine(webHostEnvironment.ContentRootPath, "Content\\license.key"); Stimulsoft.Base.StiLicense.LoadFromFile(path); } }
Blazor Server 的報告和儀表板工具
需要訂閱:
在頁面初始化事件中激活許可證。
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..."; //Activation using license file Stimulsoft.Base.StiLicense.LoadFromFile("Content/license.key"); base.OnInitialized(); } }
繼續瀏覽《報表工具Stimulsoft 激活集合,涵蓋大部分控件激活方式(下)》
想要了解Stimulsoft Reports 報價信息的朋友,歡迎咨詢。
加入官方社群 740060302,歡迎相互交流
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn