public void CodeChanged(string codeBoxText) { if (codeProperties != null && codePropertyName != null) { if (codeIsEvent && currentCode == null) currentCode = new ZEvent(codeProperties.Component, codePropertyName); if (currentCode != null) { //Console.WriteLine("Changing code text."); currentCode.Text = codeBoxText; SaveCodeText(codePropertyName, codeBoxText, codeProperties.xmlNode); OnXMLChanged(); } } }
public void SetEventCode(ZComponent parent, string propertyName, TextEditorControl codeBox) { if (parent != null) { codeIsEvent = true; currentCode = app.FindEvent(parent, propertyName) as CodeLike; // CodeTextChanged will do nothing since codeProperties and codePropertyName are null codeBox.Text = (currentCode != null) ? currentCode.Text : null; codeProperties = parent.Tag as ZNodeProperties; codePropertyName = propertyName; } }
public void SetCode(CodeLike code, ZComponent parent, string propertyName) { codeIsEvent = false; currentCode = code; if (parent != null) codeProperties = parent.Tag as ZNodeProperties; codePropertyName = propertyName; }
public void ClearCode() { currentCode = null; codeProperties = null; codePropertyName = null; codeIsEvent = false; }