Example #1
0
 void labelRefresh(Mission.Trigger trigger, Label lbl)
 {
     string triggerText = trigger.ToString();
     triggerText = replaceTargetText(triggerText);
     lbl.Text = triggerText;
 }
Example #2
0
 void initializeMission()
 {
     tabMain.Focus(); //[JB] Exit focus from any form controls.  Fixes some crashes when Leave() events are processed after mission data has been cleared (notably from within the Messages tab).
     _mission = new Mission();
     _config.LastMission = "";
     _activeFG = 0;
     _activeMessage = 0;
     _mission.FlightGroups[0].CraftType = Convert.ToByte(_config.XwaCraft);
     _mission.FlightGroups[0].IFF = Convert.ToByte(_config.XwaIff);
     string[] fgList = _mission.FlightGroups.GetList();
     comboReset(cboArrMS, fgList, 0);
     comboReset(cboArrMSAlt, fgList, 0);
     comboReset(cboDepMS, fgList, 0);
     comboReset(cboDepMSAlt, fgList, 0);
     lstFG.Items.Clear();
     lstFG.Items.Add(_mission.FlightGroups[_activeFG].ToString(true));
     comboReset(cboTeam, _mission.Teams.GetList(), _mission.FlightGroups[0].Team);
     cboGlobalTeam.Items.Clear();
     cboGlobalTeam.Items.AddRange(_mission.Teams.GetList());
     this.Text = "Ye Olde Galactic Empire Mission Editor - XWA - New Mission";
     cboMessFG.Items.Clear();
     cboMessFG.Items.Add(fgList[0]);
     tabMain.SelectedIndex = 0;
     tabFGMinor.SelectedIndex = 0;
     if (!_config.XwaInstalled) cmdBackdrop.Enabled = false;
     _applicationExit = true;	//becomes false if selecting "New Mission" from menu
 }