Esempio n. 1
0
        public RoundTripDisplayItem(Map map, RoundTrip data, Parameters parameters)
        {
            Text   = data.There.TypeName + "/" + data.BackAgain.TypeName;
            profit = (int)data.Profit;
            int profitPercentage = (profit * 100) / (int)parameters.Isk;

            profitPerWarp = (int)data.ProfitPerWarp;
            SolarSystem startingSystem = map.GetSystem(parameters.StartingSystem);
            int         jumpsFromStart = map.DistanceBetween(startingSystem, data.There.Source.System, true);
            int         jumps          = data.There.Jumps(true);
            string      source         = data.There.Source.Name;
            string      destination    = data.There.Destination.Name;
            float       security       = data.Security;
            string      limitedBy      = data.There.LimitedBy.ToString();

            if (data.BackAgain.ItemType != null)
            {
                limitedBy += " / " + data.BackAgain.LimitedBy;
            }

            SubItems.Add(profitPerWarp.ToString());
            SubItems.Add(profitPercentage + "%");
            SubItems.Add(security.ToString());
            SubItems.Add(jumpsFromStart.ToString());
            SubItems.Add(jumps.ToString());
            SubItems.Add(source);
            SubItems.Add(destination);
            SubItems.Add(limitedBy.ToString());
        }
Esempio n. 2
0
        public RoundTripDisplayItem(Map map, RoundTrip data, Parameters parameters)
        {
            Text = data.There.TypeName + "/" + data.BackAgain.TypeName;
            profit = (int)data.Profit;
            int profitPercentage = (profit * 100) / (int)parameters.Isk;
            
            profitPerWarp = (int)data.ProfitPerWarp;
            SolarSystem startingSystem = map.GetSystem(parameters.StartingSystem);
            int jumpsFromStart = map.DistanceBetween(startingSystem, data.There.Source.System, true);
            int jumps = data.There.Jumps(true);
            string source = data.There.Source.Name;
            string destination = data.There.Destination.Name;
            float security = data.Security;
            string limitedBy = data.There.LimitedBy.ToString();
            if(data.BackAgain.ItemType != null)
                limitedBy += " / " + data.BackAgain.LimitedBy;

            SubItems.Add(profitPerWarp.ToString());
            SubItems.Add(profitPercentage + "%");
            SubItems.Add(security.ToString());
            SubItems.Add(jumpsFromStart.ToString());
            SubItems.Add(jumps.ToString());
            SubItems.Add(source);
            SubItems.Add(destination);
            SubItems.Add(limitedBy.ToString());
        }
Esempio n. 3
0
        private void AddRoundTrips()
        {
            foreach (SingleTrip trade in singleTrips)
            {
                SingleTrip there     = trade;
                SingleTrip backAgain = GetBestSingleTrip(there.Destination, there.Source);
                RoundTrip  trip      = new RoundTrip(there, backAgain);

                roundTrips.Add(trip);
            }
            roundTrips.Sort(RoundTrip.CompareByProfitPerWarpSecure);
        }
Esempio n. 4
0
 private void AddRoundTrips()
 {
     foreach (SingleTrip trade in singleTrips)
     {
         SingleTrip there = trade;
         SingleTrip backAgain = GetBestSingleTrip(there.Destination, there.Source);
         RoundTrip trip = new RoundTrip(there, backAgain);
         
         roundTrips.Add(trip);
     }
     roundTrips.Sort(RoundTrip.CompareByProfitPerWarpSecure);
 }
Esempio n. 5
0
 public static int CompareByProfitPerWarpShortest(RoundTrip a, RoundTrip b)
 {
     return b.ProfitPerWarp(false).CompareTo(a.ProfitPerWarp(false)); // highest profit per warp comes first
 }
Esempio n. 6
0
 public static int CompareByProfit(RoundTrip a, RoundTrip b)
 {
     return b.Profit.CompareTo(a.Profit); // highest profit comes first
 }
Esempio n. 7
0
 public static int CompareByProfitPerWarpSecure(RoundTrip a, RoundTrip b)
 {
     return b.ProfitPerWarp(true).CompareTo(a.ProfitPerWarp(true)); // highest profit per warp comes first
 }
Esempio n. 8
0
 public static int CompareByProfitPerWarpFromStartingSystemShortest(RoundTrip a, RoundTrip b)
 {
     return b.ProfitPerWarpFromStartingSystemSecure(false).CompareTo(a.ProfitPerWarpFromStartingSystemSecure(false)); // highest profit per warp comes first
 }
Esempio n. 9
0
 public static int CompareByProfitPerWarpShortest(RoundTrip a, RoundTrip b)
 {
     return(b.ProfitPerWarp(false).CompareTo(a.ProfitPerWarp(false))); // highest profit per warp comes first
 }
Esempio n. 10
0
 public static int CompareByProfitPerWarpFromStartingSystemShortest(RoundTrip a, RoundTrip b)
 {
     return(b.ProfitPerWarpFromStartingSystemSecure(false).CompareTo(a.ProfitPerWarpFromStartingSystemSecure(false))); // highest profit per warp comes first
 }
Esempio n. 11
0
 public static int CompareByProfit(RoundTrip a, RoundTrip b)
 {
     return(b.Profit.CompareTo(a.Profit)); // highest profit comes first
 }