/// <summary> /// Erzeugt alle notwendigen Methodensignaturen. /// </summary> protected override void OnCreateDelegates() { // Alle Signaturen erfragen m_SetProperties = CreateDelegate <SetPropertiesSignature>(0); m_Commit = CreateDelegate <CommitSignature>(2); m_Decommit = CreateDelegate <DecommitSignature>(3); m_GetBuffer = CreateDelegate <GetBufferSignature>(4); }
public void Display() { Tuple <IRepositoryManager, IModule> tupleModuleDependency; CommitSignature creator = module.Creator; CommitSignature versionAuthor = module.VersionAuthor; using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandHeight(false), GUILayout.ExpandWidth(false))) { GUILayout.Space(125f); using (new EditorGUILayout.VerticalScope(GUI.skin.textArea, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(false))) { this.foldout = EditorGUILayout.Foldout(this.foldout, "Details"); if (this.foldout) { using (EditorGUILayout.ScrollViewScope scrollView = new EditorGUILayout.ScrollViewScope(this.scrollPosition, GUILayout.MaxHeight(400f), GUILayout.ExpandHeight(false), GUILayout.ExpandWidth(false))) { this.scrollPosition = scrollView.scrollPosition; GUILayout.Space(5f); EditorGUILayout.LabelField("Description", this.styles.BoldLabelStyle, GUILayout.ExpandWidth(false)); GUILayout.Space(5f); EditorGUILayout.LabelField(module.Description, GUI.skin.textArea, GUILayout.ExpandWidth(true)); GUILayout.Space(5f); EditorGUILayout.LabelField("Created by " + creator.name + " on " + creator.when.LocalDateTime.ToString(CultureInfo.InvariantCulture), EditorStyles.label, GUILayout.ExpandWidth(false), GUILayout.MinWidth(400f)); GUILayout.Space(5f); EditorGUILayout.LabelField("Version created by " + versionAuthor.name + " on " + versionAuthor.when.LocalDateTime.ToString(CultureInfo.InvariantCulture), EditorStyles.label, GUILayout.ExpandWidth(false), GUILayout.MinWidth(400f)); GUILayout.Space(5f); if (module.Dependencies.Count > 0) { EditorGUILayout.LabelField("Dependencies", this.styles.BoldLabelStyle, GUILayout.ExpandWidth(false)); } else { EditorGUILayout.LabelField("No dependencies", this.styles.BoldLabelStyle, GUILayout.ExpandWidth(false)); } EditorGUI.indentLevel += 2; foreach (Dependency dependency in module.Dependencies) { tupleModuleDependency = this.otherModules.FirstOrDefault((Tuple <IRepositoryManager, IModule> tuple) => tuple.Item2.UUID == dependency.UUIDModuleRequired); EditorGUILayout.LabelField(string.Format("({0}) {1} [{2}]", tupleModuleDependency.Item1.Name, tupleModuleDependency.Item2.Name, dependency.MinimumVersion.ToString()), EditorStyles.label, GUILayout.ExpandWidth(false), GUILayout.MinWidth(400f)); } EditorGUI.indentLevel -= 2; } } } } GUILayout.Space(8f); }