Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17412


Ignore:
Timestamp:
01/28/20 16:37:01 (5 years ago)
Author:
dpiringe
Message:

#3026 code cleanup

Location:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs

    r17411 r17412  
    2222
    2323    public virtual Type JsonItemType => typeof(JsonItem);
    24 
    25     //protected IJsonItemValueParser Parser { get; set; }
    26     //child tree
    27     //private IList<JsonItemVM> nodes = new List<JsonItemVM>();
    28 
    29     //public IEnumerable<JsonItemVM> Nodes { get => nodes; }
    30     //public JsonItemVM Parent { get; private set; }
    31 
    3224
    3325    private bool selected = true;
     
    5547      }
    5648    }
     49
    5750    public virtual JsonItemBaseControl GetControl() {
    5851      return new JsonItemBaseControl(this);
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/RangeVM.cs

    r17411 r17412  
    2121
    2222    public T MinValue {
    23       get => Cast(((Array)base.Item.Value).GetValue(0));
     23      get => Cast(((Array)Item.Value).GetValue(0));
    2424      set {
    25         SetValue(value, ((Array)base.Item.Value).GetValue(1));
     25        SetValue(value, ((Array)Item.Value).GetValue(1));
    2626        OnPropertyChange(this, nameof(MinValue));
    2727      }
     
    2929
    3030    public T MaxValue {
    31       get => Cast(((Array)base.Item.Value).GetValue(1));
     31      get => Cast(((Array)Item.Value).GetValue(1));
    3232      set {
    33         SetValue(((Array)base.Item.Value).GetValue(0), value);
     33        SetValue(((Array)Item.Value).GetValue(0), value);
    3434        OnPropertyChange(this, nameof(MaxValue));
    3535      }
     
    3737
    3838    public T MinRange {
    39       get => Cast(base.Item.Range.First());
     39      get => Cast(Item.Range.First());
    4040      set {
    41         SetRange(value, base.Item.Range.Last());
     41        SetRange(value, Item.Range.Last());
    4242        OnPropertyChange(this, nameof(MinRange));
    4343      }
     
    4545
    4646    public T MaxRange {
    47       get => Cast(base.Item.Range.Last());
     47      get => Cast(Item.Range.Last());
    4848      set {
    49         SetRange(base.Item.Range.First(), value);
     49        SetRange(Item.Range.First(), value);
    5050        OnPropertyChange(this, nameof(MaxRange));
    5151      }
     
    5555
    5656    private void SetValue(object min, object max) =>
    57       base.Item.Value = new object[] { min, max };
     57      Item.Value = new object[] { min, max };
    5858
    5959    private void SetRange(object min, object max) =>
    60       base.Item.Range = new object[] { min, max };
     60      Item.Range = new object[] { min, max };
    6161  }
    6262}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/SingleValueVM.cs

    r17411 r17412  
    4141   
    4242    public T Value {
    43       get => Cast(base.Item.Value);
     43      get => Cast(Item.Value);
    4444      set {
    45         base.Item.Value = value;
     45        Item.Value = value;
    4646        OnPropertyChange(this, nameof(Value));
    4747      }
     
    4949
    5050    public T MinRange {
    51       get => Cast(base.Item.Range.First());
     51      get => Cast(Item.Range.First());
    5252      set {
    53         SetRange(value, base.Item.Range.Last());
     53        SetRange(value, Item.Range.Last());
    5454        OnPropertyChange(this, nameof(MinRange));
    5555      }
     
    5757
    5858    public T MaxRange {
    59       get => Cast(base.Item.Range.Last());
     59      get => Cast(Item.Range.Last());
    6060      set {
    61         SetRange(base.Item.Range.First(), value);
     61        SetRange(Item.Range.First(), value);
    6262        OnPropertyChange(this, nameof(MaxRange));
    6363      }
     
    9090    private void SetRange(object min, object max) {
    9191      object[] range = new object[] { min, max };
    92       base.Item.Range = range;
     92      Item.Range = range;
    9393    }
    9494
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/StringValueVM.cs

    r17411 r17412  
    1212
    1313    public string Value {
    14       get => base.Item.Value.ToString();
     14      get => Item.Value.ToString();
    1515      set {
    16         base.Item.Value = value;
     16        Item.Value = value;
    1717        OnPropertyChange(this, nameof(Value));
    1818      }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs

    r17411 r17412  
    7878      }
    7979
    80       this.Close();
     80      Close();
    8181    }
    8282
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemBoolControl.cs

    r17411 r17412  
    1717      VM = vm;
    1818      checkBoxValue.DataBindings.Add("Checked", VM, nameof(BoolValueVM.Value));
    19       //checkBoxValue.Checked = (bool)vm.Item.Value;
    2019    }
    21     /*
    22     private void checkBoxValue_CheckStateChanged(object sender, EventArgs e) {
    23       VM.Item.Value = checkBoxValue.Checked;
    24     }
    25     */
    2620  }
    2721}
Note: See TracChangeset for help on using the changeset viewer.