private void BtnResetInput_Click(object sender, RoutedEventArgs e) { tbHeadingAngle.Clear(); gbInputData.IsEnabled = true; lblResult.Content = "Результат:"; PitchingDiagram.Clear(cnvDiagram); }
private void BtnCalculate_Click(object sender, RoutedEventArgs e) { ship = new ShipData(input.ShipWidth, input.ShipDraft, input.MetacentricHeight, input.ShipSpeed, input.HeadingAngle); wave = new WaveData(input.WaveLength, ship); rp = new ResonantPitching(wave, ship); double radius = input.ShipSpeed * 180 / 30; coordsFactory = new CoordinatesFactory(rp, ship, radius); points = coordsFactory.GetDictionaryOfInstances(); diag = new PitchingDiagram(cnvDiagram, points); diag.Draw(); gbInputData.IsEnabled = false; lblResult.Content += string.Format("\n{0}", rp.CheckRules()); rp.DisplayLimitsToLabel(lblResult); }