private void MapsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (mapsList.SelectedIndex)
            {
            case 0: w.f = new Hydrodynamics_Sources.Conformal_Maps.IdentityTransform(); break;

            case 1:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.EjectedRays(1, 0.5);
                break;

            case 2:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.Diffusor(1, 90f);
                break;
            }
            ChangeParamsConfiguration();
            s.Rebuild();
            PlotRefresh();
        }
Beispiel #2
0
 private void paramBox1_TextChanged(object sender, TextChangedEventArgs e)
 {
     try
     {
         Mouse.OverrideCursor = Cursors.Wait;
         double tmp = Convert.ToDouble(TemporaryString(1));
         angleSlider.ValueChanged -= angleSlider_ValueChanged;
         if ((w.f is Hydrodynamics_Sources.Conformal_Maps.IdentityTransform || w.f is Hydrodynamics_Sources.Conformal_Maps.Plate))
         {
             if (tmp >= -90 && tmp <= 90)
             {
                 w.AlphaDegrees = tmp;
                 s.Rebuild();
                 PlotRefresh();
                 angleSlider.Value = tmp;
             }
         }
         else if (w.f is Hydrodynamics_Sources.Conformal_Maps.JoukowskiAirfoil)
         {
             if (tmp >= -15 && tmp <= 15)
             {
                 w.AlphaDegrees = tmp;
                 s.Rebuild();
                 PlotRefresh();
                 angleSlider.Value = tmp;
             }
         }
         else
         {
             throw new InvalidOperationException("undefined conformal map");
         }
     }
     catch
     {
         return;
     }
     finally
     {
         angleSlider.ValueChanged += angleSlider_ValueChanged;
         Mouse.OverrideCursor      = Cursors.Arrow;
     }
 }
Beispiel #3
0
        private void MapsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (mapsList.SelectedIndex)
            {
#if !HELP_FOR_GROUP_LEADER
            case 0: w.f = new Hydrodynamics_Sources.Conformal_Maps.IdentityTransform(); break;

            case 1: w.f = new Hydrodynamics_Sources.Conformal_Maps.Plate(); break;

            case 2:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.JoukowskiAirfoil(0, 0.05);
                break;
#else
            case 0: Settings.PlotGeomParams.MRKh = 0.005; Settings.PlotGeomParams.hVertical = 0.05; wHelp = new Hydrodynamics_Sources.PotentialHelp(1, 1); s = new Hydrodynamics_Sources.StreamLinesBuilderForGroupLeader(wHelp, viewModel); break;
#endif
            }
            Mouse.OverrideCursor = Cursors.Wait;
            ChangeParamsConfiguration();
            s.Rebuild();
            Mouse.OverrideCursor = Cursors.Arrow;
            PlotRefresh();
        }
        private void MapsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            switch (mapsList.SelectedIndex)
            {
            case 0:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.IdentityTransform();
                s.Rebuild();
                break;

            case 1:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.Porebrick(1);
                s.Rebuild();
                break;

            case 2:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.EjectedSegment(0, 1);
                s.Rebuild();
                break;

            case 3:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.Number81(1);
                s.Rebuild();
                break;

            case 4:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.Number79(1);
                Settings.PlotGeomParams.XMax      = 65;
                Settings.PlotGeomParams.XMin      = -20;
                Settings.PlotGeomParams.YMax      = 70;
                Settings.PlotGeomParams.MRKh      = 0.1;
                Settings.PlotGeomParams.hVertical = 0.3;
                s.ChangeParams(Settings.PlotGeomParams.XMin, Settings.PlotGeomParams.XMax, Settings.PlotGeomParams.YMax, Settings.PlotGeomParams.MRKh, Settings.PlotGeomParams.hVertical);
                break;

            case 5:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.Number89(2, 1);
                s.Rebuild();
                break;

            case 6:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.Triangle(1, 1);
                s.Rebuild();
                break;

            case 7:
                w.f = new Hydrodynamics_Sources.Conformal_Maps.Number85(1);
                s.Rebuild();
                break;

            default:
                return;
            }
            ChangeParamsConfiguration();
            Mouse.OverrideCursor = Cursors.Arrow;
            PlotRefresh();
        }