使用 IronPPT 授權金鑰
如何取得授權金鑰
添加 IronPPT 授權金鑰後,您即可無限制且無浮水印地將專案部署至生產環境。
您可在此購買授權金鑰,或註冊免費 30天試用金鑰。
步驟 1:下載 IronPPT 最新版本
步驟 2:套用您的授權金鑰
使用程式碼設定您的授權
請在使用任何 IronPPT 功能之前,將此程式碼片段加入應用程式的啟動區段(例如 Program.cs 或 Startup.cs)。
:path=/static-assets/ppt/content-code-examples/how-to/license-keys-apply.cs
// This line of code is setting the license key for the IronPPT library.
// Ensure that you have a valid license key provided by IronPPT to avoid any licensing issues.
// The line below should typically be at the start of your application
// initialization process to ensure that the library is appropriately licensed
// before any library functions are utilized. Ensure that the IronPPT
// namespace and relevant assemblies are referenced in your project.
IronPPT.License.LicenseKey = "IRONPPT.MYLICENSE.KEY.1EF01";
' This line of code is setting the license key for the IronPPT library.
' Ensure that you have a valid license key provided by IronPPT to avoid any licensing issues.
' The line below should typically be at the start of your application
' initialization process to ensure that the library is appropriately licensed
' before any library functions are utilized. Ensure that the IronPPT
' namespace and relevant assemblies are referenced in your project.
IronPPT.License.LicenseKey = "IRONPPT.MYLICENSE.KEY.1EF01"
使用 .NET Core appsettings.json 檔案設定您的授權金鑰
若要在 .NET Core 應用程式中全域套用授權金鑰,請依照以下步驟操作:
- 在專案的根目錄中新增一個名為
appsettings.json的 JSON 檔案。 - 在您的 JSON 設定檔中新增
IronPPT.LicenseKey項目,並將其值設定為您的特定授權金鑰。 - 請確保檔案屬性包含 複製至輸出目錄:始終複製。
檔案:appsettings.json
{
"IronPPT.LicenseKey": "IronPPT.MYLICENSE.KEY.1EF01"
}
步驟 3:驗證您的授權金鑰
驗證已安裝的授權金鑰
若要驗證授權金鑰是否已正確套用,請檢查 IsLicensed 屬性。 請使用以下程式碼片段:
:path=/static-assets/ppt/content-code-examples/how-to/license-keys-is-licensed.cs
// This code snippet checks whether the IronPPT license key has been successfully applied.
// It retrieves the license status using the IronPPT library's License class.
// Declaration and initialization of a boolean variable to store the license status
bool licensed = IronPPT.License.IsLicensed;
// It is assumed that the IronPPT library is correctly referenced,
// and that the license information has been set prior to this check.
// This boolean will be true if the license is applied correctly; otherwise, it will be false.
// The code below demonstrates how you might use this information in a larger application.
if (licensed)
{
Console.WriteLine("The IronPPT license has been successfully applied.");
}
else
{
Console.WriteLine("The IronPPT license is not applied. Please verify the license details.");
}
' This code snippet checks whether the IronPPT license key has been successfully applied.
' It retrieves the license status using the IronPPT library's License class.
' Declaration and initialization of a boolean variable to store the license status
Dim licensed As Boolean = IronPPT.License.IsLicensed
' It is assumed that the IronPPT library is correctly referenced,
' and that the license information has been set prior to this check.
' This boolean will be true if the license is applied correctly; otherwise, it will be false.
' The code below demonstrates how you might use this information in a larger application.
If licensed Then
Console.WriteLine("The IronPPT license has been successfully applied.")
Else
Console.WriteLine("The IronPPT license is not applied. Please verify the license details.")
End If
驗證授權金鑰
請使用此程式碼片段確認您的授權或試用金鑰是否有效:
:path=/static-assets/ppy/content-code-examples/how-to/license-keys-is-valid.cs
// 此程式碼片段無法顯示!
' 此程式碼片段無法顯示!
若回傳值為 true,表示該金鑰有效,您可以繼續使用 IronPPT。 若回傳 false,表示該金鑰無效。
步驟 4:開始您的專案
若要開始使用 IronPPT,我們強烈建議您參閱我們的完整教學指南《IronPPT 入門指南》。 本教學提供詳細的說明與範例,協助您掌握使用 IronPPT 的基礎知識。
有任何疑問或需要支援嗎?
若要在實際專案中使用 IronPPT,您需要付費或試用授權金鑰,可透過購買授權取得。 請點擊此連結申請試用授權。
如需查閱完整的程式碼範例、教學指南、授權詳情及詳盡文件,請造訪我們網站上的 IronPPT 專區。
如有任何疑問,歡迎隨時聯繫我們support@ironsoftware.com。/support@ironsoftware.com
常見問題
如何下載 C# 簡報函式庫的最新版本?
如需下載 C# 簡報庫的最新版本,請造訪 IronPPT 網站,並依照授權頁面上的下載說明進行操作。
在 C# 專案中套用授權金鑰的步驟為何?
要在 C# 專案中套用授權金鑰,您可以將程式碼片段新增至啟動檔案(例如 Program.cs 或 Startup.cs),或使用 appsettings.json 檔案將金鑰整合至 .NET Core 應用程式中。
如何確認我的授權金鑰是否已正確安裝?
您可以透過檢查程式碼中的 IsLicensed 屬性來驗證授權金鑰的安裝狀態。若其返回 true,表示授權已正確安裝。
如果我的授權金鑰無效,該怎麼辦?
若您的授權金鑰無效,請先確認輸入是否正確。請使用 IsValid 屬性檢查其有效性。若問題仍未解決,請聯絡 Iron Software 技術支援以獲取協助。
我可以使用 appsettings.json 檔案來套用授權金鑰嗎?
是的,您可以透過 appsettings.json 檔案套用授權金鑰,方法是新增 IronPPT.LicenseKey 項目,並將其值設定為您的特定授權金鑰。
哪裡可以找到關於如何使用 C# 簡報庫的教學?
IronPPT 網站上提供了一份關於如何使用 C# 簡報庫的完整教學指南,其中包含詳細的說明與範例,協助您開始使用 IronPPT。
購買授權後包含哪些支援服務?
購買授權即包含一年的技術支援與更新服務。如有任何疑問或問題,請聯絡 support@ironsoftware.com。
C# 簡報庫是否有提供免費試用版?
是的,提供 30 天免費試用授權金鑰。您可造訪 IronPPT 網站上的試用授權頁面取得。
IronPPT 是否相容於 .NET 10?
是的 — IronPPT 支援 .NET 10。它相容於 .NET Core 10,以及 .NET Core 9、8、7、6,還有 .NET Standard 2.0+ 和 .NET Framework 4.6.2+。([ironsoftware.com](https://ironsoftware.com/csharp/ppt/?utm_source=openai))

