idTech4.UI.idWindow.RunNamedEvent C# (CSharp) Method

RunNamedEvent() public method

public RunNamedEvent ( string name ) : void
name string
return void
		public virtual void RunNamedEvent(string name)
		{
			if(this.Disposed == true)
			{
				throw new ObjectDisposedException(this.GetType().Name);
			}

			foreach(idNamedEvent e in _namedEvents)
			{
				if(e.Name.Equals(name, StringComparison.OrdinalIgnoreCase) == false)
				{
					continue;
				}

				UpdateVariables();

				// make sure we got all the current values for stuff
				if((_expressionRegisters.Count > 0) && (_ops.Count > 0))
				{
					EvaluateRegisters(-1, true);
				}

				RunScriptList(e.Event);

				break;
			}

			// run the event in all the children as well
			foreach(idWindow window in _children)
			{
				window.RunNamedEvent(name);
			}
		}