Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12600


Ignore:
Timestamp:
07/06/15 14:09:16 (9 years ago)
Author:
pfleck
Message:

#2379 Added size track-bar similar to the original bubble-chart.

Location:
branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3/BubbleChartView.Designer.cs

    r12498 r12600  
    6161      this.levelNumericUpDown = new System.Windows.Forms.NumericUpDown();
    6262      this.includeChildrenCheckBox = new System.Windows.Forms.CheckBox();
     63      this.sizeTrackBar = new System.Windows.Forms.TrackBar();
    6364      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
    6465      this.childrenGroupBox.SuspendLayout();
     
    6869      this.splitContainer.SuspendLayout();
    6970      ((System.ComponentModel.ISupportInitialize)(this.levelNumericUpDown)).BeginInit();
     71      ((System.ComponentModel.ISupportInitialize)(this.sizeTrackBar)).BeginInit();
    7072      this.SuspendLayout();
    7173      //
     
    7375      //
    7476      this.yLabel.AutoSize = true;
    75       this.yLabel.Location = new System.Drawing.Point(305, 6);
     77      this.yLabel.Location = new System.Drawing.Point(218, 6);
    7678      this.yLabel.Name = "yLabel";
    7779      this.yLabel.Size = new System.Drawing.Size(15, 13);
     
    105107      series1.YValuesPerPoint = 2;
    106108      this.chart.Series.Add(series1);
    107       this.chart.Size = new System.Drawing.Size(880, 668);
     109      this.chart.Size = new System.Drawing.Size(965, 668);
    108110      this.chart.TabIndex = 7;
    109111      this.chart.AxisViewChanged += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>(this.chart_AxisViewChanged);
     
    113115      this.yAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    114116      this.yAxisComboBox.FormattingEnabled = true;
    115       this.yAxisComboBox.Location = new System.Drawing.Point(326, 3);
     117      this.yAxisComboBox.Location = new System.Drawing.Point(239, 2);
    116118      this.yAxisComboBox.Name = "yAxisComboBox";
    117119      this.yAxisComboBox.Size = new System.Drawing.Size(340, 21);
     
    138140      this.treeView.Location = new System.Drawing.Point(6, 19);
    139141      this.treeView.Name = "treeView";
    140       this.treeView.Size = new System.Drawing.Size(175, 643);
     142      this.treeView.Size = new System.Drawing.Size(90, 643);
    141143      this.treeView.TabIndex = 10;
    142144      this.treeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterCheck);
     
    151153      this.childrenGroupBox.Location = new System.Drawing.Point(3, 3);
    152154      this.childrenGroupBox.Name = "childrenGroupBox";
    153       this.childrenGroupBox.Size = new System.Drawing.Size(187, 668);
     155      this.childrenGroupBox.Size = new System.Drawing.Size(102, 668);
    154156      this.childrenGroupBox.TabIndex = 11;
    155157      this.childrenGroupBox.TabStop = false;
     
    172174      this.splitContainer.Panel2.Controls.Add(this.chart);
    173175      this.splitContainer.Size = new System.Drawing.Size(1083, 674);
    174       this.splitContainer.SplitterDistance = 193;
     176      this.splitContainer.SplitterDistance = 108;
    175177      this.splitContainer.TabIndex = 12;
    176178      //
     
    180182      this.sizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    181183      this.sizeComboBox.FormattingEnabled = true;
    182       this.sizeComboBox.Location = new System.Drawing.Point(806, 3);
     184      this.sizeComboBox.Location = new System.Drawing.Point(728, 2);
    183185      this.sizeComboBox.Name = "sizeComboBox";
    184186      this.sizeComboBox.Size = new System.Drawing.Size(280, 21);
     
    190192      this.sizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    191193      this.sizeLabel.AutoSize = true;
    192       this.sizeLabel.Location = new System.Drawing.Point(734, 6);
     194      this.sizeLabel.Location = new System.Drawing.Point(656, 5);
    193195      this.sizeLabel.Name = "sizeLabel";
    194196      this.sizeLabel.Size = new System.Drawing.Size(66, 13);
     
    227229      this.includeChildrenCheckBox.CheckedChanged += new System.EventHandler(this.includeChildrenCheckBox_CheckedChanged);
    228230      //
     231      // sizeTrackBar
     232      //
     233      this.sizeTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     234      this.sizeTrackBar.Location = new System.Drawing.Point(1019, 3);
     235      this.sizeTrackBar.Maximum = 20;
     236      this.sizeTrackBar.Minimum = -20;
     237      this.sizeTrackBar.Name = "sizeTrackBar";
     238      this.sizeTrackBar.Size = new System.Drawing.Size(64, 45);
     239      this.sizeTrackBar.TabIndex = 18;
     240      this.sizeTrackBar.TickFrequency = 20;
     241      this.sizeTrackBar.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
     242      this.sizeTrackBar.ValueChanged += new System.EventHandler(this.sizeTrackBar_ValueChanged);
     243      //
    229244      // BubbleChartView
    230245      //
     
    233248      this.BackColor = System.Drawing.SystemColors.Window;
    234249      this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     250      this.Controls.Add(this.sizeTrackBar);
    235251      this.Controls.Add(this.includeChildrenCheckBox);
    236252      this.Controls.Add(this.levelNumericUpDown);
     
    252268      this.splitContainer.ResumeLayout(false);
    253269      ((System.ComponentModel.ISupportInitialize)(this.levelNumericUpDown)).EndInit();
     270      ((System.ComponentModel.ISupportInitialize)(this.sizeTrackBar)).EndInit();
    254271      this.ResumeLayout(false);
    255272      this.PerformLayout();
     
    272289    private System.Windows.Forms.NumericUpDown levelNumericUpDown;
    273290    private System.Windows.Forms.CheckBox includeChildrenCheckBox;
     291    private System.Windows.Forms.TrackBar sizeTrackBar;
    274292  }
    275293}
  • branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3/BubbleChartView.cs

    r12598 r12600  
    379379
    380380          //invert bubble sizes if the value of the trackbar is negative
    381           //if (sizeTrackBar.Value < 0) relativeSize = Math.Abs(relativeSize - 1);
     381          if (sizeTrackBar.Value < 0) relativeSize = Math.Abs(relativeSize - 1);
    382382        } else relativeSize = 1;
    383383
    384         double sizeChange = /*Math.Abs(sizeTrackBar.Value)*/ 10 * relativeSize;
    385         //double sizeChange = 0;
     384        double sizeChange = Math.Abs(sizeTrackBar.Value) * relativeSize;
    386385        point.MarkerSize = (int)Math.Round(sizeChange + smallestBubbleSize);
    387386      }
     
    426425      updating = false;
    427426    }
     427
     428    private void sizeTrackBar_ValueChanged(object sender, EventArgs e) {
     429      UpdateMarkerSizes();
     430    }
    428431    #endregion
    429432
Note: See TracChangeset for help on using the changeset viewer.