private void Button_Click(object sender, RoutedEventArgs e) { Sailboat s = new Sailboat(); s.Name = ShipName.Text; s.Length = double.Parse(ShipLength.Text); ResultLabel.Content = Math.Round(s.Hullspeed()); }
private void CalcButton_OnClick(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(LengthTextBox.Text) || LengthTextBox.Text.All(char.IsNumber) == false) { MessageBox.Show("Insert the lenght of the ship"); } else { HullSpeedResultLabel.Content = mySailboat.Hullspeed(); } }
private void Button_Click(object sender, RoutedEventArgs e) { ResultLabel.Content = Math.Round(_sailboat.Hullspeed()); }
private void btnCalculateHullSpeed_Click(object sender, RoutedEventArgs e) { tbxHullSpeed.Text = boat.Hullspeed().ToString("F1"); }