Changeset 17454
- Timestamp:
- 02/26/20 13:23:49 (5 years ago)
- Location:
- branches/3026_IntegrationIntoSymSpace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/RangeVM.cs
r17446 r17454 35 35 get => Cast(((Array)Item.Value).GetValue(0)); 36 36 set { 37 SetValue(value, ( (Array)Item.Value).GetValue(1));37 SetValue(value, (T)((Array)Item.Value).GetValue(1)); 38 38 OnPropertyChange(this, nameof(MinValue)); 39 39 } … … 43 43 get => Cast(((Array)Item.Value).GetValue(1)); 44 44 set { 45 SetValue(( (Array)Item.Value).GetValue(0), value);45 SetValue((T)((Array)Item.Value).GetValue(0), value); 46 46 OnPropertyChange(this, nameof(MaxValue)); 47 47 } 48 48 } 49 49 50 private void SetValue( object min, objectmax) =>51 Item.Value = new object[] { min, max };50 private void SetValue(T min, T max) => 51 Item.Value = new T[] { min, max }; 52 52 } 53 53 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemRangeControl.Designer.cs
r17443 r17454 29 29 this.label4 = new System.Windows.Forms.Label(); 30 30 this.label2 = new System.Windows.Forms.Label(); 31 this.numericRangeControl1 = new HeuristicLab.JsonInterface.OptimizerIntegration.NumericRangeControl(); 31 this.numericRangeControl = new HeuristicLab.JsonInterface.OptimizerIntegration.NumericRangeControl(); 32 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 32 33 this.groupBox1.SuspendLayout(); 33 34 this.SuspendLayout(); … … 41 42 this.groupBox1.Controls.Add(this.label4); 42 43 this.groupBox1.Controls.Add(this.label2); 43 this.groupBox1.Location = new System.Drawing.Point( 9, 101);44 this.groupBox1.Location = new System.Drawing.Point(7, 101); 44 45 this.groupBox1.Name = "groupBox1"; 45 this.groupBox1.Size = new System.Drawing.Size(487, 6 4);46 this.groupBox1.Size = new System.Drawing.Size(487, 65); 46 47 this.groupBox1.TabIndex = 17; 47 48 this.groupBox1.TabStop = false; … … 52 53 this.textBoxValueTo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 53 54 | System.Windows.Forms.AnchorStyles.Right))); 54 this.textBoxValueTo.Location = new System.Drawing.Point( 249, 36);55 this.textBoxValueTo.Location = new System.Drawing.Point(83, 39); 55 56 this.textBoxValueTo.Name = "textBoxValueTo"; 56 this.textBoxValueTo.Size = new System.Drawing.Size( 230, 20);57 this.textBoxValueTo.Size = new System.Drawing.Size(398, 20); 57 58 this.textBoxValueTo.TabIndex = 3; 58 59 // 59 60 // textBoxValueFrom 60 61 // 61 this.textBoxValueFrom.Location = new System.Drawing.Point( 10, 36);62 this.textBoxValueFrom.Location = new System.Drawing.Point(83, 13); 62 63 this.textBoxValueFrom.Name = "textBoxValueFrom"; 63 this.textBoxValueFrom.Size = new System.Drawing.Size( 230, 20);64 this.textBoxValueFrom.Size = new System.Drawing.Size(398, 20); 64 65 this.textBoxValueFrom.TabIndex = 2; 65 66 // … … 69 70 | System.Windows.Forms.AnchorStyles.Right))); 70 71 this.label4.AutoSize = true; 71 this.label4.Location = new System.Drawing.Point( 246, 20);72 this.label4.Location = new System.Drawing.Point(6, 42); 72 73 this.label4.Name = "label4"; 73 this.label4.Size = new System.Drawing.Size(2 0, 13);74 this.label4.Size = new System.Drawing.Size(23, 13); 74 75 this.label4.TabIndex = 1; 75 this.label4.Text = "To ";76 this.label4.Text = "To:"; 76 77 // 77 78 // label2 … … 80 81 | System.Windows.Forms.AnchorStyles.Right))); 81 82 this.label2.AutoSize = true; 82 this.label2.Location = new System.Drawing.Point( 7, 20);83 this.label2.Location = new System.Drawing.Point(6, 16); 83 84 this.label2.Name = "label2"; 84 this.label2.Size = new System.Drawing.Size(3 0, 13);85 this.label2.Size = new System.Drawing.Size(33, 13); 85 86 this.label2.TabIndex = 0; 86 this.label2.Text = "From ";87 this.label2.Text = "From:"; 87 88 // 88 // numericRangeControl 189 // numericRangeControl 89 90 // 90 this.numericRangeControl 1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)91 this.numericRangeControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 91 92 | System.Windows.Forms.AnchorStyles.Right))); 92 this.numericRangeControl 1.Location = new System.Drawing.Point(9, 171);93 this.numericRangeControl 1.Name = "numericRangeControl1";94 this.numericRangeControl 1.Size = new System.Drawing.Size(487, 112);95 this.numericRangeControl 1.TabIndex = 18;93 this.numericRangeControl.Location = new System.Drawing.Point(7, 172); 94 this.numericRangeControl.Name = "numericRangeControl"; 95 this.numericRangeControl.Size = new System.Drawing.Size(487, 74); 96 this.numericRangeControl.TabIndex = 18; 96 97 // 97 98 // JsonItemRangeControl … … 99 100 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 100 101 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 101 this.Controls.Add(this.numericRangeControl 1);102 this.Controls.Add(this.numericRangeControl); 102 103 this.Controls.Add(this.groupBox1); 104 this.errorProvider.SetIconAlignment(this, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 103 105 this.Name = "JsonItemRangeControl"; 104 this.Size = new System.Drawing.Size(500, 2 90);106 this.Size = new System.Drawing.Size(500, 252); 105 107 this.Controls.SetChildIndex(this.groupBox1, 0); 106 this.Controls.SetChildIndex(this.numericRangeControl1, 0); 108 this.Controls.SetChildIndex(this.numericRangeControl, 0); 109 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 107 110 this.groupBox1.ResumeLayout(false); 108 111 this.groupBox1.PerformLayout(); … … 119 122 private System.Windows.Forms.Label label4; 120 123 private System.Windows.Forms.Label label2; 121 private NumericRangeControl numericRangeControl 1;124 private NumericRangeControl numericRangeControl; 122 125 } 123 126 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemRangeControl.cs
r17420 r17454 15 15 public JsonItemRangeControl(DoubleRangeVM vm) : base(vm) { 16 16 InitializeComponent(); 17 /* 18 this.isDouble = isDouble; 19 textBoxValueFrom.Text = ((Array)VM.Item.Value).GetValue(0).ToString(); 20 textBoxValueTo.Text = ((Array)VM.Item.Value).GetValue(1).ToString(); 21 textBoxValueFrom.Text = VM.Item.Range.First().ToString(); 22 textBoxValueTo.Text = VM.Item.Range.Last().ToString(); 23 */ 17 textBoxValueFrom.DataBindings.Add("Text", vm, nameof(vm.MinValue)); 18 textBoxValueTo.DataBindings.Add("Text", vm, nameof(vm.MaxValue)); 19 InitNumbericRangeControl(); 20 24 21 } 25 22 public JsonItemRangeControl(IntRangeVM vm) : base(vm) { 26 23 InitializeComponent(); 27 /* 28 this.isDouble = isDouble; 29 textBoxValueFrom.Text = ((Array)VM.Item.Value).GetValue(0).ToString(); 30 textBoxValueTo.Text = ((Array)VM.Item.Value).GetValue(1).ToString(); 31 textBoxValueFrom.Text = VM.Item.Range.First().ToString(); 32 textBoxValueTo.Text = VM.Item.Range.Last().ToString(); 33 */ 24 textBoxValueFrom.DataBindings.Add("Text", vm, nameof(vm.MinValue)); 25 textBoxValueTo.DataBindings.Add("Text", vm, nameof(vm.MaxValue)); 26 InitNumbericRangeControl(); 34 27 } 28 29 private void InitNumbericRangeControl() { 30 numericRangeControl.TBMinRange.DataBindings.Add("Text", VM, nameof(RangedValueBaseVM.MinRange)); 31 numericRangeControl.TBMaxRange.DataBindings.Add("Text", VM, nameof(RangedValueBaseVM.MaxRange)); 32 numericRangeControl.EnableMinRange.DataBindings.Add("Checked", VM, nameof(RangedValueBaseVM.EnableMinRange), 33 false, DataSourceUpdateMode.OnPropertyChanged); 34 numericRangeControl.EnableMaxRange.DataBindings.Add("Checked", VM, nameof(RangedValueBaseVM.EnableMaxRange), 35 false, DataSourceUpdateMode.OnPropertyChanged); 36 } 37 35 38 /* 36 39 protected abstract object Parse(string s); -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemRangeControl.resx
r17404 r17454 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 <value>17, 17</value> 122 </metadata> 120 123 </root> -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs
r17451 r17454 7 7 namespace HeuristicLab.JsonInterface { 8 8 public class IntJsonItem : JsonItem<int> { 9 /* I9 /* 10 10 public int MinValue { get; set; } 11 11 public int MaxValue { get; set; }
Note: See TracChangeset
for help on using the changeset viewer.