Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/12 14:29:53 (12 years ago)
Author:
abeham
Message:

#1396:

  • Fixed loading of instances that did not specify coordinates (visual or actual ones)
  • Turned coordinates into an OptionalValueParameter
  • Added checks in relevant operators that throw an exception if they can neither find coordinates or distances
  • Writing a message to the visualization if coordinates are not defined
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/PathTSPTourView.cs

    r7259 r7621  
    118118                graphics.FillRectangle(Brushes.Red, points[i].X - 2, points[i].Y - 2, 6, 6);
    119119            }
     120          } else {
     121            using (Graphics graphics = Graphics.FromImage(bitmap)) {
     122              graphics.Clear(Color.White);
     123              Font font = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Regular);
     124              string text = "No coordinates defined or in wrong format.";
     125              SizeF strSize = graphics.MeasureString(text, font);
     126              graphics.DrawString(text, font, Brushes.Black, (float)(pictureBox.Width - strSize.Width) / 2.0f, (float)(pictureBox.Height - strSize.Height) / 2.0f);
     127            }
    120128          }
    121129          pictureBox.Image = bitmap;
Note: See TracChangeset for help on using the changeset viewer.