コード例 #1
0
ファイル: IPSController.cs プロジェクト: andresrobinson/ivaps
        public void ShowHideChecklistSelection()
        {
            //CTRL+1 pressed
            if (checklistSpeaker.IsCurrentlySpeaking() || checklistSpeaker.IsCurrentlyPaused())//issue 66, 77
            {
                checklistSpeaker.StopSpeaking();
                Thread.Sleep(200);
                checklistSpeaker.Speak("canceled");
                return;
            }

            //metodo creato per issue 68
            if (checklistSelectionForm == null)
            {
                checklistSelectionForm = new TransparentChoiseForm();
                LoadChecklistPhase();
                checklistSelectionForm.SelectedEvent += new TransparentChoiseForm.SelectedIndexHandler(this.SpeekChecklistPhase);
            }
            checklistSelectionForm.ChooseTitle = "Chose checklist phase to be readed:";
            checklistSelectionForm.Visible     = !checklistSelectionForm.Visible;
            if (checklistSelectionForm.Visible)
            {
                checklistSelectionForm.Activate();
            }
        }
コード例 #2
0
ファイル: IPSController.cs プロジェクト: andresrobinson/ivaps
 public void SaveConfig()
 {
     try
     {
         IPSConfiguration.Save();
         status.Callsign         = IPSConfiguration.CALLSIGN;
         status.VirtualAirlineID = IPSConfiguration.VA_ID;
         viewMainForm.mainPanel.Info("Config saved");
         checklistSelectionForm = null;//per issue 89
     }
     catch (Exception ex)
     {
         Log("Error saving config: " + ex.ToString());
         viewMainForm.mainPanel.Error("Error saving config");
     }
 }
コード例 #3
0
ファイル: IPSController.cs プロジェクト: andresrobinson/ivaps
        private void LoadChecklistPhase()
        {
            Checklist cklst = ChecklistReader.ReadChecklist(IPSConfiguration.CURRENT_CHECKLIST);

            string[] phases = new string[cklst.Phases.Count];
            int      i      = 0;

            foreach (ChecklistPhase phase in cklst.Phases)
            {
                phases[i++] = phase.PhaseName;
            }
            if (checklistSelectionForm == null)
            {
                checklistSelectionForm = new TransparentChoiseForm();
            }
            checklistSelectionForm.AvailableChooses = phases;
        }