public static GetCustomAttribute ( Assembly element, |
||
element | Assembly | |
attributeType | ||
return |
public static Attribute GetCustomAttribute(Assembly element, Type attributeType)
{
return GetCustomAttribute (element, attributeType, true);
}
Attribute::GetCustomAttribute ( Assembly element, |
|
Attribute::GetCustomAttribute ( MemberInfo element, |
|
Attribute::GetCustomAttribute ( MemberInfo element, |
|
Attribute::GetCustomAttribute ( Module element, |
|
Attribute::GetCustomAttribute ( Module element, |
|
Attribute::GetCustomAttribute ( ParameterInfo element, |
|
Attribute::GetCustomAttribute ( ParameterInfo element, |
/// <summary> /// This method is called by Inventor when it loads the addin. /// The AddInSiteObject provides access to the Inventor Application object. /// The FirstTime flag indicates if the addin is loaded for the first time. /// </summary> /// <param name="addInSiteObject"></param> /// <param name="firstTime"></param> public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime) { try { InventorApplication = addInSiteObject.Application; //retrieve the GUID for this class and assign it to the string member variable //intended to hold it GuidAttribute addInClsid = (GuidAttribute)Attribute.GetCustomAttribute (typeof(StandardAddInServer), typeof(GuidAttribute)); string addInClsidString = "{" + addInClsid.Value + "}"; AddInServerId = addInClsidString; //Set a reference to the user interface manager to determine the interface style UserInterfaceManager userInterfaceManager = InventorApplication.UserInterfaceManager; InterfaceStyleEnum interfaceStyle = userInterfaceManager.InterfaceStyle; RectangleDependencyManager = new RectangleToolsDependencyMapper(); if (interfaceStyle == InterfaceStyleEnum.kRibbonInterface) { if (firstTime == true) { RectangleDependencyManager.InitializeUserInterface(); } } } catch (Exception e) { MessageBox.Show(e.ToString()); } }