Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/12 15:47:26 (12 years ago)
Author:
spimming
Message:

#1680: merged changes from trunk into branch

Location:
branches/HeuristicLab.Hive.Azure
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive.Azure

  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.QuadraticAssignment.Views

  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/HeuristicLab.Problems.QuadraticAssignment.Views-3.3.csproj

    r7215 r7669  
    102102  </PropertyGroup>
    103103  <ItemGroup>
     104    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     105      <Private>False</Private>
     106    </Reference>
     107    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     108      <Private>False</Private>
     109    </Reference>
     110    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     111      <Private>False</Private>
     112    </Reference>
     113    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     114      <Private>False</Private>
     115    </Reference>
     116    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     117      <Private>False</Private>
     118    </Reference>
     119    <Reference Include="HeuristicLab.Problems.DataAnalysis.Views-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     120      <Private>False</Private>
     121    </Reference>
    104122    <Reference Include="System" />
    105123    <Reference Include="System.Core" />
     
    209227      <Private>False</Private>
    210228    </ProjectReference>
     229    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj">
     230      <Project>{BF1E4DF4-A4CC-451F-9D50-303F405E265E}</Project>
     231      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4</Name>
     232      <Private>False</Private>
     233    </ProjectReference>
     234    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
     235      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
     236      <Name>HeuristicLab.Problems.Instances-3.3</Name>
     237      <Private>False</Private>
     238    </ProjectReference>
    211239    <ProjectReference Include="..\..\HeuristicLab.Problems.QuadraticAssignment\3.3\HeuristicLab.Problems.QuadraticAssignment-3.3.csproj">
    212240      <Project>{79271BC8-4446-40E2-BB89-9BE4E17174FE}</Project>
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/Plugin.cs.frame

    r7270 r7669  
    3434  [PluginDependency("HeuristicLab.MainForm", "3.3")]
    3535  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
     36  [PluginDependency("HeuristicLab.Optimization", "3.3")]
     37  [PluginDependency("HeuristicLab.Optimization.Views", "3.3")]
    3638  [PluginDependency("HeuristicLab.Problems.QuadraticAssignment", "3.3")]
    3739  public class HeuristicLabProblemsQuadraticAssignmentViewsPlugin : PluginBase {
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QAPVisualizationControl.cs

    r7270 r7669  
    205205        Bitmap newBitmap = null;
    206206        stressLabel.Text = "-";
     207        stressLabel.ForeColor = Color.Black;
    207208        if (distancesRadioButton.Checked && Distances != null && Distances.Rows > 0
    208209          && Distances.Rows == Distances.Columns) {
    209           if (Distances.Rows > 35) {
     210          if (Distances.Rows > 50) {
    210211            newBitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
    211212            WriteCenteredTextToBitmap(ref newBitmap, "Problem dimension is too large for visualization.");
     
    214215        } else if (weightsRadioButton.Checked && Weights != null && Weights.Rows > 0
    215216          && Weights.Rows == Weights.Columns) {
    216           if (Weights.Rows > 35) {
     217          if (Weights.Rows > 50) {
    217218            newBitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
    218219            WriteCenteredTextToBitmap(ref newBitmap, "Problem dimension is too large for visualization.");
     
    228229          && Assignment.Length == Distances.Rows
    229230          && Assignment.Validate()) {
    230           if (Assignment.Length > 35) {
     231          if (Assignment.Length > 50) {
    231232            newBitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
    232233            WriteCenteredTextToBitmap(ref newBitmap, "Problem dimension is too large for visualization.");
     
    249250        Bitmap newBitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
    250251        stressLabel.Text = "-";
     252        stressLabel.ForeColor = Color.Black;
    251253        WriteCenteredTextToBitmap(ref newBitmap, "Please refresh view.");
    252254        showingMessage = false; // we're showing a message, but we should be showing the visualization, so this is false
     
    270272          stress = MultidimensionalScaling.CalculateNormalizedStress(distances, coordinates);
    271273          stressLabel.Text = stress.ToString("0.00", CultureInfo.CurrentCulture.NumberFormat);
     274          if (stress < 0.1) stressLabel.ForeColor = Color.DarkGreen;
     275          else if (stress < 0.2) stressLabel.ForeColor = Color.DarkOrange;
     276          else stressLabel.ForeColor = Color.DarkRed;
    272277        } catch {
    273278          WriteCenteredTextToBitmap(ref newBitmap, "Distance matrix is not symmetric");
    274279          showingMessage = true;
    275280          stressLabel.Text = "-";
     281          stressLabel.ForeColor = Color.Black;
    276282          return newBitmap;
    277283        }
     
    349355        for (int i = 0; i < weights.Rows; i++)
    350356          for (int j = i + 1; j < weights.Rows; j++) {
    351             if (weights[i, j] > maxWeight)
    352               maxWeight = weights[i, j] + weights[j, i];
     357            if (weights[i, j] > maxWeight) maxWeight = weights[i, j];
     358            if (weights[j, i] > maxWeight) maxWeight = weights[j, i];
    353359          }
    354360
     
    356362        for (int i = 0; i < distances.Rows; i++)
    357363          for (int j = 0; j < distances.Columns; j++) {
    358             distances[i, j] = maxWeight + 1 - weights[i, j];
     364            if (weights[i, j] == 0) distances[i, j] = double.NaN;
     365            else distances[i, j] = maxWeight / weights[i, j];
    359366          }
    360367
     
    365372          stress = MultidimensionalScaling.CalculateNormalizedStress(distances, coordinates);
    366373          stressLabel.Text = stress.ToString("0.00", CultureInfo.CurrentCulture.NumberFormat);
     374          if (stress < 0.1) stressLabel.ForeColor = Color.DarkGreen;
     375          else if (stress < 0.2) stressLabel.ForeColor = Color.DarkOrange;
     376          else stressLabel.ForeColor = Color.DarkRed;
    367377        } catch {
    368378          WriteCenteredTextToBitmap(ref newBitmap, "Weights matrix is not symmetric");
    369379          showingMessage = true;
    370380          stressLabel.Text = "-";
     381          stressLabel.ForeColor = Color.Black;
    371382          return newBitmap;
    372383        }
     
    454465          stress = MultidimensionalScaling.CalculateNormalizedStress(distances, coordinates);
    455466          stressLabel.Text = stress.ToString("0.00", CultureInfo.CurrentCulture.NumberFormat);
     467          if (stress < 0.1) stressLabel.ForeColor = Color.DarkGreen;
     468          else if (stress < 0.2) stressLabel.ForeColor = Color.DarkOrange;
     469          else stressLabel.ForeColor = Color.DarkRed;
    456470        } catch {
    457471          WriteCenteredTextToBitmap(ref newBitmap, "Unknown error");
    458472          showingMessage = true;
    459473          stressLabel.Text = "-";
     474          stressLabel.ForeColor = Color.Black;
    460475          return newBitmap;
    461476        }
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.Designer.cs

    r7270 r7669  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.importInstanceButton = new System.Windows.Forms.Button();
    48       this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    49       this.QAPLIBInstancesLabel = new System.Windows.Forms.Label();
    50       this.instancesComboBox = new System.Windows.Forms.ComboBox();
    51       this.loadInstanceButton = new System.Windows.Forms.Button();
    5247      this.tabControl = new System.Windows.Forms.TabControl();
    5348      this.problemTabPage = new System.Windows.Forms.TabPage();
    5449      this.visualizationTabPage = new System.Windows.Forms.TabPage();
    5550      this.qapView = new HeuristicLab.Problems.QuadraticAssignment.Views.QAPVisualizationControl();
     51      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
     52      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
     53      this.problemInstanceSplitContainer.Panel2.SuspendLayout();
     54      this.problemInstanceSplitContainer.SuspendLayout();
    5655      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5756      this.tabControl.SuspendLayout();
     57      this.problemTabPage.SuspendLayout();
    5858      this.visualizationTabPage.SuspendLayout();
    5959      this.SuspendLayout();
    6060      //
     61      // libraryInfoButton
     62      //
     63      this.libraryInfoButton.Location = new System.Drawing.Point(224, 1);
     64      //
     65      // problemInstanceSplitContainer
     66      //
     67      //
     68      // problemInstanceSplitContainer.Panel2
     69      //
     70      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.tabControl);
     71      //
    6172      // parameterCollectionView
    6273      //
    63       this.parameterCollectionView.Location = new System.Drawing.Point(8, 107);
    64       this.parameterCollectionView.Size = new System.Drawing.Size(629, 375);
     74      this.parameterCollectionView.Location = new System.Drawing.Point(0, 3);
     75      this.parameterCollectionView.Size = new System.Drawing.Size(497, 269);
    6576      //
    6677      // nameTextBox
     
    6879      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    6980      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    70       this.nameTextBox.Location = new System.Drawing.Point(105, 29);
    71       this.nameTextBox.Size = new System.Drawing.Size(517, 20);
    72       //
    73       // nameLabel
    74       //
    75       this.nameLabel.Location = new System.Drawing.Point(3, 32);
    76       //
    77       // infoLabel
    78       //
    79       this.infoLabel.Location = new System.Drawing.Point(628, 32);
    80       //
    81       // importInstanceButton
    82       //
    83       this.importInstanceButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    84       this.importInstanceButton.Location = new System.Drawing.Point(548, 0);
    85       this.importInstanceButton.Name = "importInstanceButton";
    86       this.importInstanceButton.Size = new System.Drawing.Size(99, 23);
    87       this.importInstanceButton.TabIndex = 5;
    88       this.importInstanceButton.Text = "Import...";
    89       this.importInstanceButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
    90       this.toolTip.SetToolTip(this.importInstanceButton, "Import files in QAPLIB format.");
    91       this.importInstanceButton.UseVisualStyleBackColor = true;
    92       this.importInstanceButton.Click += new System.EventHandler(this.importInstanceButton_Click);
    93       //
    94       // openFileDialog
    95       //
    96       this.openFileDialog.FileName = "instance.dat";
    97       this.openFileDialog.Filter = "Dat files|*.dat|All files|*.*";
    98       //
    99       // QAPLIBInstancesLabel
    100       //
    101       this.QAPLIBInstancesLabel.AutoSize = true;
    102       this.QAPLIBInstancesLabel.Cursor = System.Windows.Forms.Cursors.Hand;
    103       this.QAPLIBInstancesLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    104       this.QAPLIBInstancesLabel.ForeColor = System.Drawing.Color.Blue;
    105       this.QAPLIBInstancesLabel.Location = new System.Drawing.Point(3, 5);
    106       this.QAPLIBInstancesLabel.Name = "QAPLIBInstancesLabel";
    107       this.QAPLIBInstancesLabel.Size = new System.Drawing.Size(96, 13);
    108       this.QAPLIBInstancesLabel.TabIndex = 6;
    109       this.QAPLIBInstancesLabel.Text = "QAPLIB instances:";
    110       this.toolTip.SetToolTip(this.QAPLIBInstancesLabel, "These instances were taken from the QAPLIB homepage at http://www.seas.upenn.edu/" +
    111               "qaplib/");
    112       this.QAPLIBInstancesLabel.Click += new System.EventHandler(this.QAPLIBInstancesLabel_Click);
    113       this.QAPLIBInstancesLabel.MouseEnter += new System.EventHandler(this.QAPLIBInstancesLabel_MouseEnter);
    114       this.QAPLIBInstancesLabel.MouseLeave += new System.EventHandler(this.QAPLIBInstancesLabel_MouseLeave);
    115       //
    116       // instancesComboBox
    117       //
    118       this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    119                   | System.Windows.Forms.AnchorStyles.Right)));
    120       this.instancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    121       this.instancesComboBox.FormattingEnabled = true;
    122       this.instancesComboBox.Location = new System.Drawing.Point(105, 2);
    123       this.instancesComboBox.Name = "instancesComboBox";
    124       this.instancesComboBox.Size = new System.Drawing.Size(358, 21);
    125       this.instancesComboBox.TabIndex = 7;
    126       this.instancesComboBox.SelectedValueChanged += new System.EventHandler(this.instancesComboBox_SelectedValueChanged);
    127       //
    128       // loadInstanceButton
    129       //
    130       this.loadInstanceButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    131       this.loadInstanceButton.Location = new System.Drawing.Point(469, 0);
    132       this.loadInstanceButton.Name = "loadInstanceButton";
    133       this.loadInstanceButton.Size = new System.Drawing.Size(73, 23);
    134       this.loadInstanceButton.TabIndex = 5;
    135       this.loadInstanceButton.Text = "Load";
    136       this.loadInstanceButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
    137       this.toolTip.SetToolTip(this.loadInstanceButton, "Load the selected QAPLIB instance.");
    138       this.loadInstanceButton.UseVisualStyleBackColor = true;
    139       this.loadInstanceButton.Click += new System.EventHandler(this.loadInstanceButton_Click);
    14081      //
    14182      // tabControl
     
    14687      this.tabControl.Controls.Add(this.problemTabPage);
    14788      this.tabControl.Controls.Add(this.visualizationTabPage);
    148       this.tabControl.Location = new System.Drawing.Point(0, 55);
     89      this.tabControl.Location = new System.Drawing.Point(0, 29);
    14990      this.tabControl.Name = "tabControl";
    15091      this.tabControl.SelectedIndex = 0;
    151       this.tabControl.Size = new System.Drawing.Size(647, 437);
     92      this.tabControl.Size = new System.Drawing.Size(511, 304);
    15293      this.tabControl.TabIndex = 8;
    15394      //
    15495      // problemTabPage
    15596      //
     97      this.problemTabPage.Controls.Add(this.parameterCollectionView);
    15698      this.problemTabPage.Location = new System.Drawing.Point(4, 22);
    15799      this.problemTabPage.Name = "problemTabPage";
    158100      this.problemTabPage.Padding = new System.Windows.Forms.Padding(3);
    159       this.problemTabPage.Size = new System.Drawing.Size(639, 411);
     101      this.problemTabPage.Size = new System.Drawing.Size(503, 278);
    160102      this.problemTabPage.TabIndex = 0;
    161103      this.problemTabPage.Text = "Problem";
     
    168110      this.visualizationTabPage.Name = "visualizationTabPage";
    169111      this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
    170       this.visualizationTabPage.Size = new System.Drawing.Size(639, 411);
     112      this.visualizationTabPage.Size = new System.Drawing.Size(503, 278);
    171113      this.visualizationTabPage.TabIndex = 1;
    172114      this.visualizationTabPage.Text = "Visualization";
     
    180122      this.qapView.Location = new System.Drawing.Point(3, 3);
    181123      this.qapView.Name = "qapView";
    182       this.qapView.Size = new System.Drawing.Size(633, 405);
     124      this.qapView.Size = new System.Drawing.Size(497, 272);
    183125      this.qapView.TabIndex = 0;
    184126      this.qapView.Weights = null;
     
    188130      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    189131      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    190       this.Controls.Add(this.instancesComboBox);
    191       this.Controls.Add(this.tabControl);
    192       this.Controls.Add(this.importInstanceButton);
    193       this.Controls.Add(this.loadInstanceButton);
    194       this.Controls.Add(this.QAPLIBInstancesLabel);
    195132      this.Name = "QuadraticAssignmentProblemView";
    196       this.Size = new System.Drawing.Size(647, 492);
    197       this.Controls.SetChildIndex(this.QAPLIBInstancesLabel, 0);
    198       this.Controls.SetChildIndex(this.loadInstanceButton, 0);
    199       this.Controls.SetChildIndex(this.importInstanceButton, 0);
    200       this.Controls.SetChildIndex(this.tabControl, 0);
    201       this.Controls.SetChildIndex(this.instancesComboBox, 0);
    202       this.Controls.SetChildIndex(this.infoLabel, 0);
    203       this.Controls.SetChildIndex(this.parameterCollectionView, 0);
    204       this.Controls.SetChildIndex(this.nameLabel, 0);
    205       this.Controls.SetChildIndex(this.nameTextBox, 0);
     133      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
     134      this.problemInstanceSplitContainer.Panel1.PerformLayout();
     135      this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
     136      this.problemInstanceSplitContainer.Panel2.PerformLayout();
     137      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
     138      this.problemInstanceSplitContainer.ResumeLayout(false);
    206139      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    207140      this.tabControl.ResumeLayout(false);
     141      this.problemTabPage.ResumeLayout(false);
    208142      this.visualizationTabPage.ResumeLayout(false);
    209143      this.ResumeLayout(false);
    210       this.PerformLayout();
    211144
    212145    }
     
    214147    #endregion
    215148
    216     private System.Windows.Forms.Button importInstanceButton;
    217     private System.Windows.Forms.OpenFileDialog openFileDialog;
    218     private System.Windows.Forms.Label QAPLIBInstancesLabel;
    219     private System.Windows.Forms.ComboBox instancesComboBox;
    220     private System.Windows.Forms.Button loadInstanceButton;
    221149    private System.Windows.Forms.TabControl tabControl;
    222150    private System.Windows.Forms.TabPage problemTabPage;
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.cs

    r7270 r7669  
    2121
    2222using System;
    23 using System.Drawing;
    24 using System.IO;
    2523using System.Windows.Forms;
    26 using HeuristicLab.Common.Resources;
    27 using HeuristicLab.Core.Views;
    2824using HeuristicLab.MainForm;
    2925using HeuristicLab.MainForm.WindowsForms;
     26using HeuristicLab.Optimization.Views;
    3027
    3128namespace HeuristicLab.Problems.QuadraticAssignment.Views {
    3229  [View("Quadratic Assignment Problem View")]
    3330  [Content(typeof(QuadraticAssignmentProblem), IsDefaultView = true)]
    34   public sealed partial class QuadraticAssignmentProblemView : ParameterizedNamedItemView {
     31  public sealed partial class QuadraticAssignmentProblemView : ProblemView {
    3532    public new QuadraticAssignmentProblem Content {
    3633      get { return (QuadraticAssignmentProblem)base.Content; }
     
    4037    public QuadraticAssignmentProblemView() {
    4138      InitializeComponent();
    42       importInstanceButton.Image = VSImageLibrary.Open;
    4339      Controls.Remove(parameterCollectionView);
    4440      parameterCollectionView.Dock = DockStyle.Fill;
     
    7470    protected override void OnContentChanged() {
    7571      base.OnContentChanged();
    76       instancesComboBox.Items.Clear();
    7772      if (Content != null) {
    78         foreach (string instance in Content.Instances) {
    79           instancesComboBox.Items.Add(instance);
    80         }
    8173        qapView.Distances = Content.Distances;
    8274        qapView.Weights = Content.Weights;
     
    9183    protected override void SetEnabledStateOfControls() {
    9284      base.SetEnabledStateOfControls();
    93       instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null;
    94       loadInstanceButton.Enabled = !ReadOnly && !Locked && Content != null && instancesComboBox.SelectedItem != null;
    95       importInstanceButton.Enabled = !ReadOnly && !Locked && Content != null;
    96     }
    97 
    98     private void instancesComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
    99       loadInstanceButton.Enabled = instancesComboBox.SelectedItem != null;
    100     }
    101 
    102     private void loadInstanceButton_Click(object sender, System.EventArgs e) {
    103       string instance = instancesComboBox.SelectedItem as string;
    104       try {
    105         Content.LoadInstanceFromEmbeddedResource(instance);
    106       } catch (Exception ex) {
    107         PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    108       }
    109     }
    110 
    111     private void importInstanceButton_Click(object sender, System.EventArgs e) {
    112       if (openFileDialog.ShowDialog() == DialogResult.OK) {
    113         try {
    114           string datFile = openFileDialog.FileName;
    115           string directory = Path.GetDirectoryName(datFile);
    116           string solFile = Path.Combine(directory, Path.GetFileNameWithoutExtension(datFile) + ".sln");
    117           if (File.Exists(solFile)) {
    118             Content.LoadInstanceFromFile(datFile, solFile);
    119           } else {
    120             Content.LoadInstanceFromFile(datFile);
    121           }
    122         } catch (Exception ex) {
    123           PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    124         }
    125       }
    126     }
    127 
    128     private void QAPLIBInstancesLabel_Click(object sender, System.EventArgs e) {
    129       System.Diagnostics.Process.Start("http://www.seas.upenn.edu/qaplib/");
    130     }
    131 
    132     private void QAPLIBInstancesLabel_MouseEnter(object sender, EventArgs e) {
    133       Cursor = Cursors.Hand;
    134       QAPLIBInstancesLabel.ForeColor = Color.Red;
    135       toolTip.SetToolTip(QAPLIBInstancesLabel, "Browse to http://www.seas.upenn.edu/qaplib/");
    136     }
    137 
    138     private void QAPLIBInstancesLabel_MouseLeave(object sender, EventArgs e) {
    139       Cursor = Cursors.Default;
    140       QAPLIBInstancesLabel.ForeColor = Color.Blue;
    141       toolTip.SetToolTip(QAPLIBInstancesLabel, String.Empty);
    14285    }
    14386  }
Note: See TracChangeset for help on using the changeset viewer.