Changeset 14737 for trunk/sources
- Timestamp:
- 03/09/17 09:35:42 (8 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/GanttDataView.cs
r14734 r14737 50 50 Content.Rows.ItemsReplaced += GanttRowsOnChanged; 51 51 Content.Rows.CollectionReset += GanttRowsOnChanged; 52 Content.CategoryColors.ItemsAdded += GanttCategoryColorsOnChanged; 53 Content.CategoryColors.ItemsRemoved += GanttCategoryColorsOnChanged; 54 Content.CategoryColors.ItemsReplaced += GanttCategoryColorsOnChanged; 55 Content.CategoryColors.CollectionReset += GanttCategoryColorsOnChanged; 52 56 foreach (var row in Content.Rows) 53 57 RegisterGanttRowEvents(row); … … 73 77 Content.Rows.ItemsReplaced -= GanttRowsOnChanged; 74 78 Content.Rows.CollectionReset -= GanttRowsOnChanged; 79 Content.CategoryColors.ItemsAdded -= GanttCategoryColorsOnChanged; 80 Content.CategoryColors.ItemsRemoved -= GanttCategoryColorsOnChanged; 81 Content.CategoryColors.ItemsReplaced -= GanttCategoryColorsOnChanged; 82 Content.CategoryColors.CollectionReset -= GanttCategoryColorsOnChanged; 75 83 foreach (var row in Content.Rows) 76 84 DeregisterGanttRowEvents(row); … … 121 129 122 130 ganttChart.Hide(); 131 ganttChart.Title = string.IsNullOrWhiteSpace(Content.Name) ? null : Content.Name; 123 132 foreach (var row in Content.Rows) { 124 133 foreach (var item in row.Items) { … … 138 147 UpdateVisualization(); 139 148 } 140 141 149 private void GanttRowsOnRemoved(object sender, CollectionItemsChangedEventArgs<GanttRow> e) { 142 150 foreach (var row in e.Items) 143 151 DeregisterGanttRowEvents(row); 144 152 153 UpdateVisualization(); 154 } 155 private void GanttCategoryColorsOnChanged(object sender, EventArgs e) { 145 156 UpdateVisualization(); 146 157 } -
trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/GanttData.cs
r14734 r14737 34 34 [Item("Gantt Data", "Data of a Gantt visualization")] 35 35 [StorableClass] 36 public class GanttData : Item {36 public class GanttData : NamedItem { 37 37 38 38 [Storable] … … 51 51 categoryColors = new ObservableDictionary<string, Color>(original.categoryColors); 52 52 } 53 public GanttData() { 53 public GanttData() : this("Gantt Data", "Data of a Gantt visualization") { } 54 public GanttData(string name) : this(name, string.Empty) { } 55 public GanttData(string name, string description) : base(name, description) { 54 56 rows = new NamedItemCollection<GanttRow>(); 55 57 categoryColors = new ObservableDictionary<string, Color>(); 56 58 } 57 public GanttData(IEnumerable<GanttRow> rows) { 59 public GanttData(IEnumerable<GanttRow> rows) : this("Gantt Data", rows) { } 60 public GanttData(string name, IEnumerable<GanttRow> rows) : this(name, string.Empty, rows) { } 61 public GanttData(string name, string description, IEnumerable<GanttRow> rows) : base(name, description) { 58 62 this.rows = new NamedItemCollection<GanttRow>(rows); 59 63 categoryColors = new ObservableDictionary<string, Color>(); … … 78 82 items = cloner.Clone(original.items); 79 83 } 80 public GanttRow() { 84 public GanttRow() : this("Gantt Row", "Row of a Gantt chart") { } 85 public GanttRow(string name) : this(name, string.Empty) { } 86 public GanttRow(string name, string description) : base(name, description) { 81 87 items = new ItemList<GanttItem>(); 82 88 } 83 public GanttRow(IEnumerable<GanttItem> items) { 89 public GanttRow(IEnumerable<GanttItem> items) : this("Gantt Row", items) { } 90 public GanttRow(string name, IEnumerable<GanttItem> items) : this(name, string.Empty, items) { } 91 public GanttRow(string name, string description, IEnumerable<GanttItem> items) : base(name, description) { 84 92 this.items = new ItemList<GanttItem>(items); 85 93 } -
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/GanttChart.Designer.cs
r14185 r14737 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 47 48 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 48 49 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 49 50 System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); 51 System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title(); 50 52 this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 51 53 ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit(); … … 54 56 // chart 55 57 // 56 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 57 | System.Windows.Forms.AnchorStyles.Left)58 58 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 59 | System.Windows.Forms.AnchorStyles.Left) 60 | System.Windows.Forms.AnchorStyles.Right))); 59 61 chartArea1.AxisX.ScaleView.SmallScrollMinSizeType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Milliseconds; 60 62 chartArea1.AxisY.ScaleView.SmallScrollMinSizeType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Milliseconds; … … 79 81 this.chart.TabIndex = 0; 80 82 this.chart.Text = "chart"; 83 title1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 84 title1.Name = "Gantt Title"; 85 title1.Text = "Gantt Title"; 86 title1.Visible = false; 87 this.chart.Titles.Add(title1); 81 88 // 82 89 // GanttChart 83 90 // 84 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);85 91 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 86 92 this.Controls.Add(this.chart); -
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/GanttChart.cs
r14185 r14737 32 32 private IDictionary<string, Color> categories = new Dictionary<string, Color>(); 33 33 private IDictionary<string, int> rowNames = new Dictionary<string, int>(); 34 35 public string Title { 36 get { return chart.Titles[0].Text; } 37 set { 38 chart.Titles[0].Text = value ?? string.Empty; 39 chart.Titles[0].Visible = value != null; 40 } 41 } 34 42 35 43 public GanttChart() {
Note: See TracChangeset
for help on using the changeset viewer.