Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1839


Ignore:
Timestamp:
05/15/09 18:50:45 (15 years ago)
Author:
bspisic
Message:

Model.Title is changeable in OptionsDialog now (#590)

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

Legend:

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

    r1781 r1839  
    6767      titleShape.Font = viewSettings.TitleFont;
    6868      titleShape.Color = viewSettings.TitleColor;
     69      titleShape.Text = model.Title;
    6970
    7071      legendShape.Font = viewSettings.LegendFont;
  • trunk/sources/HeuristicLab.Visualization/3.2/Options/Options.Designer.cs

    r1586 r1839  
    4242      this.cbLegendPosition = new System.Windows.Forms.ComboBox();
    4343      this.tpTitle = new System.Windows.Forms.TabPage();
     44      this.label5 = new System.Windows.Forms.Label();
     45      this.tbxTitle = new System.Windows.Forms.TextBox();
    4446      this.btnChangeTitleFont = new System.Windows.Forms.Button();
    4547      this.tpXAxis = new System.Windows.Forms.TabPage();
     
    245247      // tpTitle
    246248      //
     249      this.tpTitle.Controls.Add(this.label5);
     250      this.tpTitle.Controls.Add(this.tbxTitle);
    247251      this.tpTitle.Controls.Add(this.btnChangeTitleFont);
    248252      this.tpTitle.Location = new System.Drawing.Point(4, 22);
     
    253257      this.tpTitle.UseVisualStyleBackColor = true;
    254258      //
     259      // label5
     260      //
     261      this.label5.AutoSize = true;
     262      this.label5.Location = new System.Drawing.Point(3, 6);
     263      this.label5.Name = "label5";
     264      this.label5.Size = new System.Drawing.Size(30, 13);
     265      this.label5.TabIndex = 3;
     266      this.label5.Text = "Title:";
     267      //
     268      // tbxTitle
     269      //
     270      this.tbxTitle.Location = new System.Drawing.Point(39, 3);
     271      this.tbxTitle.Name = "tbxTitle";
     272      this.tbxTitle.Size = new System.Drawing.Size(151, 20);
     273      this.tbxTitle.TabIndex = 2;
     274      this.tbxTitle.TextChanged += new System.EventHandler(this.tbxTitle_TextChanged);
     275      //
    255276      // btnChangeTitleFont
    256277      //
    257       this.btnChangeTitleFont.Location = new System.Drawing.Point(3, 3);
     278      this.btnChangeTitleFont.Location = new System.Drawing.Point(193, 1);
    258279      this.btnChangeTitleFont.Name = "btnChangeTitleFont";
    259280      this.btnChangeTitleFont.Size = new System.Drawing.Size(94, 23);
     
    353374      this.tabPage2.PerformLayout();
    354375      this.tpTitle.ResumeLayout(false);
     376      this.tpTitle.PerformLayout();
    355377      this.tpXAxis.ResumeLayout(false);
    356378      this.tpYAxes.ResumeLayout(false);
     
    393415    private System.Windows.Forms.FlowLayoutPanel flpShowYAxis;
    394416    private System.Windows.Forms.FontDialog fdFont;
     417    private System.Windows.Forms.TextBox tbxTitle;
     418    private System.Windows.Forms.Label label5;
    395419  }
    396420}
  • trunk/sources/HeuristicLab.Visualization/3.2/Options/Options.cs

    r1586 r1839  
    1111    private ViewSettings oldViewSettings;
    1212    private LineParams[] oldLineParams;
     13    private string oldTitle;
    1314    private Dictionary<CheckBox, bool> ShowYAxisBoxes;
    1415    private Dictionary<CheckBox, bool> yAxisClipChangeableBoxes;
     
    5556      set {
    5657        model = value;
     58        oldTitle = model.Title;
     59        tbxTitle.Text = model.Title;
    5760        viewSettings = model.ViewSettings;
    5861        oldViewSettings = new ViewSettings(model.ViewSettings);
     
    7376        box.Key.Checked = box.Value;
    7477      }
     78
     79      model.Title = oldTitle;
     80      tbxTitle.Text = oldTitle;
    7581
    7682      viewSettings.LegendColor = oldViewSettings.LegendColor;
     
    231237      }
    232238    }
     239
     240    private void tbxTitle_TextChanged(object sender, EventArgs e) {
     241      model.Title = tbxTitle.Text;
     242      model.ViewSettings.UpdateView();
     243    }
    233244  }
    234245}
Note: See TracChangeset for help on using the changeset viewer.