Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/29/19 17:45:06 (5 years ago)
Author:
ddorfmei
Message:

#2931: solved the issues found during the review

File:
1 copied

Legend:

Unmodified
Added
Removed
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization.Views/3.3/FileBasedLinearProblemDefinitionView.cs

    r16046 r16582  
    2323using System.Windows.Forms;
    2424using HeuristicLab.Core.Views;
     25using HeuristicLab.ExactOptimization.LinearProgramming;
    2526using HeuristicLab.MainForm;
    2627
    27 namespace HeuristicLab.Data.Views {
    28   [View("FileValueView")]
    29   [Content(typeof(FileValue), true)]
    30   public partial class FileValueView : ItemView {
    31     public new FileValue Content {
    32       get { return (FileValue)base.Content; }
    33       set { base.Content = value; }
     28namespace HeuristicLab.ExactOptimization.Views {
     29  [View(nameof(FileBasedLinearProblemDefinitionView))]
     30  [Content(typeof(FileBasedLinearProblemDefinition), IsDefaultView = true)]
     31  public partial class FileBasedLinearProblemDefinitionView : ItemView {
     32    public new FileBasedLinearProblemDefinition Content {
     33      get => (FileBasedLinearProblemDefinition)base.Content;
     34      set => base.Content = value;
    3435    }
    3536
    36     public FileValueView() {
     37    public FileBasedLinearProblemDefinitionView() {
    3738      InitializeComponent();
     39      stringConvertibleValueView.LabelVisible = false;
     40      stringConvertibleValueView.ReadOnly = true;
    3841    }
    3942
     
    5053      }
    5154
    52       stringConvertibleValueView.Content = Content.StringValue;
    53       openFileDialog.Filter = Content.FileDialogFilter;
     55      stringConvertibleValueView.Content = Content.FileNameParam.Value.StringValue;
     56      openFileDialog.Filter = Content.FileNameParam.Value.FileDialogFilter;
    5457    }
    5558
    5659    protected virtual void openButton_Click(object sender, EventArgs e) {
    57       openFileDialog.Filter = Content.FileDialogFilter;
     60      openFileDialog.Filter = Content.FileNameParam.Value.FileDialogFilter;
    5861      if (openFileDialog.ShowDialog(this) != DialogResult.OK) return;
    59       Content.Value = openFileDialog.FileName;
     62      Content.FileNameParam.Value.Value = openFileDialog.FileName;
    6063    }
    6164  }
Note: See TracChangeset for help on using the changeset viewer.