public static void SetControlHeight(Control control, int Height) { if (control.InvokeRequired) { var d = new HeightDelegate(SetControlHeight); control.Invoke(d, new object[] { control, Height }); } else { control.Height = Height; } }
protected void FlightInformation() { SpeedDelegate speed = () => { return(Speed); }; HeightDelegate height = () => { return(Height); }; foreach (Dispatcher item in DispList) { item.ShowFlightInformation(speed(), height()); if (!item.isGood || item.isCrashed || item.isFinish) { isCrashed = item.isCrashed; isFinish = item.isFinish; return; } } }