public AddStationDialog(string systemName)
 {
     InitializeComponent();
     this.Icon = new Icon("Graphics\\EliteDangerousIcon.ico");
     SystemTextBox.Text = systemName;
     result = null;
 }
        public Station(Station copy)
        {
            commodities = new List<Commodity>();

            name = copy.Name;

            foreach (Commodity commodity in copy.Commodities)
                commodities.Add(new Commodity(commodity));
        }
 public Trade(Trade copy)
 {
     commodity = new Commodity(copy.Commodity);
     startSystem = new StarSystem(copy.StartSystem);
     endSystem = new StarSystem(copy.EndSystem);
     startStation = new Station(copy.StartStation);
     endStation = new Station(copy.EndStation);
     unitsBought = copy.UnitsBought;
     score = copy.Score;
 }
        private void AddStationButton_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(StationTextBox.Text))
            {
                MessageBox.Show("Please provide a station name.", "Error: Station name needed.", MessageBoxButtons.OK);
                return;
            }

            result = new Station();
            result.Name = StationTextBox.Text;
            this.Close();
        }
        private static Manifest FindManifest(GameData gameData, StarSystem startSystem, Station startStation, StarSystem endSystem, Station endStation)
        {
            List<Manifest> allManifests = gameData.OptimalManifests.Concat(gameData.UserManifests).ToList();

            foreach (Manifest manifest in allManifests)
            {
                if (manifest.StartSystemName == startSystem.Name && manifest.StartStationName == startStation.Name &&
                    manifest.EndSystemName == endSystem.Name && manifest.EndStationName == endStation.Name)
                    return manifest;
            }

            return null;
        }
        private static Manifest FindManifest(GameData gameData, StarSystem startSystem, Station startStation, StarSystem endSystem, Station endStation)
        {
            List <Manifest> allManifests = gameData.OptimalManifests.Concat(gameData.UserManifests).ToList();

            foreach (Manifest manifest in allManifests)
            {
                if (manifest.StartSystemName == startSystem.Name && manifest.StartStationName == startStation.Name &&
                    manifest.EndSystemName == endSystem.Name && manifest.EndStationName == endStation.Name)
                {
                    return(manifest);
                }
            }

            return(null);
        }