Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/27/09 17:57:31 (15 years ago)
Author:
bspisic
Message:

Make OptionsDialog modeless (#560)
Y-Axis-Tab in OptionsDialog reformatted

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.cs

    r1390 r1459  
    1212    private LineParams[] oldLineParams;
    1313    private Dictionary<CheckBox,bool> ShowYAxisBoxes;
     14    private Dictionary<CheckBox,bool> yAxisClipChangeableBoxes;
    1415
    1516    internal class LineParams {
     
    9596    private void InitTabPageYAxes() {
    9697      ShowYAxisBoxes = new Dictionary<CheckBox, bool>();
     98      yAxisClipChangeableBoxes = new Dictionary<CheckBox, bool>();
     99
    97100      for (int i = 0; i < model.YAxes.Count; i++) {
    98101        YAxisDescriptor yAxisDescriptor = model.YAxes[i];
    99102
    100         CheckBox chkbox = new CheckBox();
    101         chkbox.Text = yAxisDescriptor.Label;
    102         chkbox.Checked = yAxisDescriptor.ShowYAxis;
    103         ShowYAxisBoxes[chkbox] = yAxisDescriptor.ShowYAxis;
    104         chkbox.CheckedChanged += delegate { yAxisDescriptor.ShowYAxis = chkbox.Checked; };
     103        CheckBox cbxShowYAxis = new CheckBox();
     104        cbxShowYAxis.Text = yAxisDescriptor.Label;
     105        cbxShowYAxis.Checked = yAxisDescriptor.ShowYAxis;
     106        ShowYAxisBoxes[cbxShowYAxis] = yAxisDescriptor.ShowYAxis;
     107        cbxShowYAxis.CheckedChanged += delegate { yAxisDescriptor.ShowYAxis = cbxShowYAxis.Checked; };
    105108       
    106         dataRowsFlowLayout.Controls.Add(chkbox);
    107       }
    108 
    109       for (int i = 0; i < model.YAxes.Count; i++) {
    110         YAxisDescriptor yAxisDescriptor = model.YAxes[i];
    111 
    112         CheckBox chkbox = new CheckBox();
    113         chkbox.Text = yAxisDescriptor.Label;
    114         chkbox.Checked = yAxisDescriptor.ClipChangeable;
    115         chkbox.CheckedChanged += delegate { yAxisDescriptor.ClipChangeable = chkbox.Checked; };
    116 
    117         dataRowsFlowLayout.Controls.Add(chkbox);
     109        flpShowYAxis.Controls.Add(cbxShowYAxis);
     110
     111        CheckBox cbxClipChangeable = new CheckBox();
     112        cbxClipChangeable.Text = yAxisDescriptor.Label;
     113        cbxClipChangeable.Checked = yAxisDescriptor.ClipChangeable;
     114        yAxisClipChangeableBoxes[cbxClipChangeable] = yAxisDescriptor.ClipChangeable;
     115        cbxClipChangeable.CheckedChanged += delegate { yAxisDescriptor.ClipChangeable = cbxClipChangeable.Checked; };
     116
     117        flpYAxisClipChangeable.Controls.Add(cbxClipChangeable);
    118118      }
    119119    }
     
    137137    }
    138138   
    139 
    140    
    141 
    142139    private void cbLegendPosition_SelectedIndexChanged(object sender, EventArgs e) {
    143140      viewSettings.LegendPosition = (LegendPosition)cbLegendPosition.SelectedItem;
     
    195192        box.Key.Checked = box.Value;
    196193      }
     194
     195      foreach (KeyValuePair<CheckBox, bool> box in yAxisClipChangeableBoxes) {
     196        box.Key.Checked = box.Value;
     197      }
     198
    197199      viewSettings.LegendColor = oldViewSettings.LegendColor;
    198200      viewSettings.LegendPosition = oldViewSettings.LegendPosition;
     
    216218        ((IDataRow)LineSelectCB.SelectedValue).Thickness = (int)LineThicknessCB.SelectedItem;
    217219    }
    218 
    219 
    220 
    221 
    222220  }
    223221}
Note: See TracChangeset for help on using the changeset viewer.