/// <summary> /// Creates a dialog box that allows the user to set the speed of a given /// player within certain limits. /// </summary> /// <param name="player"></param> internal void SetPlayerSpeed(Player player) { using (SpeedDialog dialog = new SpeedDialog(Settings.Default.MinPlayerSpeed, Settings.Default.MaxPlayerSpeed, player.MaxSpeed)) { if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { player.MaxSpeed = dialog.GetSpeed(); } } }
/// <summary> /// Creates a dialog box that allows the user to select the speed of the /// disc within certain limits. /// </summary> internal void SetDiscSpeed() { using (SpeedDialog dialog = new SpeedDialog(Settings.Default.MinDiscSpeed, Settings.Default.MaxDiscSpeed, viewPanel.CurrentFrame.DiscFrameMovement.DiscSpeed)) { if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { viewPanel.CurrentFrame.DiscFrameMovement.DiscSpeed = dialog.GetSpeed(); } } }