void HandleAfterVariableSet(object sender, VariableSetArgs e)
{
try
{
if ( mControl != null && mControl.Enabled)
{
ElementRuntime elementRuntime = sender as ElementRuntime;
// If the user has just selected the element runtime,then it hasn't been set
// as the current element yet, so we can't use the GlueViewState facade
// IElement element = GlueViewState.Self.CurrentElement;
IElement element = elementRuntime.AssociatedIElement;
if (element != null)
{
string variableName = e.VariableName;
EventResponseSave ers = element.GetEvent("After" + variableName + "Set");
if (ers != null)
{
mParserLog.AppendLine("Reacting to after " + e.VariableName + " Set in the file :\n\t\t" + EventResponseSave.GetSharedCodeFullFileName(element, FileManager.GetDirectory(GlueViewState.Self.CurrentGlueProjectFile)));
ApplyEventResponseSave(elementRuntime, ers);
}
}
}
}
catch (Exception exception)
{
int m = 3;
}
}