idTech4.UI.idGuiScript.Script_ResetTime C# (CSharp) 메소드

Script_ResetTime() 개인적인 정적인 메소드

private static Script_ResetTime ( idWindow window, List source ) : void
window idWindow
source List
리턴 void
		private static void Script_ResetTime(idWindow window, List<idWinGuiScript> source)
		{
			idWinString parameter = (source.Count > 0) ? source[0].Variable as idWinString : null;
			DrawWindow drawWindow = null;

			if((parameter != null) && (source.Count > 1))
			{
				drawWindow = window.UserInterface.Desktop.FindChildByName(parameter);
				parameter = source[1].Variable as idWinString;
			}

			int tmp;
			int.TryParse(parameter, out tmp);

			if((drawWindow != null) && (drawWindow.Window != null))
			{
				drawWindow.Window.ResetTime(tmp);
				drawWindow.Window.EvaluateRegisters(-1, true);
			}
			else
			{
				window.ResetTime(tmp);
				window.EvaluateRegisters(-1, true);
			}
		}