Changeset 16582 for branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization.Views/3.3/FileBasedLinearProblemDefinitionView.cs
- Timestamp:
- 01/29/19 17:45:06 (5 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization.Views/3.3/FileBasedLinearProblemDefinitionView.cs
r16046 r16582 23 23 using System.Windows.Forms; 24 24 using HeuristicLab.Core.Views; 25 using HeuristicLab.ExactOptimization.LinearProgramming; 25 26 using HeuristicLab.MainForm; 26 27 27 namespace HeuristicLab. Data.Views {28 [View( "FileValueView")]29 [Content(typeof(File Value),true)]30 public partial class File ValueView : ItemView {31 public new File ValueContent {32 get { return (FileValue)base.Content; }33 set { base.Content = value; }28 namespace 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; 34 35 } 35 36 36 public File ValueView() {37 public FileBasedLinearProblemDefinitionView() { 37 38 InitializeComponent(); 39 stringConvertibleValueView.LabelVisible = false; 40 stringConvertibleValueView.ReadOnly = true; 38 41 } 39 42 … … 50 53 } 51 54 52 stringConvertibleValueView.Content = Content. StringValue;53 openFileDialog.Filter = Content.File DialogFilter;55 stringConvertibleValueView.Content = Content.FileNameParam.Value.StringValue; 56 openFileDialog.Filter = Content.FileNameParam.Value.FileDialogFilter; 54 57 } 55 58 56 59 protected virtual void openButton_Click(object sender, EventArgs e) { 57 openFileDialog.Filter = Content.File DialogFilter;60 openFileDialog.Filter = Content.FileNameParam.Value.FileDialogFilter; 58 61 if (openFileDialog.ShowDialog(this) != DialogResult.OK) return; 59 Content. Value = openFileDialog.FileName;62 Content.FileNameParam.Value.Value = openFileDialog.FileName; 60 63 } 61 64 }
Note: See TracChangeset
for help on using the changeset viewer.