コード例 #1
0
ファイル: IPSController.cs プロジェクト: andresrobinson/ivaps
        //creato per issue 87
        public void ShowHideUtilityBar()
        {
            if (utilBar == null) utilBar = new UtilityBar();

            if (!utilBar.Visible)
                utilBar.Visible = true;
            else
                utilBar.PressedSelect();
        }
コード例 #2
0
ファイル: IPSController.cs プロジェクト: andresrobinson/ivaps
        /// <summary>
        /// Costruttore. Richiede un riferimento alla vista principale per poter
        /// richiedere delle update della vista quando necessario
        /// </summary>
        /// <param name="view"></param>
        public IPSController(MainForm view)
        {
            Log("Init application...");
            viewMainForm = view;
            //Titolo della form principale con la versione dell'assembly
            //da modificare nelle proprietà di progetto SOLO da fede.caste in accordo con le milestones
            viewMainForm.Text = "IVaPS " + Assembly.GetExecutingAssembly().GetName().Version;

            #region Costruzione preliminare delle proprietà interne
            flightSim = new FSWrapper();
            status = new FlightStatus();
            checklistSpeaker = new ChecklistSpeaker();
            checklistSpeaker.Controller = this;
            //voiceRecognizer = new VoiceCommandRecognizer();
            //voiceRecognizer.Controller = this;

            utilBar = new UtilityBar();
            viewMainForm.mainPanel.SetStatus(status);

            try
            {
                IPSConfiguration.Load();
                Log("Configuration loaded");
                if (IPSConfiguration.AUTO_ALWAYSONTOP)
                    viewMainForm.mainPanel.btn_top_Click(null, null);
                //issue 42
                if (IPSConfiguration.AUTOLOAD_FLIGHTPLAN)
                {
                    Thread oThread = new Thread(new ThreadStart(viewMainForm.mainPanel.AsyncFPLoad));
                    oThread.Start();
                }
            }
            catch (FileNotFoundException fnfex)
            {
                //gestione dell'assenza di configurazione
                Log("Configuration file not found: " + fnfex.FileName);
            }

            Log("..Init successifully terminated");
            #endregion
        }