public EditableCommandPattern(EditorController controller, EditorCommandPattern pattern, Element parent, string attribute) { m_pattern = pattern; m_controller = controller; m_parent = parent; m_attribute = attribute; }
public IEditableCommandPattern CreateNewEditableCommandPattern(string parent, string attribute, string value, bool useTransaction) { if (useTransaction) { WorldModel.UndoLogger.StartTransaction(string.Format("Set '{0}' {1} to {2}", parent, attribute, value)); } Element element = m_worldModel.Elements.Get(parent); EditorCommandPattern newPattern = new EditorCommandPattern(value); EditableCommandPattern newRef = new EditableCommandPattern(this, newPattern, element, attribute); element.Fields.Set(attribute, newPattern); if (useTransaction) { WorldModel.UndoLogger.EndTransaction(); } return newRef; }