You've already forked linux-packaging-mono
Imported Upstream version 5.4.0.167
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
parent
e49d6f06c0
commit
536cd135cc
@ -0,0 +1 @@
|
||||
9b313d01ee142e7d1875bd5bef1ba6acbc3ff837
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,403 @@
|
||||
//-------------------------------------------------------------
|
||||
// <copyright company=’Microsoft Corporation’>
|
||||
// Copyright © Microsoft Corporation. All Rights Reserved.
|
||||
// </copyright>
|
||||
//-------------------------------------------------------------
|
||||
// @owner=alexgor, deliant, victark
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
#if Microsoft_CONTROL
|
||||
namespace System.Windows.Forms.DataVisualization.Charting
|
||||
#else
|
||||
namespace System.Web.UI.DataVisualization.Charting
|
||||
#endif
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// ChartElement is the most basic element of the chart element hierarchy.
|
||||
/// </summary>
|
||||
#if ASPPERM_35
|
||||
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
|
||||
#endif
|
||||
public abstract class ChartElement : IChartElement, IDisposable
|
||||
{
|
||||
#region Member variables
|
||||
|
||||
private IChartElement _parent = null;
|
||||
private CommonElements _common = null;
|
||||
private object _tag = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an object associated with this chart element.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// An <see cref="Object"/> associated with this chart element.
|
||||
/// </value>
|
||||
/// <remarks>
|
||||
/// This property may be used to store additional data with this chart element.
|
||||
/// </remarks>
|
||||
[
|
||||
Browsable(false),
|
||||
DefaultValue(null),
|
||||
DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden),
|
||||
Utilities.SerializationVisibilityAttribute(Utilities.SerializationVisibility.Hidden)
|
||||
]
|
||||
public object Tag
|
||||
{
|
||||
get { return _tag; }
|
||||
set { _tag = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent chart element or collection.
|
||||
/// </summary>
|
||||
/// <value>The parent chart element or collection.</value>
|
||||
internal virtual IChartElement Parent
|
||||
{
|
||||
get { return _parent; }
|
||||
set { _parent = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a shortcut to Common intance providing access to the various chart related services.
|
||||
/// </summary>
|
||||
/// <value>The Common instance.</value>
|
||||
internal CommonElements Common
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_common == null && _parent != null)
|
||||
{
|
||||
_common = _parent.Common;
|
||||
}
|
||||
return _common;
|
||||
}
|
||||
set
|
||||
{
|
||||
_common = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the chart.
|
||||
/// </summary>
|
||||
/// <value>The chart.</value>
|
||||
internal Chart Chart
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Common != null)
|
||||
return Common.Chart;
|
||||
else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChartElement"/> class.
|
||||
/// </summary>
|
||||
protected ChartElement()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChartElement"/> class.
|
||||
/// </summary>
|
||||
/// <param name="parent">The parent chart element or collection.</param>
|
||||
internal ChartElement(IChartElement parent)
|
||||
{
|
||||
_parent = parent;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Invalidates this chart element.
|
||||
/// </summary>
|
||||
internal virtual void Invalidate()
|
||||
{
|
||||
if (_parent != null)
|
||||
_parent.Invalidate();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IChartElement Members
|
||||
|
||||
|
||||
IChartElement IChartElement.Parent
|
||||
{
|
||||
get { return _parent; }
|
||||
set { this.Parent = value; }
|
||||
}
|
||||
|
||||
void IChartElement.Invalidate()
|
||||
{
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
CommonElements IChartElement.Common
|
||||
{
|
||||
get{ return this.Common; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
/// <summary>
|
||||
/// Releases unmanaged and - optionally - managed resources
|
||||
/// </summary>
|
||||
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs freeing, releasing, or resetting managed resources.
|
||||
/// </summary>
|
||||
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
|
||||
public void Dispose()
|
||||
{
|
||||
this.Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
|
||||
/// </returns>
|
||||
/// <remarks>For internal use.</remarks>
|
||||
internal virtual string ToStringInternal()
|
||||
{
|
||||
return GetType().Name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
|
||||
/// </returns>
|
||||
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
|
||||
public override string ToString()
|
||||
{
|
||||
return this.ToStringInternal();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>.
|
||||
/// </summary>
|
||||
/// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>.</param>
|
||||
/// <returns>
|
||||
/// true if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, false.
|
||||
/// </returns>
|
||||
/// <exception cref="T:System.NullReferenceException">The <paramref name="obj"/> parameter is null.</exception>
|
||||
/// <remarks>For internal use.</remarks>
|
||||
internal virtual bool EqualsInternal(object obj)
|
||||
{
|
||||
return base.Equals(obj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>.
|
||||
/// </summary>
|
||||
/// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>.</param>
|
||||
/// <returns>
|
||||
/// true if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, false.
|
||||
/// </returns>
|
||||
/// <exception cref="T:System.NullReferenceException">The <paramref name="obj"/> parameter is null.</exception>
|
||||
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return this.EqualsInternal(obj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serves as a hash function for a particular type.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A hash code for the current <see cref="T:System.Object"/>.
|
||||
/// </returns>
|
||||
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ChartNamedElement is a base class for most chart elements. Series, ChartAreas, Legends and other chart elements have a Name and reuse the unique name generation and validation logic provided by the ChartNamedElementCollection.
|
||||
/// </summary>
|
||||
#if ASPPERM_35
|
||||
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
|
||||
#endif
|
||||
public abstract class ChartNamedElement : ChartElement
|
||||
{
|
||||
#region Member variables
|
||||
|
||||
private string _name = String.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the chart element.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
[DefaultValue("")]
|
||||
public virtual string Name
|
||||
{
|
||||
get { return _name; }
|
||||
set
|
||||
{
|
||||
if (_name != value)
|
||||
{
|
||||
if (Parent is INameController)
|
||||
{
|
||||
INameController nameController = Parent as INameController;
|
||||
|
||||
if (!nameController.IsUniqueName(value))
|
||||
throw new ArgumentException(SR.ExceptionNameAlreadyExistsInCollection(value, nameController.GetType().Name));
|
||||
|
||||
// Fire the name change events in case when the old name is not empty
|
||||
NameReferenceChangedEventArgs args = new NameReferenceChangedEventArgs(this, _name, value);
|
||||
nameController.OnNameReferenceChanging(args);
|
||||
_name = value;
|
||||
nameController.OnNameReferenceChanged(args);
|
||||
}
|
||||
else
|
||||
{
|
||||
_name = value;
|
||||
}
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChartNamedElement"/> class.
|
||||
/// </summary>
|
||||
protected ChartNamedElement()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChartNamedElement"/> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The name of the new chart element.</param>
|
||||
protected ChartNamedElement(string name)
|
||||
: base()
|
||||
{
|
||||
_name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChartNamedElement"/> class.
|
||||
/// </summary>
|
||||
/// <param name="parent">The parent chart element.</param>
|
||||
/// <param name="name">The name of the new chart element.</param>
|
||||
internal ChartNamedElement(IChartElement parent, string name) : base(parent)
|
||||
{
|
||||
_name = name;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
|
||||
/// </returns>
|
||||
internal override string ToStringInternal()
|
||||
{
|
||||
string typeName = GetType().Name;
|
||||
return (string.IsNullOrEmpty(_name)) ? typeName : typeName + '-' + _name;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// NameReferenceChanged events help chart maintain referencial integrity.
|
||||
/// </summary>
|
||||
internal class NameReferenceChangedEventArgs : EventArgs
|
||||
{
|
||||
#region MemberValiables
|
||||
|
||||
ChartNamedElement _oldElement;
|
||||
string _oldName;
|
||||
string _newName;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public ChartNamedElement OldElement
|
||||
{
|
||||
get { return _oldElement; }
|
||||
}
|
||||
public string OldName
|
||||
{
|
||||
get { return _oldName; }
|
||||
}
|
||||
public string NewName
|
||||
{
|
||||
get { return _newName; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
public NameReferenceChangedEventArgs(ChartNamedElement oldElement, ChartNamedElement newElement)
|
||||
{
|
||||
_oldElement = oldElement;
|
||||
_oldName = oldElement!=null ? oldElement.Name : string.Empty;
|
||||
_newName = newElement!=null ? newElement.Name : string.Empty;
|
||||
}
|
||||
public NameReferenceChangedEventArgs(ChartNamedElement oldElement, string oldName, string newName)
|
||||
{
|
||||
_oldElement = oldElement;
|
||||
_oldName = oldName;
|
||||
_newName = newName;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,80 @@
|
||||
//-------------------------------------------------------------
|
||||
// <copyright company=’Microsoft Corporation’>
|
||||
// Copyright © Microsoft Corporation. All Rights Reserved.
|
||||
// </copyright>
|
||||
//-------------------------------------------------------------
|
||||
// @owner=alexgor, deliant, victark
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
|
||||
#if WINFORMS_CONTROL
|
||||
namespace System.Windows.Forms.DataVisualization.Charting
|
||||
#else
|
||||
namespace System.Web.UI.DataVisualization.Charting
|
||||
#endif
|
||||
{
|
||||
/// <summary>
|
||||
/// IChartElement is implemented by both ChartElements and ChartElementCollection to provide a unified access to Parent/Common elements.
|
||||
/// </summary>
|
||||
internal interface IChartElement
|
||||
{
|
||||
//Properties
|
||||
IChartElement Parent { get; set; }
|
||||
CommonElements Common { get; }
|
||||
|
||||
//Methods
|
||||
void Invalidate();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Named controller interface allows ChartNamedElements to check the uniqueness of their names
|
||||
/// </summary>
|
||||
internal interface INameController
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether is the name us unique.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>
|
||||
/// <c>true</c> if is the name us unique; otherwise, <c>false</c>.
|
||||
/// </returns>
|
||||
bool IsUniqueName(string name);
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is in edit mode by collecrtion editor.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if this instance the colection is editing; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
bool IsColectionEditing { get; set; }
|
||||
/// <summary>
|
||||
/// Does the snapshot of collection items.
|
||||
/// </summary>
|
||||
/// <param name="save">if set to <c>true</c> collection items will be saved.</param>
|
||||
/// <param name="changingCallback">The changing callback.</param>
|
||||
/// <param name="changedCallback">The changed callback.</param>
|
||||
void DoSnapshot(bool save,
|
||||
EventHandler<NameReferenceChangedEventArgs> changingCallback,
|
||||
EventHandler<NameReferenceChangedEventArgs> changedCallback);
|
||||
/// <summary>
|
||||
/// Gets the snapshot of saved collection items.
|
||||
/// </summary>
|
||||
/// <value>The snapshot.</value>
|
||||
IList Snapshot {get;}
|
||||
/// <summary>
|
||||
/// Raises the <see cref="E:NameReferenceChanged"/> event.
|
||||
/// </summary>
|
||||
/// <param name="e">The <see cref="NameReferenceChangedEventArgs"/> instance containing the event data.</param>
|
||||
void OnNameReferenceChanged(NameReferenceChangedEventArgs e);
|
||||
/// <summary>
|
||||
/// Raises the <see cref="E:NameReferenceChanging"/> event.
|
||||
/// </summary>
|
||||
/// <param name="e">The <see cref="NameReferenceChangedEventArgs"/> instance containing the event data.</param>
|
||||
void OnNameReferenceChanging(NameReferenceChangedEventArgs e);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1 @@
|
||||
a83a2fb7137e6231ced1265a42a263204fe8c4ad
|
@ -0,0 +1 @@
|
||||
86b909780d48becd3f74d947fc2ec270f7352a38
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,109 @@
|
||||
//-------------------------------------------------------------
|
||||
// <copyright company=<3D>Microsoft Corporation<6F>>
|
||||
// Copyright <20> Microsoft Corporation. All Rights Reserved.
|
||||
// </copyright>
|
||||
//-------------------------------------------------------------
|
||||
// @owner=alexgor, deliant
|
||||
//=================================================================
|
||||
// File: ChartAreaCircular.cs
|
||||
//
|
||||
// Namespace: System.Web.UI.WebControls[Windows.Forms].Charting
|
||||
//
|
||||
// Classes: CircularChartAreaAxis
|
||||
//
|
||||
// Purpose: CircularChartAreaAxis is a helper class which is used
|
||||
// in circular chart areas for charts like Polar and
|
||||
// Radar.
|
||||
//
|
||||
// Reviewed: AG - Microsoft 16, 2007
|
||||
//
|
||||
//===================================================================
|
||||
|
||||
|
||||
#region Used namespaces
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
using System.Drawing.Drawing2D;
|
||||
#if Microsoft_CONTROL
|
||||
|
||||
using System.Windows.Forms.DataVisualization.Charting.Data;
|
||||
using System.Windows.Forms.DataVisualization.Charting.ChartTypes;
|
||||
using System.Windows.Forms.DataVisualization.Charting.Utilities;
|
||||
using System.Windows.Forms.DataVisualization.Charting.Borders3D;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
|
||||
using System.Globalization;
|
||||
using System.ComponentModel.Design.Serialization;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms.Design;
|
||||
#else
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
using System.Web.UI.DataVisualization.Charting.Data;
|
||||
using System.Web.UI.DataVisualization.Charting.ChartTypes;
|
||||
using System.Web.UI.DataVisualization.Charting.Utilities;
|
||||
using System.Web.UI.DataVisualization.Charting.Borders3D;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
#if Microsoft_CONTROL
|
||||
namespace System.Windows.Forms.DataVisualization.Charting
|
||||
#else
|
||||
namespace System.Web.UI.DataVisualization.Charting
|
||||
|
||||
#endif
|
||||
{
|
||||
/// <summary>
|
||||
/// CircularChartAreaAxis class represents a single axis in the circular
|
||||
/// chart area chart like radar or polar. It contains axis angular
|
||||
/// position, size and title properties.
|
||||
/// </summary>
|
||||
internal class CircularChartAreaAxis
|
||||
{
|
||||
#region Fields
|
||||
|
||||
/// <summary>
|
||||
/// Angle where axis is located.
|
||||
/// </summary>
|
||||
internal float AxisPosition = 0f;
|
||||
|
||||
/// <summary>
|
||||
/// Axis title.
|
||||
/// </summary>
|
||||
internal string Title = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Axis title color.
|
||||
/// </summary>
|
||||
internal Color TitleForeColor = Color.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
public CircularChartAreaAxis()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
internal CircularChartAreaAxis(float axisPosition)
|
||||
{
|
||||
this.AxisPosition = axisPosition;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
//-------------------------------------------------------------
|
||||
// <copyright company=<3D>Microsoft Corporation<6F>>
|
||||
// Copyright <20> Microsoft Corporation. All Rights Reserved.
|
||||
// </copyright>
|
||||
//-------------------------------------------------------------
|
||||
// @owner=alexgor, deliant
|
||||
//=================================================================
|
||||
// File: ChartAreaCollection.cs
|
||||
//
|
||||
// Namespace: System.Web.UI.WebControls[Windows.Forms].Charting
|
||||
//
|
||||
// Classes: ChartAreaCollection
|
||||
//
|
||||
// Purpose: ChartAreaCollection class represents a strongly
|
||||
// typed collection of ChartArea objects.
|
||||
//
|
||||
// Reviewed: GS - Aug 8, 2002
|
||||
// AG - Aug 8, 2002
|
||||
// AG - Microsoft 16, 2007
|
||||
//
|
||||
//===================================================================
|
||||
|
||||
|
||||
#region Used namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Drawing;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#if Microsoft_CONTROL
|
||||
namespace System.Windows.Forms.DataVisualization.Charting
|
||||
#else
|
||||
namespace System.Web.UI.DataVisualization.Charting
|
||||
|
||||
#endif
|
||||
{
|
||||
/// <summary>
|
||||
/// The ChartAreaCollection class represents a strongly typed collection of
|
||||
/// ChartArea objects. Each chart area has a unique name in the collection
|
||||
/// and can be retrieved by name or by index.
|
||||
/// </summary>
|
||||
#if ASPPERM_35
|
||||
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
|
||||
#endif
|
||||
public class ChartAreaCollection : ChartNamedElementCollection<ChartArea>
|
||||
{
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChartAreaCollection"/> class.
|
||||
/// </summary>
|
||||
/// <param name="chartPicture">Parent chart picture.</param>
|
||||
internal ChartAreaCollection(ChartPicture chartPicture) : base(chartPicture)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Gets the default chart area name.
|
||||
/// </summary>
|
||||
internal string DefaultNameReference
|
||||
{
|
||||
get { return this.Count > 0 ? this[0].Name : String.Empty; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new ChartArea with the specified name and adds it to the collection.
|
||||
/// </summary>
|
||||
/// <param name="name">The new chart area name.</param>
|
||||
/// <returns></returns>
|
||||
public ChartArea Add(string name)
|
||||
{
|
||||
ChartArea area = new ChartArea(name);
|
||||
this.Add(area);
|
||||
return area;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event handlers
|
||||
/// <summary>
|
||||
/// Updates the ChartArea alignment references to another chart areas.
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="Charting.NameReferenceChangedEventArgs"/> instance containing the event data.</param>
|
||||
internal void ChartAreaNameReferenceChanged(object sender, NameReferenceChangedEventArgs e)
|
||||
{
|
||||
foreach (ChartArea chartArea in this)
|
||||
if (chartArea.AlignWithChartArea == e.OldName)
|
||||
chartArea.AlignWithChartArea = e.NewName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
ac6545a25eea8a7b0747d43887e0185988602061
|
@ -0,0 +1 @@
|
||||
ea11fb0fa49a90f4dfc6609af1d6bd0890c6116c
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user