Example #1
0
 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();
         }                     
     }
 }
Example #2
0
 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;                
     }                               
 }
Example #3
0
 public void SetCode(CodeLike code, ZComponent parent, string propertyName)
 {
     codeIsEvent = false;
     currentCode = code;
     if (parent != null) codeProperties = parent.Tag as ZNodeProperties;
     codePropertyName = propertyName;
 }
Example #4
0
 public void ClearCode()
 {
     currentCode = null;
     codeProperties = null;
     codePropertyName = null;
     codeIsEvent = false;
 }