Example #1
0
        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();
        }
Example #2
0
 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;
 }
Example #3
0
 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");
     }
 }