protected void NotifyUpdate(ScriptUpdatedEventArgs args) { if (ScriptUpdated != null) { ScriptUpdated(this, args); } }
void FunctionCallParametersUpdated(object sender, ScriptUpdatedEventArgs e) { if (EditorName.StartsWith("(function)")) { Updated(this, new EditableScriptUpdatedEventArgs(e.Index, m_controller.WrapValue(e.NewValue))); } }
private void multiScript_ScriptUpdated(object sender, ScriptUpdatedEventArgs e) { if (m_adding) return; // Has the update to the MultiScript removed one of the scripts? If so we need // to remove it from this wrapper too. if (e.RemovedScript != null) { foreach (IEditableScript es in m_scripts.ToArray()) { EditableScriptBase s = (EditableScriptBase)es; if (s.Script == e.RemovedScript) m_scripts.Remove(es); } } if (e.AddedScript != null) { Add(m_controller.ScriptFactory.CreateEditableScript(e.AddedScript), true); } if (e.InsertedScript != null) { Add(m_controller.ScriptFactory.CreateEditableScript(e.InsertedScript), e.Index, true); } if (Updated != null) Updated(this, new EditableScriptsUpdatedEventArgs()); if (UnderlyingValueUpdated != null) UnderlyingValueUpdated(this, new DataWrapperUpdatedEventArgs()); System.Diagnostics.Debug.Assert(m_underlyingScript.Scripts.Count() == m_scripts.Count); }
protected void ScriptUpdated(object sender, ScriptUpdatedEventArgs e) { if (Updated != null) { if (e != null && e.IsParameterUpdate) { Updated(this, new EditableScriptUpdatedEventArgs(e.Index, m_controller.WrapValue(e.NewValue))); } else if (e != null && e.IsNamedParameterUpdate) { Updated(this, new EditableScriptUpdatedEventArgs(e.Id, (string)e.NewValue)); } else { Updated(this, new EditableScriptUpdatedEventArgs()); } } }