Changeset 7842 for branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.Instances.TSPLIB.Views/3.3/TSPLIBTSPInstanceProviderView.cs
- Timestamp:
- 05/16/12 16:28:49 (12 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
- Property svn:mergeinfo changed
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.Instances.TSPLIB.Views/3.3/TSPLIBTSPInstanceProviderView.cs
r7558 r7842 24 24 using HeuristicLab.MainForm; 25 25 using HeuristicLab.MainForm.WindowsForms; 26 using HeuristicLab.Optimization.Views; 26 using HeuristicLab.Problems.Instances.Views; 27 using System.IO; 27 28 28 29 namespace HeuristicLab.Problems.Instances.TSPLIB.Views { 29 30 [View("TSPLIB TSP InstanceProvider View")] 30 31 [Content(typeof(TSPLIBTSPInstanceProvider), IsDefaultView = true)] 31 public partial class TSPLIBTSPInstanceProviderView : ProblemInstanceProviderView <TSPData> {32 public partial class TSPLIBTSPInstanceProviderView : ProblemInstanceProviderViewGeneric<TSPData> { 32 33 public new TSPLIBTSPInstanceProvider Content { 33 34 get { return (TSPLIBTSPInstanceProvider)base.Content; } … … 43 44 if (dialog.ShowDialog() == DialogResult.OK) { 44 45 var instance = Content.LoadData(dialog.TSPFileName, dialog.TourFileName, dialog.Quality); 45 Content.Consumer.Load(instance); 46 try { 47 GenericConsumer.Load(instance); 48 } 49 catch (Exception ex) { 50 MessageBox.Show(String.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(openFileDialog.FileName), Environment.NewLine + ex.Message), "Cannot load instance"); 51 } 46 52 } 47 53 }
Note: See TracChangeset
for help on using the changeset viewer.