Пример #1
0
        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);
        }
 public CoordinatesFactory(ResonantPitching rp, ShipData ship, double radius)
 {
     m_rp     = rp;
     m_ship   = ship;
     m_radius = radius;
 }