public object ApplyCreate(Semantics.ISemanticNetwork semanticNetwork) { semanticNetwork.Concepts.Add(BoundObject = new Semantics.Concepts.Concept(ID, Name.Create(), Hint.Create())); foreach (var attribute in Attributes) { if (attribute.IsOn && attribute.Value != null) { BoundObject.WithAttribute(attribute.Value); } } return(BoundObject); }
public Window CreateEditDialog(Window owner, Semantics.ISemanticNetwork semanticNetwork, ILanguage language) { updateAttributes(Repositories.Attributes, language); var control = new ConceptControl { EditValue = this, }; control.Initialize(semanticNetwork, language); var dialog = new EditDialog { Owner = owner, Editor = control, Title = language.GetExtension <IWpfUiModule>().Misc.Concept, SizeToContent = SizeToContent.WidthAndHeight, MinWidth = 200, MinHeight = 100, WindowStartupLocation = WindowStartupLocation.CenterOwner, }; dialog.Localize(language); return(dialog); }