private void LoadTaskIcon() { mTask.NodeData.Icon = null; TaskIconAttribute[] array; if ((array = (mTask.GetType().GetCustomAttributes(typeof(TaskIconAttribute), false) as TaskIconAttribute[])).Length > 0) { mTask.NodeData.Icon = BehaviorDesignerUtility.LoadIcon(array[0].IconPath); } if (mTask.NodeData.Icon == null) { string iconName = string.Empty; if (mTask.GetType().IsSubclassOf(typeof(Runtime.Tasks.Action))) { iconName = "{SkinColor}ActionIcon"; } else if (mTask.GetType().IsSubclassOf(typeof(Conditional))) { iconName = "{SkinColor}ConditionalIcon"; } else if (mTask.GetType().IsSubclassOf(typeof(Composite))) { iconName = "{SkinColor}CompositeIcon"; } else if (mTask.GetType().IsSubclassOf(typeof(Decorator))) { iconName = "{SkinColor}DecoratorIcon"; } else { iconName = "{SkinColor}EntryIcon"; } mTask.NodeData.Icon = BehaviorDesignerUtility.LoadIcon(iconName); } }
public void OnEnable() { this.m_WelcomeScreenImage = BehaviorDesignerUtility.LoadTexture("WelcomeScreenHeader.png", false, this); this.m_SamplesImage = BehaviorDesignerUtility.LoadIcon("WelcomeScreenSamplesIcon.png", this); this.m_DocImage = BehaviorDesignerUtility.LoadIcon("WelcomeScreenDocumentationIcon.png", this); this.m_VideoImage = BehaviorDesignerUtility.LoadIcon("WelcomeScreenVideosIcon.png", this); this.m_ForumImage = BehaviorDesignerUtility.LoadIcon("WelcomeScreenForumIcon.png", this); this.m_ContactImage = BehaviorDesignerUtility.LoadIcon("WelcomeScreenContactIcon.png", this); }