Пример #1
0
 public AutopilotForm(MainForm MainForm)
 {
     mForm = MainForm;
     S     = mForm.S;
     s     = mForm.s;
     c     = mForm.c;
     del   = mForm.del;
     scoe  = mForm.s;
     InitializeComponent();
 }
Пример #2
0
        /// <summary>
        /// Set initial conditions
        /// </summary>
        public void SetInitialConditions()
        {
            d   = new DifferentialMeanings();
            S   = new IntegralMeanings();
            F   = new Forses();
            M   = new Moments();
            C   = new Coefficient();
            c   = new LinearizedCoefficient();
            N   = new Overload();
            del = new Controls();
            s   = new Statics();

            SetInitialValues();

            if (stForm == null)
            {
                stForm = new StaticsForm(this, s);
            }
            else if (stForm != null)
            {
                stForm.Close();
                stForm = new StaticsForm(this, s);
            }

            if (fpForm == null)
            {
                fpForm = new FlyParamForm(this);
            }
            else if (fpForm != null)
            {
                fpForm.Close();
                fpForm = new FlyParamForm(this);
            }

            if (glForm == null)
            {
                glForm = new GraphicsListForm(this);
            }
            else if (glForm != null)
            {
                glForm.Close();
                glForm = new GraphicsListForm(this);
            }

            if (dgForm == null)
            {
                dgForm = new DataGridForm(this);
            }
            else if (dgForm != null)
            {
                dgForm.Close();
                dgForm = new DataGridForm(this);
            }

            if (avForm == null)
            {
                avForm = new AviatingForm(this);
            }
            else if (avForm != null)
            {
                avForm.Close();
                avForm = new AviatingForm(this);
            }

            if (pvForm == null)
            {
                pvForm = new PlaneVisualisationForm(this.toolStripButton6_Visualisation, S);
            }
            else if (pvForm != null)
            {
                pvForm.Close();
                pvForm = new PlaneVisualisationForm(this.toolStripButton6_Visualisation, S);
            }

            if (auForm == null)
            {
                auForm = new AutopilotForm(this);
            }
            else if (auForm != null)
            {
                auForm.Close();
                auForm = new AutopilotForm(this);
            }

            if (scrForm == null)
            {
                scrForm = new ScriptingAutopilotForm(this);
            }
            else if (scrForm != null)
            {
                scrForm.Close();
                scrForm = new ScriptingAutopilotForm(this);
            }
        }