コード例 #1
0
 private void VoidShield_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
     {
         MessageBox.Show("Can't select components until you've selected a hull");
     }
     else
     {
         Essential dialog = new Essential(loader.VoidShields.Where(x => (x.HullTypes & Starship.Hull.VoidShields) != 0).Highest(), typeof(VoidShield), Starship.VoidShield);
         Starship.VoidShield = (VoidShield)dialog.ShowDialog();
         UpdateVoid();
     }
 }
コード例 #2
0
 private void LifeSustainer_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
     {
         MessageBox.Show("Can't select components until you've selected a hull");
     }
     else
     {
         Essential dialog = new Essential(loader.LifeSustainers.Where(x => (x.HullTypes & Starship.Hull.HullTypes) != 0).Highest(), typeof(LifeSustainer), Starship.LifeSustainer);
         Starship.LifeSustainer = (LifeSustainer)dialog.ShowDialog();
         UpdateLife();
     }
 }
コード例 #3
0
 private void WarpDrive_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
     {
         MessageBox.Show("Can't select components until you've selected a hull");
     }
     else
     {
         Essential dialog = new Essential(loader.WarpDrives.Where(x => (x.HullTypes & Starship.Hull.HullTypes) != 0).Highest(), typeof(WarpDrive), Starship.WarpDrive);
         Starship.WarpDrive = (WarpDrive)dialog.ShowDialog();
         UpdateWarp();
     }
 }
コード例 #4
0
 private void AugurArrays_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
     {
         MessageBox.Show("Can't select components until you've selected a hull");
     }
     else
     {
         Essential dialog = new Essential(loader.AugurArrays.Where(x => (x.HullTypes & Starship.Hull.HullTypes) != 0).Highest(), typeof(Augur), Starship.AugurArrays);
         Starship.AugurArrays = (Augur)dialog.ShowDialog();
         UpdateAugurs();
     }
 }
コード例 #5
0
 private void PlasmaDrive_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
     {
         MessageBox.Show("Can't select components until you've selected a hull");
     }
     else
     {
         Essential dialog = new Essential(loader.PlasmaDrives.Where(x => (x.HullTypes & Starship.Hull.HullTypes) != 0).Highest(), typeof(PlasmaDrive), Starship.PlasmaDrive);
         //TODO: show only largest variant engines??
         Starship.PlasmaDrive = (PlasmaDrive)dialog.ShowDialog();
         UpdatePlasma();
     }
 }
コード例 #6
0
 private void PlasmaDrive_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
         MessageBox.Show("Can't select components until you've selected a hull");
     else
     {
         Essential dialog = new Essential(loader.PlasmaDrives.Where(x => (x.HullTypes & Starship.Hull.HullTypes) != 0).Highest(), typeof(PlasmaDrive), Starship.PlasmaDrive);
         //TODO: show only largest variant engines??
         Starship.PlasmaDrive = (PlasmaDrive)dialog.ShowDialog();
         UpdatePlasma();
     }
 }
コード例 #7
0
 private void LifeSustainer_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
         MessageBox.Show("Can't select components until you've selected a hull");
     else
     {
         Essential dialog = new Essential(loader.LifeSustainers.Where(x => (x.HullTypes & Starship.Hull.HullTypes) != 0).Highest(), typeof(LifeSustainer), Starship.LifeSustainer);
         Starship.LifeSustainer = (LifeSustainer)dialog.ShowDialog();
         UpdateLife();
     }
 }
コード例 #8
0
 private void GellarField_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
         MessageBox.Show("Can't select components until you've selected a hull");
     else
     {
         Essential dialog = new Essential(loader.GellarFields.Where(x => (x.HullTypes & Starship.Hull.HullTypes) != 0).Highest(), typeof(GellarField), Starship.GellarField);
         Starship.GellarField = (GellarField)dialog.ShowDialog();
         UpdateGellar();
     }
 }
コード例 #9
0
 private void CrewQuarters_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
         MessageBox.Show("Can't select components until you've selected a hull");
     else
     {
         Essential dialog = new Essential(loader.CrewQuarters.Where(x => (x.HullTypes & Starship.Hull.HullTypes) != 0).Highest(), typeof(CrewQuarters), Starship.CrewQuarters);
         Starship.CrewQuarters = (CrewQuarters)dialog.ShowDialog();
         UpdateQuarters();
     }
 }
コード例 #10
0
 private void WarpDrive_Click(object sender, RoutedEventArgs e)
 {
     if (Starship.Hull == null)
         MessageBox.Show("Can't select components until you've selected a hull");
     else
     {
         Essential dialog = new Essential(loader.WarpDrives.Where(x => (x.HullTypes & Starship.Hull.HullTypes) != 0).Highest(), typeof(WarpDrive), Starship.WarpDrive);
         Starship.WarpDrive = (WarpDrive)dialog.ShowDialog();
         UpdateWarp();
     }
 }