35 lines
991 B
C#
35 lines
991 B
C#
using System;
|
|
|
|
namespace EasyChart
|
|
{
|
|
public static class ProPackage
|
|
{
|
|
private static bool? s_isInstalled;
|
|
|
|
public static bool IsInstalled
|
|
{
|
|
get
|
|
{
|
|
if (s_isInstalled.HasValue) return s_isInstalled.Value;
|
|
const string bootstrapTypeName = "EasyChart.Pro.EasyChartProBootstrap";
|
|
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
|
|
for (int i = 0; i < assemblies.Length; i++)
|
|
{
|
|
var assembly = assemblies[i];
|
|
if (assembly == null) continue;
|
|
|
|
var type = assembly.GetType(bootstrapTypeName, false);
|
|
if (type != null)
|
|
{
|
|
s_isInstalled = true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
s_isInstalled = false;
|
|
return s_isInstalled.Value;
|
|
}
|
|
}
|
|
}
|
|
}
|