Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1459


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

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

Location:
trunk/sources/HeuristicLab.Visualization
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/LineChart.cs

    r1458 r1459  
    252252    private void optionsToolStripMenuItem_Click(object sender, EventArgs e) {
    253253      OptionsDialog optionsdlg = new OptionsDialog(model);
    254       optionsdlg.ShowDialog(this);
    255       Invalidate();
     254      optionsdlg.Show();
    256255    }
    257256
  • trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.Designer.cs

    r1389 r1459  
    4848      this.btnChangeXAxisFont = new System.Windows.Forms.Button();
    4949      this.tpYAxes = new System.Windows.Forms.TabPage();
    50       this.dataRowsFlowLayout = new System.Windows.Forms.FlowLayoutPanel();
     50      this.gbxShowYAxis = new System.Windows.Forms.GroupBox();
     51      this.gbxYAxisClipChangeable = new System.Windows.Forms.GroupBox();
     52      this.flpShowYAxis = new System.Windows.Forms.FlowLayoutPanel();
     53      this.flpYAxisClipChangeable = new System.Windows.Forms.FlowLayoutPanel();
    5154      this.tpTitle.SuspendLayout();
    5255      this.tabPage2.SuspendLayout();
     
    5659      this.tpXAxis.SuspendLayout();
    5760      this.tpYAxes.SuspendLayout();
     61      this.gbxShowYAxis.SuspendLayout();
     62      this.gbxYAxisClipChangeable.SuspendLayout();
    5863      this.SuspendLayout();
    5964      //
     
    292297      // tpYAxes
    293298      //
    294       this.tpYAxes.Controls.Add(this.dataRowsFlowLayout);
     299      this.tpYAxes.Controls.Add(this.gbxYAxisClipChangeable);
     300      this.tpYAxes.Controls.Add(this.gbxShowYAxis);
    295301      this.tpYAxes.Location = new System.Drawing.Point(4, 22);
    296302      this.tpYAxes.Name = "tpYAxes";
     
    301307      this.tpYAxes.UseVisualStyleBackColor = true;
    302308      //
    303       // dataRowsFlowLayout
    304       //
    305       this.dataRowsFlowLayout.Dock = System.Windows.Forms.DockStyle.Fill;
    306       this.dataRowsFlowLayout.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
    307       this.dataRowsFlowLayout.Location = new System.Drawing.Point(3, 3);
    308       this.dataRowsFlowLayout.Name = "dataRowsFlowLayout";
    309       this.dataRowsFlowLayout.Size = new System.Drawing.Size(278, 193);
    310       this.dataRowsFlowLayout.TabIndex = 0;
     309      // gbxShowYAxis
     310      //
     311      this.gbxShowYAxis.AutoSize = true;
     312      this.gbxShowYAxis.Controls.Add(this.flpShowYAxis);
     313      this.gbxShowYAxis.Location = new System.Drawing.Point(0, 0);
     314      this.gbxShowYAxis.Name = "gbxShowYAxis";
     315      this.gbxShowYAxis.Size = new System.Drawing.Size(281, 76);
     316      this.gbxShowYAxis.TabIndex = 0;
     317      this.gbxShowYAxis.TabStop = false;
     318      this.gbxShowYAxis.Text = "Show Y-Axis";
     319      //
     320      // gbxYAxisClipChangeable
     321      //
     322      this.gbxYAxisClipChangeable.AutoSize = true;
     323      this.gbxYAxisClipChangeable.Controls.Add(this.flpYAxisClipChangeable);
     324      this.gbxYAxisClipChangeable.Location = new System.Drawing.Point(0, 82);
     325      this.gbxYAxisClipChangeable.Name = "gbxYAxisClipChangeable";
     326      this.gbxYAxisClipChangeable.Size = new System.Drawing.Size(281, 76);
     327      this.gbxYAxisClipChangeable.TabIndex = 1;
     328      this.gbxYAxisClipChangeable.TabStop = false;
     329      this.gbxYAxisClipChangeable.Text = "Y-Axis-Clip changeable";
     330      //
     331      // flpShowYAxis
     332      //
     333      this.flpShowYAxis.AutoSize = true;
     334      this.flpShowYAxis.Dock = System.Windows.Forms.DockStyle.Fill;
     335      this.flpShowYAxis.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
     336      this.flpShowYAxis.Location = new System.Drawing.Point(3, 16);
     337      this.flpShowYAxis.Name = "flpShowYAxis";
     338      this.flpShowYAxis.Size = new System.Drawing.Size(275, 57);
     339      this.flpShowYAxis.TabIndex = 0;
     340      //
     341      // flpYAxisClipChangeable
     342      //
     343      this.flpYAxisClipChangeable.AutoSize = true;
     344      this.flpYAxisClipChangeable.Dock = System.Windows.Forms.DockStyle.Fill;
     345      this.flpYAxisClipChangeable.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
     346      this.flpYAxisClipChangeable.Location = new System.Drawing.Point(3, 16);
     347      this.flpYAxisClipChangeable.Name = "flpYAxisClipChangeable";
     348      this.flpYAxisClipChangeable.Size = new System.Drawing.Size(275, 57);
     349      this.flpYAxisClipChangeable.TabIndex = 0;
    311350      //
    312351      // OptionsDialog
     
    333372      this.tpXAxis.ResumeLayout(false);
    334373      this.tpYAxes.ResumeLayout(false);
     374      this.tpYAxes.PerformLayout();
     375      this.gbxShowYAxis.ResumeLayout(false);
     376      this.gbxShowYAxis.PerformLayout();
     377      this.gbxYAxisClipChangeable.ResumeLayout(false);
     378      this.gbxYAxisClipChangeable.PerformLayout();
    335379      this.ResumeLayout(false);
    336380
     
    363407    private System.Windows.Forms.Button btnChangeXAxisFont;
    364408    private System.Windows.Forms.TabPage tpYAxes;
    365     private System.Windows.Forms.FlowLayoutPanel dataRowsFlowLayout;
     409    private System.Windows.Forms.GroupBox gbxShowYAxis;
     410    private System.Windows.Forms.GroupBox gbxYAxisClipChangeable;
     411    private System.Windows.Forms.FlowLayoutPanel flpYAxisClipChangeable;
     412    private System.Windows.Forms.FlowLayoutPanel flpShowYAxis;
    366413  }
    367414}
  • 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.