Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6176


Ignore:
Timestamp:
05/10/11 15:25:05 (14 years ago)
Author:
abeham
Message:

#1465

  • Removed properties menu from EnhancedChart
  • Added IConfigureableView interface to DataTableView
Location:
branches/histogram
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableView.Designer.cs

    r6010 r6176  
    8989      series1.Name = "Default";
    9090      this.chart.Series.Add(series1);
    91       this.chart.ShowPropertiesContextMenuItem = true;
    9291      this.chart.Size = new System.Drawing.Size(359, 248);
    9392      this.chart.TabIndex = 3;
     
    9796      title1.Text = "Title";
    9897      this.chart.Titles.Add(title1);
    99       this.chart.PropertiesClicked += new System.EventHandler(this.chart_PropertiesClicked);
    10098      this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend);
    10199      this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown);
  • branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableView.cs

    r6115 r6176  
    3636  [View("DataTable View")]
    3737  [Content(typeof(DataTable), true)]
    38   public partial class DataTableView : NamedItemView {
     38  public partial class DataTableView : NamedItemView, IConfigureableView {
    3939    protected List<Series> invisibleSeries;
    4040    protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable;
     
    144144      base.SetEnabledStateOfControls();
    145145      chart.Enabled = Content != null;
     146    }
     147
     148    public void ShowConfiguration() {
     149      if (Content != null) {
     150        DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(Content);
     151        dialog.ShowDialog();
     152      } else MessageBox.Show("Nothing to configure.");
    146153    }
    147154
     
    503510      }
    504511    }
    505     private void chart_PropertiesClicked(object sender, EventArgs e) {
    506       DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(Content);
    507       dialog.ShowDialog();
    508     }
    509512    #endregion
    510513
  • branches/histogram/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.Designer.cs

    r6010 r6176  
    5050      this.copyImageToClipboardBitmapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    5151      this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
    52       this.propertiesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    53       this.propertiesToolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
    5452      this.contextMenuStrip.SuspendLayout();
    5553      ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     
    6058      this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    6159            this.exportChartToolStripMenuItem,
    62             this.copyImageToClipboardBitmapToolStripMenuItem,
    63             this.propertiesToolStripSeparator,
    64             this.propertiesToolStripMenuItem});
     60            this.copyImageToClipboardBitmapToolStripMenuItem});
    6561      this.contextMenuStrip.Name = "contextMenuStrip";
    6662      this.contextMenuStrip.Size = new System.Drawing.Size(257, 76);
    67       this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening);
    6863      //
    6964      // exportChartToolStripMenuItem
     
    8782      this.saveFileDialog.FilterIndex = 2;
    8883      //
    89       // propertiesToolStripMenuItem
    90       //
    91       this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem";
    92       this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
    93       this.propertiesToolStripMenuItem.Text = "Properties";
    94       this.propertiesToolStripMenuItem.Click += new System.EventHandler(this.propertiesToolStripMenuItem_Click);
    95       //
    96       // propertiesToolStripSeparator
    97       //
    98       this.propertiesToolStripSeparator.Name = "propertiesToolStripSeparator";
    99       this.propertiesToolStripSeparator.Size = new System.Drawing.Size(253, 6);
    100       //
    10184      // EnhancedChart
    10285      //
     
    11497    private System.Windows.Forms.ToolStripMenuItem copyImageToClipboardBitmapToolStripMenuItem;
    11598    private System.Windows.Forms.SaveFileDialog saveFileDialog;
    116     private System.Windows.Forms.ToolStripSeparator propertiesToolStripSeparator;
    117     private System.Windows.Forms.ToolStripMenuItem propertiesToolStripMenuItem;
    11899  }
    119100}
  • branches/histogram/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.cs

    r6014 r6176  
    2525using System.Windows.Forms;
    2626using System.Windows.Forms.DataVisualization.Charting;
    27 using HeuristicLab.Common.Resources;
    2827
    2928namespace HeuristicLab.Visualization.ChartControlsExtensions {
     
    3231      : base() {
    3332      InitializeComponent();
    34       propertiesToolStripMenuItem.Image = VSImageLibrary.Properties;
    3533      EnableDoubleClickResetsZoom = true;
    3634      EnableMiddleClickPanning = true;
     
    4240    [DefaultValue(true)]
    4341    public bool EnableMiddleClickPanning { get; set; }
    44     [DefaultValue(false)]
    45     public bool ShowPropertiesContextMenuItem { get; set; }
    4642
    4743    public static void CustomizeChartArea(ChartArea chartArea) {
     
    142138    #endregion
    143139
    144     private void contextMenuStrip_Opening(object sender, CancelEventArgs e) {
    145       propertiesToolStripSeparator.Visible = ShowPropertiesContextMenuItem;
    146       propertiesToolStripMenuItem.Visible = ShowPropertiesContextMenuItem;
    147     }
    148 
    149140    private void exportChartToolStripMenuItem_Click(object sender, System.EventArgs e) {
    150141      // Set image file format
     
    177168      Clipboard.SetDataObject(bmp);
    178169    }
    179 
    180     private void propertiesToolStripMenuItem_Click(object sender, EventArgs e) {
    181       OnPropertiesClicked();
    182     }
    183 
    184     public event EventHandler PropertiesClicked;
    185     private void OnPropertiesClicked() {
    186       var handler = PropertiesClicked;
    187       if (handler != null) handler(this, EventArgs.Empty);
    188     }
    189170  }
    190171}
Note: See TracChangeset for help on using the changeset viewer.