Exemple #1
0
 private void connectToSimulatorToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!FSUIPCProvider.isConnected())
     {
         FSUIPCProvider.Connect();
     }
     else
     {
         FSUIPCProvider.Disconnect();
         FSUIPCProvider.Connect();
     }
 }
Exemple #2
0
 private void FPLForm_Load(object sender, EventArgs e)
 {
     buttonIvao.Enabled   = (mainForm.pilot.ivao_id.Length > 0);
     buttonVatsim.Enabled = (mainForm.pilot.vatsim_id.Length > 0);
     fillAircrafts();
     if (Properties.Settings.Default.auto_connect)
     {
         FSUIPCProvider.Connect();
     }
     this.boardingInfoTxt.Text = "";
     alternates = new List <Airport>();
     VerifyFDRImaging();
 }
Exemple #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     FSUIPCProvider.Reconnect();
 }
Exemple #4
0
 private bool validateBoardingButton()
 {
     this.boardingInfoTxt.Visible = false;
     if (this.departureTxt.Text.Length < 4)
     {
         return(false);
     }
     if (this.arrivalTxt.Text.Length < 4)
     {
         return(false);
     }
     if (this.alternateCombo.Text.Length < 4)
     {
         return(false);
     }
     if (this.flightLevelUpDown.Text.Length < 3)
     {
         return(false);
     }
     if (this.iataCombo.Text.Length < 4)
     {
         return(false);
     }
     if (this.routeTxt.Text.Length == 0)
     {
         return(false);
     }
     if (this.aircraftCombo.Text.Length < 3)
     {
         return(false);
     }
     if (this.callsignTxt.Text.Length < 5)
     {
         return(false);
     }
     //if (this.aircraftRegistrationTxt.Text.Length < 6) return false;
     if (this.paxTxt.Text.Length == 0 && !this.chbTraining.Checked)
     {
         return(false);
     }
     if (!FSUIPCProvider.isConnected())
     {
         return(false);
     }
     this.boardingInfoTxt.Visible = true;
     if (!mainForm.fsData.onGround)
     {
         FSUIPCProvider.sendMessage("Please be on ground to enable boarding...", 1);
         this.boardingInfoTxt.Text = "Please be on ground to enable boarding...";
         return(false);
     }
     else
     {
         if (!mainForm.fsData.parkingBrake)
         {
             FSUIPCProvider.sendMessage("Please apply parking brake to enable boarding...", 1);
             this.boardingInfoTxt.Text = "Please apply parking brake to enable boarding...";
             return(false);
         }
         else
         {
             FSUIPCProvider.sendMessage("", 1);
         }
     }
     this.boardingInfoTxt.Text = "Everything looks good, you may now begin your flight.";
     return(true);
 }