本文整理汇总了C#中EA.IsTechnologyEnabled方法的典型用法代码示例。如果您正苦于以下问题:C# EA.IsTechnologyEnabled方法的具体用法?C# EA.IsTechnologyEnabled怎么用?C# EA.IsTechnologyEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EA
的用法示例。
在下文中一共展示了EA.IsTechnologyEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadMdgSearches
/// <summary>
/// Loads the Searches described in the MDG file into the includable scripts
/// </summary>
/// <param name="rep"></param>
/// <param name="mdgXmlContent">the string content of the MDG file</param>
static void LoadMdgSearches(EA.Repository rep, string mdgXmlContent)
{
try
{
var mdg = XElement.Parse(mdgXmlContent);
// get MDG data (ID, Name)
string id = "My EA Searches";
//string name = "";
//string notes = "";
XElement documentation = mdg.Element("Documentation");
// Not part of a MDG
if (documentation != null)
{
id = documentation.Attribute("id").Value;
//name = documentation.Attribute("name").Value;
//notes = documentation.Attribute("notes").Value;
// check if Technology is enabled
if (rep.IsTechnologyEnabled(id) == false && rep.IsTechnologyLoaded(id)) return;
}
//----------------------------------------
// Get all searches
var searches = from search in mdg.Descendants("Search")
select search;
foreach (XElement search in searches)
{
string searchName = search.Attribute("Name").Value;
_staticAllSearches.Add(new EaSearchItem(id, searchName));
}
}
catch (Exception e)
{
MessageBox.Show(@"", @"Error in loadMDGScripts: " + e.Message);
}
}