C#의 timer_tick 이벤트에 일부 매개 변수를 전달하려고하지만 전역 변수를 만들고 싶지 않습니다. 이것이 가능한가?timer_Tick 이벤트에 매개 변수 전달
나는 모양의 라운드를했고,이 같은 내놓았다 :
는//Where I start the timer
lift1Up.Enabled = true;
lift1Up.Tick += (sender, args) => lift1Up_Tick(sender, args, destination, currentFloor);
lift1Up.Start();
private void lift1Up_Tick(object sender, EventArgs e, int dest, int current)
{
//my code
}
많은 감사합니다! 누가.
은, 대단히 감사합니다. 누가. – user3277329