DotNet 4.8.1 build of DotNetBar
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v2.0.50727"/></startup>
|
||||
</configuration>
|
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Design;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class AxisListTypeEditor : UITypeEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
IWindowsFormsEditorService _EditorService;
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetEditStyle
|
||||
|
||||
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
|
||||
{
|
||||
return (UITypeEditorEditStyle.DropDown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetPaintValueSupported
|
||||
|
||||
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return (false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_EditorService =
|
||||
provider.GetService(typeof (IWindowsFormsEditorService)) as IWindowsFormsEditorService;
|
||||
|
||||
if (_EditorService != null)
|
||||
{
|
||||
ChartSeries series = context.Instance as ChartSeries;
|
||||
|
||||
if (series != null)
|
||||
{
|
||||
ChartXy chartXy = series.Parent as ChartXy;
|
||||
|
||||
if (chartXy != null)
|
||||
{
|
||||
ListBox lb = new ListBox();
|
||||
lb.Dock = DockStyle.Fill;
|
||||
lb.BorderStyle = BorderStyle.None;
|
||||
|
||||
lb.MouseClick += ListBoxMouseClick;
|
||||
|
||||
lb.Items.Add("NotSet");
|
||||
|
||||
if (context.PropertyDescriptor.Name.Equals("AxisX") == true)
|
||||
return (EditValueEx(lb, chartXy.AncillaryAxesX, value));
|
||||
|
||||
return (EditValueEx(lb, chartXy.AncillaryAxesY, value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
private object EditValueEx(ListBox lb, ChartAxesCollection axes, object value)
|
||||
{
|
||||
for (int i = 0; i < axes.Count; i++)
|
||||
{
|
||||
ChartAxis axis = axes[i];
|
||||
|
||||
string s = GetAxisText(axis, i);
|
||||
|
||||
lb.Items.Add(s);
|
||||
}
|
||||
|
||||
_EditorService.DropDownControl(lb);
|
||||
|
||||
if (lb.SelectedIndex >= 0)
|
||||
{
|
||||
if (lb.SelectedIndex == 0)
|
||||
return (null);
|
||||
|
||||
ChartAxis axis = axes[lb.SelectedIndex - 1];
|
||||
|
||||
return (axis);
|
||||
}
|
||||
|
||||
return (value);
|
||||
}
|
||||
|
||||
private string GetAxisText(ChartAxis axis, int index)
|
||||
{
|
||||
string s = index + " ";
|
||||
|
||||
if (string.IsNullOrEmpty(axis.Name) == false)
|
||||
return (s + "-" + axis.Name);
|
||||
|
||||
return (s + "-" + "(No Name)");
|
||||
}
|
||||
|
||||
private void ListBoxMouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
_EditorService.CloseDropDown();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,111 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class AxisReferenceCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private ChartAxis _ChartAxis;
|
||||
|
||||
#endregion
|
||||
|
||||
public AxisReferenceCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_ChartAxis = context.Instance as ChartAxis;
|
||||
|
||||
IComponentChangeService cs = BeforeEditValue(context);
|
||||
|
||||
object retval = value;
|
||||
|
||||
try
|
||||
{
|
||||
retval = base.EditValue(context, provider, value);
|
||||
}
|
||||
finally
|
||||
{
|
||||
AfterEditValue(context, cs);
|
||||
}
|
||||
|
||||
return (retval);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
if (itemType == typeof(ReferenceLine))
|
||||
{
|
||||
ReferenceLine line = (ReferenceLine)base.CreateInstance(itemType);
|
||||
|
||||
line.Name = _ChartAxis.ReferenceLines.GetUniqueName();
|
||||
|
||||
if (_ChartAxis != null)
|
||||
line.AxisValue = _ChartAxis.ActualMinValue;
|
||||
|
||||
return (line);
|
||||
}
|
||||
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReferenceLine item = ChartItem as ReferenceLine;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
ChartControlDesigner ccd = GetDesigner(_ChartAxis.ChartControl);
|
||||
|
||||
ccd.InCopyItem = true;
|
||||
|
||||
try
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
ReferenceLineCollection rlc = _ChartAxis.ReferenceLines;
|
||||
ReferenceLine clone = rlc[rlc.Count - 1];
|
||||
|
||||
string name = clone.Name;
|
||||
item.CopyTo(clone);
|
||||
clone.Name = name;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ccd.InCopyItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(ReferenceLine);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using System.ComponentModel.Design.Serialization;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class AxisStripeCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private ChartAxis _ChartAxis;
|
||||
|
||||
#endregion
|
||||
|
||||
public AxisStripeCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_ChartAxis = context.Instance as ChartAxis;
|
||||
|
||||
IComponentChangeService cs = BeforeEditValue(context);
|
||||
|
||||
object retval = value;
|
||||
|
||||
try
|
||||
{
|
||||
retval = base.EditValue(context, provider, value);
|
||||
}
|
||||
finally
|
||||
{
|
||||
AfterEditValue(context, cs);
|
||||
}
|
||||
|
||||
return (retval);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
if (itemType == typeof(AxisStripe))
|
||||
{
|
||||
AxisStripe stripe = (AxisStripe)base.CreateInstance(itemType);
|
||||
|
||||
stripe.Name = _ChartAxis.AxisStripes.GetUniqueName();
|
||||
|
||||
stripe.MinValue = _ChartAxis.ActualMinValue;
|
||||
stripe.MaxValue = _ChartAxis.ActualMaxValue;
|
||||
|
||||
return (stripe);
|
||||
}
|
||||
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
AxisStripe item = ChartItem as AxisStripe;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
ChartControlDesigner ccd = GetDesigner(_ChartAxis.ChartControl);
|
||||
|
||||
ccd.InCopyItem = true;
|
||||
|
||||
try
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
AxisStripeCollection asc = _ChartAxis.AxisStripes;
|
||||
AxisStripe clone = asc[asc.Count - 1];
|
||||
|
||||
string name = clone.Name;
|
||||
item.CopyTo(clone);
|
||||
clone.Name = name;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ccd.InCopyItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(AxisStripe);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,383 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Drawing;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Windows.Forms;
|
||||
using DevComponents.Charts.Design.Properties;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class BaseCollectionEditor : CollectionEditor
|
||||
{
|
||||
#region Static variables
|
||||
|
||||
static Size _lastSize = Size.Empty;
|
||||
static Point _lastLoc = Point.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private variables
|
||||
|
||||
private ListBox _ListBox;
|
||||
private object _ChartItem;
|
||||
private object _LastChartItem;
|
||||
private PropertyGrid _PropertyGrid;
|
||||
|
||||
private Button _AddButton;
|
||||
private Button _RemButton;
|
||||
private Button _CopyButton;
|
||||
private ToolTip _ToolTip;
|
||||
|
||||
private List<object> _RemovedItems;
|
||||
|
||||
private bool _EditCancelled;
|
||||
private bool _ComponentChanged;
|
||||
|
||||
#endregion
|
||||
|
||||
private ChartControlDesigner _ControlDesigner;
|
||||
|
||||
public BaseCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region Protected properties
|
||||
|
||||
protected Button AddButton
|
||||
{
|
||||
get { return (_AddButton); }
|
||||
}
|
||||
|
||||
protected object ChartItem
|
||||
{
|
||||
get { return (_ChartItem); }
|
||||
set { _ChartItem = value; }
|
||||
}
|
||||
|
||||
protected bool ComponentChanged
|
||||
{
|
||||
get { return (_ComponentChanged); }
|
||||
}
|
||||
|
||||
protected bool EditCancelled
|
||||
{
|
||||
get { return (_EditCancelled); }
|
||||
}
|
||||
|
||||
protected ListBox ListBox
|
||||
{
|
||||
get { return (_ListBox); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private properties
|
||||
|
||||
#region RemovedItems
|
||||
|
||||
private List<object> RemovedItems
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_RemovedItems == null)
|
||||
_RemovedItems = new List<object>();
|
||||
|
||||
return (_RemovedItems);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionForm
|
||||
|
||||
protected override CollectionForm CreateCollectionForm()
|
||||
{
|
||||
_EditCancelled = false;
|
||||
|
||||
CollectionForm collectionForm = base.CreateCollectionForm();
|
||||
|
||||
_ChartItem = null;
|
||||
|
||||
if (collectionForm.Controls[0] is TableLayoutPanel)
|
||||
{
|
||||
TableLayoutPanel tlpf = collectionForm.Controls["overArchingTableLayoutPanel"] as TableLayoutPanel;
|
||||
|
||||
if (tlpf != null)
|
||||
{
|
||||
TableLayoutPanel tlp2 = tlpf.Controls["addRemoveTableLayoutPanel"] as TableLayoutPanel;
|
||||
|
||||
if (tlp2 != null)
|
||||
{
|
||||
_RemButton = tlp2.Controls["removeButton"] as Button;
|
||||
|
||||
if (_RemButton != null)
|
||||
_RemButton.Click += CollectionEditor_RemoveClick;
|
||||
|
||||
_AddButton = tlp2.Controls["addButton"] as Button;
|
||||
|
||||
if (_AddButton != null)
|
||||
{
|
||||
_AddButton.Click += CollectionEditor_AddClick;
|
||||
|
||||
AddCopyButton(collectionForm);
|
||||
}
|
||||
}
|
||||
|
||||
_ListBox = tlpf.Controls["listbox"] as ListBox;
|
||||
|
||||
if (_ListBox != null)
|
||||
_ListBox.SelectedIndexChanged += ListBox_SelectedIndexChanged;
|
||||
|
||||
_PropertyGrid = tlpf.Controls["propertyBrowser"] as PropertyGrid;
|
||||
|
||||
if (_PropertyGrid != null)
|
||||
_PropertyGrid.HelpVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
collectionForm.Load += CollectionFormLoad;
|
||||
collectionForm.Resize += CollectionFormResize;
|
||||
collectionForm.LocationChanged += CollectionFormLocationChanged;
|
||||
|
||||
return (collectionForm);
|
||||
}
|
||||
|
||||
#region CollectionFormLoad
|
||||
|
||||
void CollectionFormLoad(object sender, EventArgs e)
|
||||
{
|
||||
CollectionForm form = sender as CollectionForm;
|
||||
|
||||
if (form != null)
|
||||
{
|
||||
if (_lastSize != Size.Empty)
|
||||
form.Size = _lastSize;
|
||||
|
||||
if (_lastLoc != Point.Empty)
|
||||
form.Location = _lastLoc;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CollectionFormResize
|
||||
|
||||
void CollectionFormResize(object sender, EventArgs e)
|
||||
{
|
||||
CollectionForm form = sender as CollectionForm;
|
||||
|
||||
if (form != null && form.Visible == true)
|
||||
_lastSize = form.Size;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CollectionFormLocationChanged
|
||||
|
||||
void CollectionFormLocationChanged(object sender, EventArgs e)
|
||||
{
|
||||
CollectionForm form = sender as CollectionForm;
|
||||
|
||||
if (form != null && form.Visible == true)
|
||||
_lastLoc = form.Location;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region AddCopyButton
|
||||
|
||||
private void AddCopyButton(CollectionForm collectionForm)
|
||||
{
|
||||
_CopyButton = new Button();
|
||||
|
||||
_CopyButton.Size = new Size(24, 24);
|
||||
_CopyButton.Enabled = false;
|
||||
_CopyButton.Click += CopyButton_Click;
|
||||
|
||||
ResourceManager rm = Resources.ResourceManager;
|
||||
_CopyButton.Image = (Image)rm.GetObject("Copy");
|
||||
|
||||
collectionForm.Controls.Add(_CopyButton);
|
||||
|
||||
_CopyButton.Location = new Point(204, 85);
|
||||
_CopyButton.BringToFront();
|
||||
|
||||
_ToolTip = new ToolTip();
|
||||
_ToolTip.SetToolTip(_CopyButton, "Clone the selected item");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected virtual void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ListBox_SelectedIndexChanged
|
||||
|
||||
void ListBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_ListBox.SelectedItem != null)
|
||||
{
|
||||
PropertyInfo p = _ListBox.SelectedItem.GetType().GetProperty("Value");
|
||||
|
||||
_LastChartItem = _ChartItem;
|
||||
_ChartItem = p.GetValue(_ListBox.SelectedItem, null);
|
||||
|
||||
_CopyButton.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_CopyButton.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CollectionEditor_AddClick
|
||||
|
||||
protected virtual void CollectionEditor_AddClick(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CollectionEditor_RemoveClick
|
||||
|
||||
protected virtual void CollectionEditor_RemoveClick(object sender, EventArgs e)
|
||||
{
|
||||
if (_LastChartItem != null)
|
||||
{
|
||||
RemovedItems.Add(_LastChartItem);
|
||||
|
||||
if (_LastChartItem is ChartVisualElement)
|
||||
((ChartVisualElement)_LastChartItem).Visible = false;
|
||||
|
||||
else if (_LastChartItem is SeriesPoint)
|
||||
((SeriesPoint)_LastChartItem).Visible = false;
|
||||
|
||||
_LastChartItem = null;
|
||||
}
|
||||
else if (_ChartItem != null)
|
||||
{
|
||||
RemovedItems.Add(_ChartItem);
|
||||
|
||||
if (_ChartItem is ChartVisualElement)
|
||||
((ChartVisualElement)_ChartItem).Visible = false;
|
||||
|
||||
else if (_LastChartItem is SeriesPoint)
|
||||
((SeriesPoint)_LastChartItem).Visible = false;
|
||||
|
||||
_ChartItem = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CancelChanges
|
||||
|
||||
protected override void CancelChanges()
|
||||
{
|
||||
_EditCancelled = true;
|
||||
|
||||
if (_RemovedItems != null)
|
||||
{
|
||||
foreach (object item in _RemovedItems)
|
||||
{
|
||||
if (item is ChartVisualElement)
|
||||
((ChartVisualElement)item).Visible = true;
|
||||
|
||||
else if (item is SeriesPoint)
|
||||
((SeriesPoint)item).Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
ChartVisualElement cve = _ChartItem as ChartVisualElement;
|
||||
|
||||
if (cve != null)
|
||||
cve.InvalidateLayout();
|
||||
|
||||
base.CancelChanges();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BeforeEditValue
|
||||
|
||||
protected IComponentChangeService BeforeEditValue(ITypeDescriptorContext context)
|
||||
{
|
||||
ChartVisualElement cve = context.Instance as ChartVisualElement;
|
||||
|
||||
if (cve != null)
|
||||
{
|
||||
ISite site = cve.ChartControl.Site;
|
||||
IComponentChangeService cs = (IComponentChangeService)site.GetService(typeof(IComponentChangeService));
|
||||
|
||||
if (cs != null)
|
||||
cs.ComponentChanged += cs_ComponentChanged;
|
||||
|
||||
return (cs);
|
||||
}
|
||||
|
||||
return (null);
|
||||
}
|
||||
|
||||
void cs_ComponentChanged(object sender, ComponentChangedEventArgs e)
|
||||
{
|
||||
_ComponentChanged = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region AfterEditValue
|
||||
|
||||
protected void AfterEditValue(ITypeDescriptorContext context, IComponentChangeService cs)
|
||||
{
|
||||
if (cs != null)
|
||||
cs.ComponentChanged -= cs_ComponentChanged;
|
||||
|
||||
if (_ComponentChanged == true)
|
||||
{
|
||||
ChartContainer chCont = ((ChartVisualElement)context.Instance).ParentChartContainer;
|
||||
|
||||
if (chCont != null)
|
||||
{
|
||||
PropertyDescriptorCollection pdc = TypeDescriptor.GetProperties(chCont);
|
||||
PropertyDescriptor pd = pdc["Name"];
|
||||
|
||||
cs.OnComponentChanged(chCont, pd, null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetDesigner
|
||||
|
||||
internal ChartControlDesigner GetDesigner(IComponent component)
|
||||
{
|
||||
if (_ControlDesigner == null)
|
||||
{
|
||||
IDesignerHost dh = (IDesignerHost)GetService(typeof(IDesignerHost));
|
||||
|
||||
_ControlDesigner = dh.GetDesigner(component) as ChartControlDesigner;
|
||||
}
|
||||
|
||||
return (_ControlDesigner);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class ChartAxesCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private ChartXy _ChartXy;
|
||||
private Type _CollectionType;
|
||||
|
||||
#endregion
|
||||
|
||||
public ChartAxesCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
_CollectionType = type;
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_ChartXy = context.Instance as ChartXy;
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
ChartAxis axis = (ChartAxis)base.CreateInstance(itemType);
|
||||
|
||||
axis.Name = (_CollectionType == typeof(ChartAxesXCollection))
|
||||
? _ChartXy.AncillaryAxesX.GetUniqueName() : _ChartXy.AncillaryAxesY.GetUniqueName();
|
||||
|
||||
return (axis);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ChartAxis item = ChartItem as ChartAxis;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
if (_CollectionType == typeof(ChartAxesXCollection))
|
||||
{
|
||||
ChartAxesXCollection cac = _ChartXy.AncillaryAxesX;
|
||||
ChartAxis clone = cac[cac.Count - 1];
|
||||
|
||||
string name = clone.Name;
|
||||
item.CopyTo(clone);
|
||||
clone.Name = name;
|
||||
}
|
||||
else
|
||||
{
|
||||
ChartAxesYCollection cac = _ChartXy.AncillaryAxesY;
|
||||
ChartAxis clone = cac[cac.Count - 1];
|
||||
|
||||
item.CopyTo(clone);
|
||||
|
||||
clone.Name = cac.GetUniqueName();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return (_CollectionType == typeof(ChartAxesXCollection)
|
||||
? typeof(ChartAxisX) : typeof(ChartAxisY));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,174 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
using System.Reflection;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
using DevComponents.DotNetBar.Charts.Style;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class ChartContainerCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private ChartPanel _ChartPanel;
|
||||
|
||||
#endregion
|
||||
|
||||
public ChartContainerCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_ChartPanel = context.Instance as ChartPanel;
|
||||
|
||||
object retval = base.EditValue(context, provider, value);
|
||||
|
||||
return (retval);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
if (itemType == typeof(ChartXy))
|
||||
{
|
||||
ChartXy chartXy = (ChartXy)base.CreateInstance(itemType);
|
||||
|
||||
if (_ChartPanel != null)
|
||||
chartXy.Name = _ChartPanel.ChartContainers.GetUniqueName("ChartXy");
|
||||
|
||||
SetChartDefaults(chartXy);
|
||||
|
||||
return (chartXy);
|
||||
}
|
||||
|
||||
if (itemType == typeof(PieChart))
|
||||
{
|
||||
PieChart pieChart = (PieChart)base.CreateInstance(itemType);
|
||||
|
||||
if (_ChartPanel != null)
|
||||
pieChart.Name = _ChartPanel.ChartContainers.GetUniqueName("PieChart");
|
||||
|
||||
SetChartDefaults(pieChart);
|
||||
|
||||
return (pieChart);
|
||||
}
|
||||
|
||||
if (itemType == typeof(ChartPanel))
|
||||
{
|
||||
ChartPanel panel = (ChartPanel)base.CreateInstance(itemType);
|
||||
|
||||
if (_ChartPanel != null)
|
||||
panel.Name = _ChartPanel.ChartContainers.GetUniqueName("ChartPanel");
|
||||
|
||||
SetPanelDefaults(panel);
|
||||
|
||||
return (panel);
|
||||
}
|
||||
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
private void SetPanelDefaults(ChartPanel panel)
|
||||
{
|
||||
panel.ContainerVisualStyles.Default.BorderThickness = new Thickness(1);
|
||||
panel.ContainerVisualStyles.Default.BorderColor = new BorderColor(Color.Black);
|
||||
panel.ContainerVisualStyles.Default.Background = new Background(Color.Gray);
|
||||
panel.ContainerVisualStyles.Default.Margin = new Padding(4);
|
||||
}
|
||||
|
||||
private void SetChartDefaults(ChartXy chartXy)
|
||||
{
|
||||
chartXy.ContainerVisualStyles.Default.BorderThickness = new Thickness(1);
|
||||
chartXy.ContainerVisualStyles.Default.BorderColor = new BorderColor(Color.Black);
|
||||
chartXy.ContainerVisualStyles.Default.Background = new Background(Color.White);
|
||||
chartXy.ContainerVisualStyles.Default.Margin = new Padding(4);
|
||||
}
|
||||
|
||||
private void SetChartDefaults(PieChart pieChart)
|
||||
{
|
||||
pieChart.ContainerVisualStyles.Default.BorderThickness = new Thickness(1);
|
||||
pieChart.ContainerVisualStyles.Default.BorderColor = new BorderColor(Color.Black);
|
||||
pieChart.ContainerVisualStyles.Default.Background = new Background(Color.White);
|
||||
pieChart.ContainerVisualStyles.Default.Margin = new Padding(4);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ChartContainer item = ChartItem as ChartContainer;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
ChartControlDesigner ccd = GetDesigner(_ChartPanel.ChartControl);
|
||||
ChartContainerCollection ccc = _ChartPanel.ChartContainers;
|
||||
|
||||
ccd.InCopyItem = true;
|
||||
|
||||
if (item is ChartPanel)
|
||||
_ItemTypes[0] = typeof(ChartPanel);
|
||||
|
||||
try
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
ChartContainer clone = ccc[ccc.Count - 1];
|
||||
|
||||
string name = clone.Name;
|
||||
item.CopyTo(clone);
|
||||
clone.Name = name;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (item is ChartPanel)
|
||||
_ItemTypes[0] = typeof(ChartXy);
|
||||
|
||||
ccd.InCopyItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(ChartContainer);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateNewItemTypes
|
||||
|
||||
private Type[] _ItemTypes = new Type[]
|
||||
{
|
||||
typeof(ChartXy),
|
||||
typeof(PieChart),
|
||||
typeof(ChartPanel),
|
||||
};
|
||||
|
||||
protected override Type[] CreateNewItemTypes()
|
||||
{
|
||||
return (_ItemTypes);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,192 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class ChartControlActionList : DesignerActionList,
|
||||
ITypeDescriptorContext, IWindowsFormsEditorService, IServiceProvider
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private ChartControl _ChartControl;
|
||||
private PropertyDescriptor _PropertyDescriptor;
|
||||
private IComponentChangeService _ChangeService;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// ChartControlActionList
|
||||
/// </summary>
|
||||
/// <param name="chartControl">Associated ChartControl</param>
|
||||
public ChartControlActionList(ChartControl chartControl)
|
||||
: base(chartControl)
|
||||
{
|
||||
_ChartControl = chartControl;
|
||||
|
||||
_ChangeService = Component.Site.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
|
||||
}
|
||||
|
||||
#region Public properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the GridPanel DataSource
|
||||
/// </summary>
|
||||
[AttributeProvider(typeof(IListSource))]
|
||||
public object DataSource
|
||||
{
|
||||
get { return (_ChartControl.DataSource); }
|
||||
set { SetValue("DataSource", value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the GridPanel DataMember
|
||||
/// </summary>
|
||||
public string DataMember
|
||||
{
|
||||
get { return (_ChartControl.DataMember); }
|
||||
set { SetValue("DataMember", value); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetSortedActionItems
|
||||
|
||||
public override DesignerActionItemCollection GetSortedActionItems()
|
||||
{
|
||||
DesignerActionItemCollection items = new DesignerActionItemCollection();
|
||||
|
||||
items.Add(new DesignerActionHeaderItem("Data"));
|
||||
|
||||
items.Add(new DesignerActionPropertyItem("DataSource",
|
||||
"DataSource", "Data",
|
||||
"Sets the default Chart DataSource."));
|
||||
|
||||
items.Add(new DesignerActionPropertyItem("DataMember",
|
||||
"DataMember", "Data",
|
||||
"Sets the default Chart DataMamber."));
|
||||
return items;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SetValue
|
||||
|
||||
private void SetValue(string property, object value)
|
||||
{
|
||||
_ChangeService.OnComponentChanging(_ChartControl, null);
|
||||
|
||||
GetPropertyByName(property).SetValue(_ChartControl, value);
|
||||
|
||||
_ChangeService.OnComponentChanged(_ChartControl, null, null, null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetPropertyByName
|
||||
|
||||
/// <summary>
|
||||
/// Gets the property via the given name
|
||||
/// </summary>
|
||||
/// <param name="propName">Property name</param>
|
||||
/// <returns>PropertyDescriptor</returns>
|
||||
private PropertyDescriptor GetPropertyByName(string propName)
|
||||
{
|
||||
PropertyDescriptor prop =
|
||||
TypeDescriptor.GetProperties(_ChartControl)[propName];
|
||||
|
||||
if (prop == null)
|
||||
throw new ArgumentException("Matching property not found.", propName);
|
||||
|
||||
return (prop);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EditChartContainers
|
||||
|
||||
/// <summary>
|
||||
/// EditChartContainers
|
||||
/// </summary>
|
||||
private void EditChartContainers()
|
||||
{
|
||||
_PropertyDescriptor = TypeDescriptor.GetProperties(_ChartControl.ChartPanel)["ChartContainers"];
|
||||
|
||||
UITypeEditor editor = (UITypeEditor)_PropertyDescriptor.GetEditor(typeof(UITypeEditor));
|
||||
|
||||
if (editor != null)
|
||||
editor.EditValue(this, this, _ChartControl.ChartPanel.ChartContainers);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITypeDescriptorContext Members
|
||||
|
||||
public IContainer Container
|
||||
{
|
||||
get { return (Component.Site.Container); }
|
||||
}
|
||||
|
||||
public object Instance
|
||||
{
|
||||
get { return (Component); }
|
||||
}
|
||||
|
||||
public void OnComponentChanged()
|
||||
{
|
||||
object value = _ChartControl.ChartPanel.ChartContainers;
|
||||
|
||||
_ChangeService.OnComponentChanged(Component, _PropertyDescriptor, value, value);
|
||||
}
|
||||
|
||||
public bool OnComponentChanging()
|
||||
{
|
||||
_ChangeService.OnComponentChanging(Component, _PropertyDescriptor);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public PropertyDescriptor PropertyDescriptor
|
||||
{
|
||||
get { return (_PropertyDescriptor); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IWindowsFormsEditorService Members
|
||||
|
||||
public void CloseDropDown()
|
||||
{
|
||||
throw new Exception("The method or operation is not implemented.");
|
||||
}
|
||||
|
||||
public void DropDownControl(Control control)
|
||||
{
|
||||
throw new Exception("The method or operation is not implemented.");
|
||||
}
|
||||
|
||||
public DialogResult ShowDialog(Form dialog)
|
||||
{
|
||||
return (dialog.ShowDialog());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IServiceProvider
|
||||
|
||||
object IServiceProvider.GetService(Type serviceType)
|
||||
{
|
||||
if (serviceType.Equals(typeof(IWindowsFormsEditorService)))
|
||||
return (this);
|
||||
|
||||
return GetService(serviceType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class ChartSeriesCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private BaseChart _BaseChart;
|
||||
|
||||
#endregion
|
||||
|
||||
public ChartSeriesCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_BaseChart = context.Instance as BaseChart;
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
if (itemType == typeof(PieSeries) || itemType == typeof(ChartSeries))
|
||||
{
|
||||
BaseSeries series = (BaseSeries)base.CreateInstance(itemType);
|
||||
|
||||
series.Name = _BaseChart.BaseSeries.GetUniqueName();
|
||||
|
||||
return (series);
|
||||
}
|
||||
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
BaseSeries item = ChartItem as BaseSeries;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
ChartBaseSeriesCollection csc = _BaseChart.BaseSeries;
|
||||
BaseSeries clone = csc[csc.Count - 1];
|
||||
|
||||
string name = clone.Name;
|
||||
item.CopyTo(clone);
|
||||
clone.Name = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return (_BaseChart is PieChart ? typeof(PieSeries) : typeof(ChartSeries));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
688
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/ChartStyleDialog.Designer.cs
generated
Normal file
688
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/ChartStyleDialog.Designer.cs
generated
Normal file
@@ -0,0 +1,688 @@
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
partial class ChartStyleDialog
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChartStyleDialog));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.cbLinePlot = new System.Windows.Forms.CheckBox();
|
||||
this.cbPointPlot = new System.Windows.Forms.CheckBox();
|
||||
this.btnOk = new System.Windows.Forms.Button();
|
||||
this.cbBlankChart = new System.Windows.Forms.CheckBox();
|
||||
this.cbMultiAxis = new System.Windows.Forms.CheckBox();
|
||||
this.cbMultiChart = new System.Windows.Forms.CheckBox();
|
||||
this.cbHDotPlot = new System.Windows.Forms.CheckBox();
|
||||
this.cbVDotPlot = new System.Windows.Forms.CheckBox();
|
||||
this.cbBubblePlot = new System.Windows.Forms.CheckBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.pageSlider1 = new DevComponents.DotNetBar.Controls.PageSlider();
|
||||
this.pageSliderPage1 = new DevComponents.DotNetBar.Controls.PageSliderPage();
|
||||
this.cbStepLine = new System.Windows.Forms.CheckBox();
|
||||
this.cbLineArea = new System.Windows.Forms.CheckBox();
|
||||
this.pageSliderPage2 = new DevComponents.DotNetBar.Controls.PageSliderPage();
|
||||
this.cbRangeBarH = new System.Windows.Forms.CheckBox();
|
||||
this.cbRangeBarV = new System.Windows.Forms.CheckBox();
|
||||
this.cbBarH = new System.Windows.Forms.CheckBox();
|
||||
this.cbBarV = new System.Windows.Forms.CheckBox();
|
||||
this.pageSliderPage3 = new DevComponents.DotNetBar.Controls.PageSliderPage();
|
||||
this.cbHiLoHBox = new System.Windows.Forms.CheckBox();
|
||||
this.cbHiLoVBox = new System.Windows.Forms.CheckBox();
|
||||
this.cbHiLoHLine = new System.Windows.Forms.CheckBox();
|
||||
this.cbHiLoVLine = new System.Windows.Forms.CheckBox();
|
||||
this.pageSliderPage4 = new DevComponents.DotNetBar.Controls.PageSliderPage();
|
||||
this.cbPieMultiRingRev = new System.Windows.Forms.CheckBox();
|
||||
this.cbPieMultiRing = new System.Windows.Forms.CheckBox();
|
||||
this.cbPieExtentFill = new System.Windows.Forms.CheckBox();
|
||||
this.cbPieExtent = new System.Windows.Forms.CheckBox();
|
||||
this.cbPieDonut = new System.Windows.Forms.CheckBox();
|
||||
this.cbPieSimple = new System.Windows.Forms.CheckBox();
|
||||
this.pageSliderPage5 = new DevComponents.DotNetBar.Controls.PageSliderPage();
|
||||
this.cbPieOverlay = new System.Windows.Forms.CheckBox();
|
||||
this.cbPieGridAngle = new System.Windows.Forms.CheckBox();
|
||||
this.cbPieShowSingleRing = new System.Windows.Forms.CheckBox();
|
||||
this.cbPieMultiSeries = new System.Windows.Forms.CheckBox();
|
||||
this.pageSlider1.SuspendLayout();
|
||||
this.pageSliderPage1.SuspendLayout();
|
||||
this.pageSliderPage2.SuspendLayout();
|
||||
this.pageSliderPage3.SuspendLayout();
|
||||
this.pageSliderPage4.SuspendLayout();
|
||||
this.pageSliderPage5.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(0, 445);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.label1.Size = new System.Drawing.Size(648, 55);
|
||||
this.label1.TabIndex = 4;
|
||||
this.label1.Text = "Please select your starting Chart template";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// cbLinePlot
|
||||
//
|
||||
this.cbLinePlot.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbLinePlot.AutoSize = true;
|
||||
this.cbLinePlot.Image = ((System.Drawing.Image)(resources.GetObject("cbLinePlot.Image")));
|
||||
this.cbLinePlot.Location = new System.Drawing.Point(347, 3);
|
||||
this.cbLinePlot.Name = "cbLinePlot";
|
||||
this.cbLinePlot.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbLinePlot.TabIndex = 3;
|
||||
this.cbLinePlot.Text = "Line Plot";
|
||||
this.cbLinePlot.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbLinePlot.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbLinePlot.UseVisualStyleBackColor = true;
|
||||
this.cbLinePlot.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbPointPlot
|
||||
//
|
||||
this.cbPointPlot.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPointPlot.AutoSize = true;
|
||||
this.cbPointPlot.Checked = true;
|
||||
this.cbPointPlot.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbPointPlot.Image = ((System.Drawing.Image)(resources.GetObject("cbPointPlot.Image")));
|
||||
this.cbPointPlot.Location = new System.Drawing.Point(175, 3);
|
||||
this.cbPointPlot.Name = "cbPointPlot";
|
||||
this.cbPointPlot.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPointPlot.TabIndex = 2;
|
||||
this.cbPointPlot.Text = "Point Plot";
|
||||
this.cbPointPlot.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPointPlot.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPointPlot.UseVisualStyleBackColor = true;
|
||||
this.cbPointPlot.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// btnOk
|
||||
//
|
||||
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnOk.Location = new System.Drawing.Point(546, 461);
|
||||
this.btnOk.Name = "btnOk";
|
||||
this.btnOk.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnOk.TabIndex = 1;
|
||||
this.btnOk.Text = "Select";
|
||||
this.btnOk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbBlankChart
|
||||
//
|
||||
this.cbBlankChart.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbBlankChart.AutoSize = true;
|
||||
this.cbBlankChart.Image = ((System.Drawing.Image)(resources.GetObject("cbBlankChart.Image")));
|
||||
this.cbBlankChart.Location = new System.Drawing.Point(3, 3);
|
||||
this.cbBlankChart.Name = "cbBlankChart";
|
||||
this.cbBlankChart.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbBlankChart.TabIndex = 9;
|
||||
this.cbBlankChart.Text = "Blank Chart";
|
||||
this.cbBlankChart.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbBlankChart.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbBlankChart.UseVisualStyleBackColor = true;
|
||||
this.cbBlankChart.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbMultiAxis
|
||||
//
|
||||
this.cbMultiAxis.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbMultiAxis.AutoSize = true;
|
||||
this.cbMultiAxis.Image = ((System.Drawing.Image)(resources.GetObject("cbMultiAxis.Image")));
|
||||
this.cbMultiAxis.Location = new System.Drawing.Point(347, 182);
|
||||
this.cbMultiAxis.Name = "cbMultiAxis";
|
||||
this.cbMultiAxis.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbMultiAxis.TabIndex = 4;
|
||||
this.cbMultiAxis.Text = "Multi Axis";
|
||||
this.cbMultiAxis.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbMultiAxis.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbMultiAxis.UseVisualStyleBackColor = true;
|
||||
this.cbMultiAxis.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbMultiChart
|
||||
//
|
||||
this.cbMultiChart.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbMultiChart.AutoSize = true;
|
||||
this.cbMultiChart.Image = ((System.Drawing.Image)(resources.GetObject("cbMultiChart.Image")));
|
||||
this.cbMultiChart.Location = new System.Drawing.Point(3, 3);
|
||||
this.cbMultiChart.Name = "cbMultiChart";
|
||||
this.cbMultiChart.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbMultiChart.TabIndex = 5;
|
||||
this.cbMultiChart.Text = "Multi Chart";
|
||||
this.cbMultiChart.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbMultiChart.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbMultiChart.UseVisualStyleBackColor = true;
|
||||
this.cbMultiChart.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbHDotPlot
|
||||
//
|
||||
this.cbHDotPlot.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbHDotPlot.AutoSize = true;
|
||||
this.cbHDotPlot.Image = ((System.Drawing.Image)(resources.GetObject("cbHDotPlot.Image")));
|
||||
this.cbHDotPlot.Location = new System.Drawing.Point(347, 3);
|
||||
this.cbHDotPlot.Name = "cbHDotPlot";
|
||||
this.cbHDotPlot.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbHDotPlot.TabIndex = 6;
|
||||
this.cbHDotPlot.Text = "Vertical DotPlot";
|
||||
this.cbHDotPlot.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbHDotPlot.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbHDotPlot.UseVisualStyleBackColor = true;
|
||||
this.cbHDotPlot.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbVDotPlot
|
||||
//
|
||||
this.cbVDotPlot.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbVDotPlot.AutoSize = true;
|
||||
this.cbVDotPlot.Image = ((System.Drawing.Image)(resources.GetObject("cbVDotPlot.Image")));
|
||||
this.cbVDotPlot.Location = new System.Drawing.Point(347, 184);
|
||||
this.cbVDotPlot.Name = "cbVDotPlot";
|
||||
this.cbVDotPlot.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbVDotPlot.TabIndex = 7;
|
||||
this.cbVDotPlot.Text = "Horizontal DotPlot";
|
||||
this.cbVDotPlot.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbVDotPlot.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbVDotPlot.UseVisualStyleBackColor = true;
|
||||
this.cbVDotPlot.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbBubblePlot
|
||||
//
|
||||
this.cbBubblePlot.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbBubblePlot.AutoSize = true;
|
||||
this.cbBubblePlot.Image = ((System.Drawing.Image)(resources.GetObject("cbBubblePlot.Image")));
|
||||
this.cbBubblePlot.Location = new System.Drawing.Point(3, 182);
|
||||
this.cbBubblePlot.Name = "cbBubblePlot";
|
||||
this.cbBubblePlot.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbBubblePlot.TabIndex = 8;
|
||||
this.cbBubblePlot.Text = "Bubble Plot";
|
||||
this.cbBubblePlot.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbBubblePlot.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbBubblePlot.UseVisualStyleBackColor = true;
|
||||
this.cbBubblePlot.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.ForeColor = System.Drawing.Color.DarkBlue;
|
||||
this.label2.Location = new System.Drawing.Point(0, 370);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.label2.Size = new System.Drawing.Size(648, 75);
|
||||
this.label2.TabIndex = 48;
|
||||
this.label2.Text = "In the designer you can click and drag to move the chart, or single click to sele" +
|
||||
"ct individual elements for design.\r\nContext menus are also available for each se" +
|
||||
"lected item.";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// pageSlider1
|
||||
//
|
||||
this.pageSlider1.Controls.Add(this.pageSliderPage1);
|
||||
this.pageSlider1.Controls.Add(this.pageSliderPage2);
|
||||
this.pageSlider1.Controls.Add(this.pageSliderPage3);
|
||||
this.pageSlider1.Controls.Add(this.pageSliderPage4);
|
||||
this.pageSlider1.Controls.Add(this.pageSliderPage5);
|
||||
this.pageSlider1.Location = new System.Drawing.Point(2, 2);
|
||||
this.pageSlider1.Name = "pageSlider1";
|
||||
this.pageSlider1.SelectedPage = this.pageSliderPage1;
|
||||
this.pageSlider1.Size = new System.Drawing.Size(644, 379);
|
||||
this.pageSlider1.TabIndex = 49;
|
||||
this.pageSlider1.Text = "pageSlider1";
|
||||
//
|
||||
// pageSliderPage1
|
||||
//
|
||||
this.pageSliderPage1.Controls.Add(this.cbStepLine);
|
||||
this.pageSliderPage1.Controls.Add(this.cbBlankChart);
|
||||
this.pageSliderPage1.Controls.Add(this.cbMultiAxis);
|
||||
this.pageSliderPage1.Controls.Add(this.cbPointPlot);
|
||||
this.pageSliderPage1.Controls.Add(this.cbLinePlot);
|
||||
this.pageSliderPage1.Controls.Add(this.cbLineArea);
|
||||
this.pageSliderPage1.Location = new System.Drawing.Point(4, 8);
|
||||
this.pageSliderPage1.Name = "pageSliderPage1";
|
||||
this.pageSliderPage1.Size = new System.Drawing.Size(538, 367);
|
||||
this.pageSliderPage1.TabIndex = 3;
|
||||
//
|
||||
// cbStepLine
|
||||
//
|
||||
this.cbStepLine.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbStepLine.AutoSize = true;
|
||||
this.cbStepLine.Image = ((System.Drawing.Image)(resources.GetObject("cbStepLine.Image")));
|
||||
this.cbStepLine.Location = new System.Drawing.Point(3, 182);
|
||||
this.cbStepLine.Name = "cbStepLine";
|
||||
this.cbStepLine.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbStepLine.TabIndex = 50;
|
||||
this.cbStepLine.Text = "Step Line";
|
||||
this.cbStepLine.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbStepLine.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbStepLine.UseVisualStyleBackColor = true;
|
||||
this.cbStepLine.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbLineArea
|
||||
//
|
||||
this.cbLineArea.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbLineArea.AutoSize = true;
|
||||
this.cbLineArea.Image = ((System.Drawing.Image)(resources.GetObject("cbLineArea.Image")));
|
||||
this.cbLineArea.Location = new System.Drawing.Point(175, 182);
|
||||
this.cbLineArea.Name = "cbLineArea";
|
||||
this.cbLineArea.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbLineArea.TabIndex = 50;
|
||||
this.cbLineArea.Text = "Line Area";
|
||||
this.cbLineArea.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbLineArea.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbLineArea.UseVisualStyleBackColor = true;
|
||||
this.cbLineArea.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// pageSliderPage2
|
||||
//
|
||||
this.pageSliderPage2.Controls.Add(this.cbRangeBarH);
|
||||
this.pageSliderPage2.Controls.Add(this.cbRangeBarV);
|
||||
this.pageSliderPage2.Controls.Add(this.cbBarH);
|
||||
this.pageSliderPage2.Controls.Add(this.cbBubblePlot);
|
||||
this.pageSliderPage2.Controls.Add(this.cbBarV);
|
||||
this.pageSliderPage2.Controls.Add(this.cbMultiChart);
|
||||
this.pageSliderPage2.Location = new System.Drawing.Point(590, 8);
|
||||
this.pageSliderPage2.Name = "pageSliderPage2";
|
||||
this.pageSliderPage2.Size = new System.Drawing.Size(538, 367);
|
||||
this.pageSliderPage2.TabIndex = 4;
|
||||
//
|
||||
// cbRangeBarH
|
||||
//
|
||||
this.cbRangeBarH.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbRangeBarH.AutoSize = true;
|
||||
this.cbRangeBarH.Image = ((System.Drawing.Image)(resources.GetObject("cbRangeBarH.Image")));
|
||||
this.cbRangeBarH.Location = new System.Drawing.Point(347, 182);
|
||||
this.cbRangeBarH.Name = "cbRangeBarH";
|
||||
this.cbRangeBarH.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbRangeBarH.TabIndex = 50;
|
||||
this.cbRangeBarH.Text = "Horizontal Range Bar";
|
||||
this.cbRangeBarH.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbRangeBarH.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbRangeBarH.UseVisualStyleBackColor = true;
|
||||
this.cbRangeBarH.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbRangeBarV
|
||||
//
|
||||
this.cbRangeBarV.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbRangeBarV.AutoSize = true;
|
||||
this.cbRangeBarV.Image = ((System.Drawing.Image)(resources.GetObject("cbRangeBarV.Image")));
|
||||
this.cbRangeBarV.Location = new System.Drawing.Point(347, 3);
|
||||
this.cbRangeBarV.Name = "cbRangeBarV";
|
||||
this.cbRangeBarV.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbRangeBarV.TabIndex = 50;
|
||||
this.cbRangeBarV.Text = "Vertical Range Bar";
|
||||
this.cbRangeBarV.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbRangeBarV.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbRangeBarV.UseVisualStyleBackColor = true;
|
||||
this.cbRangeBarV.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbBarH
|
||||
//
|
||||
this.cbBarH.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbBarH.AutoSize = true;
|
||||
this.cbBarH.Image = ((System.Drawing.Image)(resources.GetObject("cbBarH.Image")));
|
||||
this.cbBarH.Location = new System.Drawing.Point(175, 182);
|
||||
this.cbBarH.Name = "cbBarH";
|
||||
this.cbBarH.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbBarH.TabIndex = 50;
|
||||
this.cbBarH.Text = "Horizontal Bar";
|
||||
this.cbBarH.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbBarH.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbBarH.UseVisualStyleBackColor = true;
|
||||
this.cbBarH.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbBarV
|
||||
//
|
||||
this.cbBarV.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbBarV.AutoSize = true;
|
||||
this.cbBarV.Image = ((System.Drawing.Image)(resources.GetObject("cbBarV.Image")));
|
||||
this.cbBarV.Location = new System.Drawing.Point(175, 3);
|
||||
this.cbBarV.Name = "cbBarV";
|
||||
this.cbBarV.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbBarV.TabIndex = 50;
|
||||
this.cbBarV.Text = "Vertical Bar";
|
||||
this.cbBarV.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbBarV.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbBarV.UseVisualStyleBackColor = true;
|
||||
this.cbBarV.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// pageSliderPage3
|
||||
//
|
||||
this.pageSliderPage3.Controls.Add(this.cbHiLoHBox);
|
||||
this.pageSliderPage3.Controls.Add(this.cbHiLoVBox);
|
||||
this.pageSliderPage3.Controls.Add(this.cbHiLoHLine);
|
||||
this.pageSliderPage3.Controls.Add(this.cbHiLoVLine);
|
||||
this.pageSliderPage3.Controls.Add(this.cbVDotPlot);
|
||||
this.pageSliderPage3.Controls.Add(this.cbHDotPlot);
|
||||
this.pageSliderPage3.Location = new System.Drawing.Point(1176, 8);
|
||||
this.pageSliderPage3.Name = "pageSliderPage3";
|
||||
this.pageSliderPage3.Size = new System.Drawing.Size(538, 367);
|
||||
this.pageSliderPage3.TabIndex = 5;
|
||||
//
|
||||
// cbHiLoHBox
|
||||
//
|
||||
this.cbHiLoHBox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbHiLoHBox.AutoSize = true;
|
||||
this.cbHiLoHBox.Image = ((System.Drawing.Image)(resources.GetObject("cbHiLoHBox.Image")));
|
||||
this.cbHiLoHBox.Location = new System.Drawing.Point(175, 182);
|
||||
this.cbHiLoHBox.Name = "cbHiLoHBox";
|
||||
this.cbHiLoHBox.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbHiLoHBox.TabIndex = 11;
|
||||
this.cbHiLoHBox.Text = "Horizontal HiLoBar (Box)";
|
||||
this.cbHiLoHBox.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbHiLoHBox.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbHiLoHBox.UseVisualStyleBackColor = true;
|
||||
this.cbHiLoHBox.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbHiLoVBox
|
||||
//
|
||||
this.cbHiLoVBox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbHiLoVBox.AutoSize = true;
|
||||
this.cbHiLoVBox.Image = ((System.Drawing.Image)(resources.GetObject("cbHiLoVBox.Image")));
|
||||
this.cbHiLoVBox.Location = new System.Drawing.Point(175, 3);
|
||||
this.cbHiLoVBox.Name = "cbHiLoVBox";
|
||||
this.cbHiLoVBox.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbHiLoVBox.TabIndex = 10;
|
||||
this.cbHiLoVBox.Text = "Vertical HiLoBar (Box)";
|
||||
this.cbHiLoVBox.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbHiLoVBox.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbHiLoVBox.UseVisualStyleBackColor = true;
|
||||
this.cbHiLoVBox.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbHiLoHLine
|
||||
//
|
||||
this.cbHiLoHLine.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbHiLoHLine.AutoSize = true;
|
||||
this.cbHiLoHLine.Image = ((System.Drawing.Image)(resources.GetObject("cbHiLoHLine.Image")));
|
||||
this.cbHiLoHLine.Location = new System.Drawing.Point(6, 182);
|
||||
this.cbHiLoHLine.Name = "cbHiLoHLine";
|
||||
this.cbHiLoHLine.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbHiLoHLine.TabIndex = 9;
|
||||
this.cbHiLoHLine.Text = "Horizontal HiLoBar (Line)";
|
||||
this.cbHiLoHLine.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbHiLoHLine.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbHiLoHLine.UseVisualStyleBackColor = true;
|
||||
this.cbHiLoHLine.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbHiLoVLine
|
||||
//
|
||||
this.cbHiLoVLine.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbHiLoVLine.AutoSize = true;
|
||||
this.cbHiLoVLine.Image = ((System.Drawing.Image)(resources.GetObject("cbHiLoVLine.Image")));
|
||||
this.cbHiLoVLine.Location = new System.Drawing.Point(3, 3);
|
||||
this.cbHiLoVLine.Name = "cbHiLoVLine";
|
||||
this.cbHiLoVLine.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbHiLoVLine.TabIndex = 8;
|
||||
this.cbHiLoVLine.Text = "Vertical HiLoBar (Line)";
|
||||
this.cbHiLoVLine.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbHiLoVLine.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbHiLoVLine.UseVisualStyleBackColor = true;
|
||||
this.cbHiLoVLine.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// pageSliderPage4
|
||||
//
|
||||
this.pageSliderPage4.Controls.Add(this.cbPieMultiRingRev);
|
||||
this.pageSliderPage4.Controls.Add(this.cbPieMultiRing);
|
||||
this.pageSliderPage4.Controls.Add(this.cbPieExtentFill);
|
||||
this.pageSliderPage4.Controls.Add(this.cbPieExtent);
|
||||
this.pageSliderPage4.Controls.Add(this.cbPieDonut);
|
||||
this.pageSliderPage4.Controls.Add(this.cbPieSimple);
|
||||
this.pageSliderPage4.Location = new System.Drawing.Point(1762, 8);
|
||||
this.pageSliderPage4.Name = "pageSliderPage4";
|
||||
this.pageSliderPage4.Size = new System.Drawing.Size(538, 367);
|
||||
this.pageSliderPage4.TabIndex = 6;
|
||||
//
|
||||
// cbPieMultiRingRev
|
||||
//
|
||||
this.cbPieMultiRingRev.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieMultiRingRev.AutoSize = true;
|
||||
this.cbPieMultiRingRev.Image = ((System.Drawing.Image)(resources.GetObject("cbPieMultiRingRev.Image")));
|
||||
this.cbPieMultiRingRev.Location = new System.Drawing.Point(350, 182);
|
||||
this.cbPieMultiRingRev.Name = "cbPieMultiRingRev";
|
||||
this.cbPieMultiRingRev.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieMultiRingRev.TabIndex = 16;
|
||||
this.cbPieMultiRingRev.Text = "Multi Ring Reversed";
|
||||
this.cbPieMultiRingRev.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieMultiRingRev.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieMultiRingRev.UseVisualStyleBackColor = true;
|
||||
this.cbPieMultiRingRev.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbPieMultiRing
|
||||
//
|
||||
this.cbPieMultiRing.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieMultiRing.AutoSize = true;
|
||||
this.cbPieMultiRing.Image = ((System.Drawing.Image)(resources.GetObject("cbPieMultiRing.Image")));
|
||||
this.cbPieMultiRing.Location = new System.Drawing.Point(350, 5);
|
||||
this.cbPieMultiRing.Name = "cbPieMultiRing";
|
||||
this.cbPieMultiRing.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieMultiRing.TabIndex = 15;
|
||||
this.cbPieMultiRing.Text = "Multi Ring";
|
||||
this.cbPieMultiRing.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieMultiRing.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieMultiRing.UseVisualStyleBackColor = true;
|
||||
this.cbPieMultiRing.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbPieExtentFill
|
||||
//
|
||||
this.cbPieExtentFill.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieExtentFill.AutoSize = true;
|
||||
this.cbPieExtentFill.Image = ((System.Drawing.Image)(resources.GetObject("cbPieExtentFill.Image")));
|
||||
this.cbPieExtentFill.Location = new System.Drawing.Point(178, 182);
|
||||
this.cbPieExtentFill.Name = "cbPieExtentFill";
|
||||
this.cbPieExtentFill.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieExtentFill.TabIndex = 14;
|
||||
this.cbPieExtentFill.Text = "Pie Chart - Extent Fill";
|
||||
this.cbPieExtentFill.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieExtentFill.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieExtentFill.UseVisualStyleBackColor = true;
|
||||
this.cbPieExtentFill.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbPieExtent
|
||||
//
|
||||
this.cbPieExtent.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieExtent.AutoSize = true;
|
||||
this.cbPieExtent.Image = ((System.Drawing.Image)(resources.GetObject("cbPieExtent.Image")));
|
||||
this.cbPieExtent.Location = new System.Drawing.Point(178, 5);
|
||||
this.cbPieExtent.Name = "cbPieExtent";
|
||||
this.cbPieExtent.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieExtent.TabIndex = 13;
|
||||
this.cbPieExtent.Text = "Pie Chart - Varried Extent";
|
||||
this.cbPieExtent.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieExtent.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieExtent.UseVisualStyleBackColor = true;
|
||||
this.cbPieExtent.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbPieDonut
|
||||
//
|
||||
this.cbPieDonut.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieDonut.AutoSize = true;
|
||||
this.cbPieDonut.Image = ((System.Drawing.Image)(resources.GetObject("cbPieDonut.Image")));
|
||||
this.cbPieDonut.Location = new System.Drawing.Point(6, 182);
|
||||
this.cbPieDonut.Name = "cbPieDonut";
|
||||
this.cbPieDonut.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieDonut.TabIndex = 12;
|
||||
this.cbPieDonut.Text = "Donut";
|
||||
this.cbPieDonut.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieDonut.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieDonut.UseVisualStyleBackColor = true;
|
||||
this.cbPieDonut.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbPieSimple
|
||||
//
|
||||
this.cbPieSimple.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieSimple.AutoSize = true;
|
||||
this.cbPieSimple.Image = ((System.Drawing.Image)(resources.GetObject("cbPieSimple.Image")));
|
||||
this.cbPieSimple.Location = new System.Drawing.Point(6, 5);
|
||||
this.cbPieSimple.Name = "cbPieSimple";
|
||||
this.cbPieSimple.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieSimple.TabIndex = 11;
|
||||
this.cbPieSimple.Text = "Pie Chart";
|
||||
this.cbPieSimple.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieSimple.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieSimple.UseVisualStyleBackColor = true;
|
||||
this.cbPieSimple.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// pageSliderPage5
|
||||
//
|
||||
this.pageSliderPage5.Controls.Add(this.cbPieOverlay);
|
||||
this.pageSliderPage5.Controls.Add(this.cbPieGridAngle);
|
||||
this.pageSliderPage5.Controls.Add(this.cbPieShowSingleRing);
|
||||
this.pageSliderPage5.Controls.Add(this.cbPieMultiSeries);
|
||||
this.pageSliderPage5.Location = new System.Drawing.Point(2348, 8);
|
||||
this.pageSliderPage5.Name = "pageSliderPage5";
|
||||
this.pageSliderPage5.Size = new System.Drawing.Size(538, 367);
|
||||
this.pageSliderPage5.TabIndex = 7;
|
||||
//
|
||||
// cbPieOverlay
|
||||
//
|
||||
this.cbPieOverlay.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieOverlay.AutoSize = true;
|
||||
this.cbPieOverlay.Image = ((System.Drawing.Image)(resources.GetObject("cbPieOverlay.Image")));
|
||||
this.cbPieOverlay.Location = new System.Drawing.Point(178, 184);
|
||||
this.cbPieOverlay.Name = "cbPieOverlay";
|
||||
this.cbPieOverlay.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieOverlay.TabIndex = 16;
|
||||
this.cbPieOverlay.Text = "PieChart - Series Overlay";
|
||||
this.cbPieOverlay.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieOverlay.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieOverlay.UseVisualStyleBackColor = true;
|
||||
this.cbPieOverlay.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbPieGridAngle
|
||||
//
|
||||
this.cbPieGridAngle.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieGridAngle.AutoSize = true;
|
||||
this.cbPieGridAngle.Image = ((System.Drawing.Image)(resources.GetObject("cbPieGridAngle.Image")));
|
||||
this.cbPieGridAngle.Location = new System.Drawing.Point(178, 5);
|
||||
this.cbPieGridAngle.Name = "cbPieGridAngle";
|
||||
this.cbPieGridAngle.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieGridAngle.TabIndex = 15;
|
||||
this.cbPieGridAngle.Text = "PieChart - Angle Margin";
|
||||
this.cbPieGridAngle.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieGridAngle.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieGridAngle.UseVisualStyleBackColor = true;
|
||||
this.cbPieGridAngle.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbPieShowSingleRing
|
||||
//
|
||||
this.cbPieShowSingleRing.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieShowSingleRing.AutoSize = true;
|
||||
this.cbPieShowSingleRing.Image = ((System.Drawing.Image)(resources.GetObject("cbPieShowSingleRing.Image")));
|
||||
this.cbPieShowSingleRing.Location = new System.Drawing.Point(6, 184);
|
||||
this.cbPieShowSingleRing.Name = "cbPieShowSingleRing";
|
||||
this.cbPieShowSingleRing.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieShowSingleRing.TabIndex = 13;
|
||||
this.cbPieShowSingleRing.Text = "Multi Ring, Single Display";
|
||||
this.cbPieShowSingleRing.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieShowSingleRing.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieShowSingleRing.UseVisualStyleBackColor = true;
|
||||
this.cbPieShowSingleRing.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// cbPieMultiSeries
|
||||
//
|
||||
this.cbPieMultiSeries.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.cbPieMultiSeries.AutoSize = true;
|
||||
this.cbPieMultiSeries.Image = ((System.Drawing.Image)(resources.GetObject("cbPieMultiSeries.Image")));
|
||||
this.cbPieMultiSeries.Location = new System.Drawing.Point(6, 5);
|
||||
this.cbPieMultiSeries.Name = "cbPieMultiSeries";
|
||||
this.cbPieMultiSeries.Size = new System.Drawing.Size(166, 173);
|
||||
this.cbPieMultiSeries.TabIndex = 12;
|
||||
this.cbPieMultiSeries.Text = "Multi Series";
|
||||
this.cbPieMultiSeries.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.cbPieMultiSeries.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.cbPieMultiSeries.UseVisualStyleBackColor = true;
|
||||
this.cbPieMultiSeries.Click += new System.EventHandler(this.CbClicked);
|
||||
//
|
||||
// ChartStyleDialog
|
||||
//
|
||||
this.AcceptButton = this.btnOk;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(648, 500);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.pageSlider1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.btnOk);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ChartStyleDialog";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Initial Chart Style";
|
||||
this.pageSlider1.ResumeLayout(false);
|
||||
this.pageSliderPage1.ResumeLayout(false);
|
||||
this.pageSliderPage1.PerformLayout();
|
||||
this.pageSliderPage2.ResumeLayout(false);
|
||||
this.pageSliderPage2.PerformLayout();
|
||||
this.pageSliderPage3.ResumeLayout(false);
|
||||
this.pageSliderPage3.PerformLayout();
|
||||
this.pageSliderPage4.ResumeLayout(false);
|
||||
this.pageSliderPage4.PerformLayout();
|
||||
this.pageSliderPage5.ResumeLayout(false);
|
||||
this.pageSliderPage5.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.CheckBox cbLinePlot;
|
||||
private System.Windows.Forms.CheckBox cbPointPlot;
|
||||
private System.Windows.Forms.Button btnOk;
|
||||
private System.Windows.Forms.CheckBox cbBlankChart;
|
||||
private System.Windows.Forms.CheckBox cbMultiAxis;
|
||||
private System.Windows.Forms.CheckBox cbMultiChart;
|
||||
private System.Windows.Forms.CheckBox cbHDotPlot;
|
||||
private System.Windows.Forms.CheckBox cbVDotPlot;
|
||||
private System.Windows.Forms.CheckBox cbBubblePlot;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private DotNetBar.Controls.PageSlider pageSlider1;
|
||||
private DotNetBar.Controls.PageSliderPage pageSliderPage1;
|
||||
private System.Windows.Forms.CheckBox cbStepLine;
|
||||
private DotNetBar.Controls.PageSliderPage pageSliderPage2;
|
||||
private System.Windows.Forms.CheckBox cbRangeBarV;
|
||||
private System.Windows.Forms.CheckBox cbBarH;
|
||||
private System.Windows.Forms.CheckBox cbBarV;
|
||||
private System.Windows.Forms.CheckBox cbLineArea;
|
||||
private System.Windows.Forms.CheckBox cbRangeBarH;
|
||||
private DotNetBar.Controls.PageSliderPage pageSliderPage3;
|
||||
private System.Windows.Forms.CheckBox cbHiLoHBox;
|
||||
private System.Windows.Forms.CheckBox cbHiLoVBox;
|
||||
private System.Windows.Forms.CheckBox cbHiLoHLine;
|
||||
private System.Windows.Forms.CheckBox cbHiLoVLine;
|
||||
private DotNetBar.Controls.PageSliderPage pageSliderPage4;
|
||||
private System.Windows.Forms.CheckBox cbPieSimple;
|
||||
private System.Windows.Forms.CheckBox cbPieMultiRing;
|
||||
private System.Windows.Forms.CheckBox cbPieExtentFill;
|
||||
private System.Windows.Forms.CheckBox cbPieExtent;
|
||||
private System.Windows.Forms.CheckBox cbPieDonut;
|
||||
private System.Windows.Forms.CheckBox cbPieMultiRingRev;
|
||||
private DotNetBar.Controls.PageSliderPage pageSliderPage5;
|
||||
private System.Windows.Forms.CheckBox cbPieShowSingleRing;
|
||||
private System.Windows.Forms.CheckBox cbPieMultiSeries;
|
||||
private System.Windows.Forms.CheckBox cbPieGridAngle;
|
||||
private System.Windows.Forms.CheckBox cbPieOverlay;
|
||||
}
|
||||
}
|
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public partial class ChartStyleDialog : Form
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private CheckBox _CheckedBox;
|
||||
private DateTime _LastClick;
|
||||
|
||||
#endregion
|
||||
|
||||
public ChartStyleDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_CheckedBox = cbPointPlot;
|
||||
}
|
||||
|
||||
#region Public properties
|
||||
|
||||
public string CbSelected
|
||||
{
|
||||
get { return (_CheckedBox.Name); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CbClicked
|
||||
|
||||
private void CbClicked(object sender, EventArgs e)
|
||||
{
|
||||
CheckBox cb = sender as CheckBox;
|
||||
|
||||
if (cb != null)
|
||||
{
|
||||
if (_CheckedBox != cb)
|
||||
{
|
||||
_CheckedBox.Checked = false;
|
||||
|
||||
_CheckedBox = cb;
|
||||
_CheckedBox.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
TimeSpan ts = DateTime.Now - _LastClick;
|
||||
|
||||
if (ts.TotalMilliseconds < SystemInformation.DoubleClickTime)
|
||||
btnOk.PerformClick();
|
||||
}
|
||||
}
|
||||
|
||||
_LastClick = DateTime.Now;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class ChartTitleCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private ChartContainer _Container;
|
||||
|
||||
#endregion
|
||||
|
||||
public ChartTitleCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_Container = context.Instance as ChartContainer;
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
if (itemType == typeof(ChartTitle))
|
||||
{
|
||||
ChartTitle title = (ChartTitle)base.CreateInstance(itemType);
|
||||
|
||||
title.Name = _Container.Titles.GetUniqueName();
|
||||
|
||||
return (title);
|
||||
}
|
||||
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ChartTitle title = ChartItem as ChartTitle;
|
||||
|
||||
if (title != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
ChartControlDesigner ccd = GetDesigner(_Container.ChartControl);
|
||||
|
||||
ccd.InCopyItem = true;
|
||||
|
||||
try
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
ChartTitleCollection ctc = _Container.Titles;
|
||||
ChartTitle clone = ctc[ctc.Count - 1];
|
||||
|
||||
string name = clone.Name;
|
||||
title.CopyTo(clone);
|
||||
clone.Name = name;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ccd.InCopyItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(ChartTitle);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class DataLabelCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private ChartSeries _ChartSeries;
|
||||
|
||||
#endregion
|
||||
|
||||
public DataLabelCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_ChartSeries = context.Instance as ChartSeries;
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
if (itemType == typeof(DataLabel))
|
||||
{
|
||||
DataLabel label = (DataLabel)base.CreateInstance(itemType);
|
||||
|
||||
label.Name = _ChartSeries.DataLabels.GetUniqueName();
|
||||
|
||||
return (label);
|
||||
}
|
||||
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLabel item = ChartItem as DataLabel;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
ChartControlDesigner ccd = GetDesigner(_ChartSeries.ChartControl);
|
||||
|
||||
ccd.InCopyItem = true;
|
||||
|
||||
try
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
DataLabelCollection dlc = _ChartSeries.DataLabels;
|
||||
DataLabel clone = dlc[dlc.Count - 1];
|
||||
|
||||
string name = clone.Name;
|
||||
item.CopyTo(clone);
|
||||
clone.Name = name;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ccd.InCopyItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(DataLabel);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,214 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CBBE8B3E-A0DD-4CE7-9E42-AB7AB387E277}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DevComponents.Charts.Design</RootNamespace>
|
||||
<AssemblyName>DevComponents.Charts.Design</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>ChartControlDesignTime.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="ChartControlDesignTime.snk" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="LabeledTextBoxX.resx">
|
||||
<DependentUpon>LabeledTextBoxX.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="LocationDropDown.resx">
|
||||
<DependentUpon>LocationDropDown.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PivotPointDropDown.resx">
|
||||
<DependentUpon>PivotPointDropDown.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="RangeValueDropDown.resx">
|
||||
<DependentUpon>RangeValueDropDown.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SeriesPointValueDropDown.resx">
|
||||
<DependentUpon>SeriesPointValueDropDown.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ChartStyleDialog.resx">
|
||||
<DependentUpon>ChartStyleDialog.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Copy.png" />
|
||||
<EmbeddedResource Include="SizeDropDown.resx">
|
||||
<DependentUpon>SizeDropDown.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="AxisReferenceCollectionEditor.cs" />
|
||||
<Compile Include="IndicatorCollectionEditor.cs" />
|
||||
<Compile Include="DataLabelCollectionEditor.cs" />
|
||||
<Compile Include="ChartAxesCollectionEditor.cs" />
|
||||
<Compile Include="AxisStripeCollectionEditor.cs" />
|
||||
<Compile Include="BaseCollectionEditor.cs" />
|
||||
<Compile Include="LocationDropDown.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LocationDropDown.Designer.cs">
|
||||
<DependentUpon>LocationDropDown.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LocationEditor.cs" />
|
||||
<Compile Include="PieReferenceCollectionEditor.cs" />
|
||||
<Compile Include="PieSeriesPointCollectionEditor.cs" />
|
||||
<Compile Include="PivotPointDropDown.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PivotPointDropDown.Designer.cs">
|
||||
<DependentUpon>PivotPointDropDown.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PivotPointEditor.cs" />
|
||||
<Compile Include="PointValueConverter.cs" />
|
||||
<Compile Include="RangeValueDropDown.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RangeValueDropDown.Designer.cs">
|
||||
<DependentUpon>RangeValueDropDown.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RangeValueEditor.cs" />
|
||||
<Compile Include="SeriesPointCollectionEditor.cs" />
|
||||
<Compile Include="ChartTitleCollectionEditor.cs" />
|
||||
<Compile Include="ChartSeriesCollectionEditor.cs" />
|
||||
<Compile Include="AxisListTypeEditor.cs" />
|
||||
<Compile Include="FlagsEnumEditor.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LabeledTextBoxX.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LabeledTextBoxX.Designer.cs">
|
||||
<DependentUpon>LabeledTextBoxX.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SeriesPointValueDropDown.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SeriesPointValueDropDown.Designer.cs">
|
||||
<DependentUpon>SeriesPointValueDropDown.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SeriesPointValueEditor.cs" />
|
||||
<Compile Include="ChartControlActionList.cs" />
|
||||
<Compile Include="ChartControlDesigner.cs" />
|
||||
<Compile Include="ChartContainerCollectionEditor.cs" />
|
||||
<Compile Include="ChartStyleDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ChartStyleDialog.Designer.cs">
|
||||
<DependentUpon>ChartStyleDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SizeDropDown.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SizeDropDown.Designer.cs">
|
||||
<DependentUpon>SizeDropDown.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SizeEditor.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.XML" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DevComponents.DotNetBar.Charts\DevComponents.DotNetBar.Charts.csproj">
|
||||
<Project>{2af9ba7a-2d05-419e-9f49-0ccef791947e}</Project>
|
||||
<Name>DevComponents.DotNetBar.Charts</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\DotNetBar.csproj">
|
||||
<Project>{36546ce3-335c-4ab6-a2f3-40f8c818bc66}</Project>
|
||||
<Name>DotNetBar</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@@ -0,0 +1,210 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Design;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
#region FlagsEnumUIEditor
|
||||
|
||||
public class FlagsEnumUIEditor : UITypeEditor
|
||||
{
|
||||
private FlagsCheckedListBox _FlagCb;
|
||||
|
||||
public FlagsEnumUIEditor()
|
||||
{
|
||||
_FlagCb = new FlagsCheckedListBox();
|
||||
}
|
||||
|
||||
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
|
||||
{
|
||||
return (UITypeEditorEditStyle.DropDown);
|
||||
}
|
||||
|
||||
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
if (context != null && context.Instance != null && provider != null)
|
||||
{
|
||||
IWindowsFormsEditorService edSvc =
|
||||
(IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
|
||||
|
||||
if (edSvc != null)
|
||||
{
|
||||
Enum e = (Enum)Convert.ChangeType(value, context.PropertyDescriptor.PropertyType);
|
||||
|
||||
_FlagCb.Value = e;
|
||||
edSvc.DropDownControl(_FlagCb);
|
||||
|
||||
return (_FlagCb.Value);
|
||||
}
|
||||
}
|
||||
|
||||
return (base.EditValue(provider, value));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public class FlagsCheckedListBox : CheckedListBox
|
||||
{
|
||||
private Type _Type;
|
||||
private Enum _Value;
|
||||
private bool _UpdatingStates;
|
||||
|
||||
public FlagsCheckedListBox()
|
||||
{
|
||||
CheckOnClick = true;
|
||||
BorderStyle = BorderStyle.None;
|
||||
}
|
||||
|
||||
#region Public properties
|
||||
|
||||
#region Value
|
||||
|
||||
public Enum Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return (_Value);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_Value = value;
|
||||
_Type = value.GetType();
|
||||
|
||||
InitializeCheckedListBox();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region InitializeCheckedListBox
|
||||
|
||||
private void InitializeCheckedListBox()
|
||||
{
|
||||
Items.Clear();
|
||||
|
||||
foreach (string name in Enum.GetNames(_Type))
|
||||
{
|
||||
object o = Enum.Parse(_Type, name);
|
||||
uint value = (uint)Convert.ChangeType(o, typeof(uint));
|
||||
|
||||
FlagsCheckedListBoxItem item = new FlagsCheckedListBoxItem(value, name);
|
||||
|
||||
Items.Add(item);
|
||||
}
|
||||
|
||||
SetCheckedItems();
|
||||
}
|
||||
|
||||
#region OnItemCheck
|
||||
|
||||
protected override void OnItemCheck(ItemCheckEventArgs e)
|
||||
{
|
||||
base.OnItemCheck(e);
|
||||
|
||||
if (_UpdatingStates == false)
|
||||
{
|
||||
FlagsCheckedListBoxItem item = Items[e.Index] as FlagsCheckedListBoxItem;
|
||||
|
||||
uint sum;
|
||||
|
||||
if (e.NewValue == CheckState.Checked &&
|
||||
(item.Value == 0 || item.Text.Equals("None")))
|
||||
{
|
||||
sum = item.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum = CalculateCheckedSum();
|
||||
|
||||
if (e.NewValue == CheckState.Checked)
|
||||
sum += item.Value;
|
||||
else
|
||||
sum -= item.Value;
|
||||
}
|
||||
|
||||
_Value = (Enum)(Enum.ToObject(_Type, sum));
|
||||
|
||||
SetCheckedItems();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SetCheckedItems
|
||||
|
||||
private void SetCheckedItems()
|
||||
{
|
||||
_UpdatingStates = true;
|
||||
|
||||
int value = (int)Convert.ChangeType(_Value, typeof(int));
|
||||
|
||||
for (int i = 0; i < Items.Count; i++)
|
||||
{
|
||||
FlagsCheckedListBoxItem item = Items[i] as FlagsCheckedListBoxItem;
|
||||
|
||||
if (item.Value == 0)
|
||||
SetItemChecked(i, value == 0);
|
||||
|
||||
else if (item.Text.Equals("None"))
|
||||
SetItemChecked(i, value == item.Value);
|
||||
|
||||
else
|
||||
SetItemChecked(i, ((item.Value & value) == item.Value));
|
||||
}
|
||||
|
||||
_UpdatingStates = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region CalculateCheckedSum
|
||||
|
||||
private uint CalculateCheckedSum()
|
||||
{
|
||||
uint sum = 0;
|
||||
|
||||
for (int i = 0; i < Items.Count; i++)
|
||||
{
|
||||
FlagsCheckedListBoxItem item = Items[i] as FlagsCheckedListBoxItem;
|
||||
|
||||
if (GetItemChecked(i))
|
||||
sum |= item.Value;
|
||||
}
|
||||
|
||||
return (sum);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region FlagsCheckedListBoxItem
|
||||
|
||||
public class FlagsCheckedListBoxItem
|
||||
{
|
||||
public uint Value;
|
||||
public string Text;
|
||||
|
||||
public FlagsCheckedListBoxItem(uint value, string text)
|
||||
{
|
||||
Value = value;
|
||||
Text = text;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return (Text);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
@@ -0,0 +1,128 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Reflection;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class IndicatorCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private ChartSeries _ChartSeries;
|
||||
|
||||
#endregion
|
||||
|
||||
public IndicatorCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_ChartSeries = context.Instance as ChartSeries;
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
if (itemType == typeof(RegressionLine))
|
||||
{
|
||||
RegressionLine regLine = (RegressionLine)base.CreateInstance(itemType);
|
||||
|
||||
if (_ChartSeries != null)
|
||||
regLine.Name = _ChartSeries.ChartIndicators.GetUniqueName("RegLine");
|
||||
|
||||
return (regLine);
|
||||
}
|
||||
|
||||
if (itemType == typeof(TrendLine))
|
||||
{
|
||||
TrendLine trendLine = (TrendLine)base.CreateInstance(itemType);
|
||||
|
||||
if (_ChartSeries != null)
|
||||
trendLine.Name = _ChartSeries.ChartIndicators.GetUniqueName("TrendLine");
|
||||
|
||||
return (trendLine);
|
||||
}
|
||||
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ChartIndicator item = ChartItem as ChartIndicator;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
ChartControlDesigner ccd = GetDesigner(_ChartSeries.ChartControl);
|
||||
ChartIndicatorCollection cic = _ChartSeries.ChartIndicators;
|
||||
|
||||
ccd.InCopyItem = true;
|
||||
|
||||
if (item is RegressionLine)
|
||||
_ItemTypes[0] = typeof(RegressionLine);
|
||||
|
||||
try
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
ChartIndicator clone = (ChartIndicator)cic[cic.Count - 1];
|
||||
|
||||
string name = clone.Name;
|
||||
item.CopyTo(clone);
|
||||
clone.Name = name;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (item is RegressionLine)
|
||||
_ItemTypes[0] = typeof(TrendLine);
|
||||
|
||||
ccd.InCopyItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(ChartIndicator);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateNewItemTypes
|
||||
|
||||
private Type[] _ItemTypes = new Type[]
|
||||
{
|
||||
typeof(TrendLine),
|
||||
typeof(RegressionLine),
|
||||
};
|
||||
|
||||
protected override Type[] CreateNewItemTypes()
|
||||
{
|
||||
return (_ItemTypes);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
92
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/LabeledTextBoxX.Designer.cs
generated
Normal file
92
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/LabeledTextBoxX.Designer.cs
generated
Normal file
@@ -0,0 +1,92 @@
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
partial class LabeledTextBoxX
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.lbIndex = new DevComponents.DotNetBar.LabelX();
|
||||
this.tbValue = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lbIndex
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.lbIndex.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.lbIndex.ForeColor = System.Drawing.Color.DimGray;
|
||||
this.lbIndex.Location = new System.Drawing.Point(3, 4);
|
||||
this.lbIndex.Name = "lbIndex";
|
||||
this.lbIndex.Size = new System.Drawing.Size(8, 13);
|
||||
this.lbIndex.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP;
|
||||
this.lbIndex.TabIndex = 1;
|
||||
this.lbIndex.Text = "3";
|
||||
this.lbIndex.TextAlignment = System.Drawing.StringAlignment.Far;
|
||||
//
|
||||
// tbValue
|
||||
//
|
||||
this.tbValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
this.tbValue.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Etched;
|
||||
this.tbValue.Border.BorderColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.tbValue.Border.BorderColor2 = System.Drawing.SystemColors.ControlLight;
|
||||
this.tbValue.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Etched;
|
||||
this.tbValue.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Etched;
|
||||
this.tbValue.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Etched;
|
||||
this.tbValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.tbValue.Border.PaddingBottom = 2;
|
||||
this.tbValue.Border.PaddingLeft = 3;
|
||||
this.tbValue.Border.PaddingRight = 2;
|
||||
this.tbValue.Border.PaddingTop = 2;
|
||||
this.tbValue.Location = new System.Drawing.Point(17, 0);
|
||||
this.tbValue.Name = "tbValue";
|
||||
this.tbValue.PreventEnterBeep = true;
|
||||
this.tbValue.Size = new System.Drawing.Size(54, 18);
|
||||
this.tbValue.TabIndex = 2;
|
||||
this.tbValue.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.tbValue_PreviewKeyDown);
|
||||
//
|
||||
// LabeledTextBoxX
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.Controls.Add(this.tbValue);
|
||||
this.Controls.Add(this.lbIndex);
|
||||
this.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.Name = "LabeledTextBoxX";
|
||||
this.Size = new System.Drawing.Size(72, 19);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
internal DotNetBar.LabelX lbIndex;
|
||||
internal DotNetBar.Controls.TextBoxX tbValue;
|
||||
}
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public partial class LabeledTextBoxX : UserControl
|
||||
{
|
||||
#region EscapeKeyPressed
|
||||
|
||||
public event EventHandler<EventArgs> EscapeKeyPressed;
|
||||
|
||||
#endregion
|
||||
|
||||
public LabeledTextBoxX()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#region tbValue_PreviewKeyDown
|
||||
|
||||
private void tbValue_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
if (EscapeKeyPressed != null)
|
||||
EscapeKeyPressed(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
48
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/LocationDropDown.Designer.cs
generated
Normal file
48
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/LocationDropDown.Designer.cs
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
partial class LocationDropDown
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PivotPointDropDown
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Name = "PivotPointDropDown";
|
||||
this.Size = new System.Drawing.Size(99, 110);
|
||||
this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.PivotPointDropDown_PreviewKeyDown);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,248 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public partial class LocationDropDown : UserControl
|
||||
{
|
||||
#region Constants
|
||||
|
||||
private const int DotRadius = 4;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private variables
|
||||
|
||||
private PointF _PivotPoint;
|
||||
private Rectangle _DotBounds;
|
||||
private Rectangle _FrameBounds;
|
||||
|
||||
private Point _Center;
|
||||
|
||||
private bool _InFrame;
|
||||
private bool _InPivotDot;
|
||||
private bool _PivotMoving;
|
||||
|
||||
private bool _EscapePressed;
|
||||
|
||||
private IWindowsFormsEditorService _EditorService;
|
||||
private ITypeDescriptorContext _Context;
|
||||
|
||||
#endregion
|
||||
|
||||
public LocationDropDown(PointF value,
|
||||
IWindowsFormsEditorService editorService, ITypeDescriptorContext context)
|
||||
{
|
||||
Initialize();
|
||||
|
||||
_EditorService = editorService;
|
||||
_Context = context;
|
||||
|
||||
PivotPoint = value;
|
||||
}
|
||||
|
||||
public LocationDropDown()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
#region Initialize
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SetStyle(ControlStyles.UserPaint, true);
|
||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public properties
|
||||
|
||||
#region EditorService
|
||||
|
||||
public IWindowsFormsEditorService EditorService
|
||||
{
|
||||
get { return (_EditorService); }
|
||||
set { _EditorService = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EscapePressed
|
||||
|
||||
public bool EscapePressed
|
||||
{
|
||||
get { return (_EscapePressed); }
|
||||
set { _EscapePressed = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PivotPoint
|
||||
|
||||
public PointF PivotPoint
|
||||
{
|
||||
get { return (_PivotPoint); }
|
||||
|
||||
set
|
||||
{
|
||||
_PivotPoint = value;
|
||||
|
||||
RecalcLayout();
|
||||
Invalidate();
|
||||
|
||||
_Context.OnComponentChanging();
|
||||
_Context.PropertyDescriptor.SetValue(_Context.Instance, value);
|
||||
_Context.OnComponentChanged();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region RecalcLayout
|
||||
|
||||
private void RecalcLayout()
|
||||
{
|
||||
int n = Math.Min(Bounds.Width - 4, Bounds.Height - 4);
|
||||
|
||||
_FrameBounds = new Rectangle(2, 2, n, n);
|
||||
_FrameBounds.X = (Bounds.Width - n) / 2;
|
||||
_FrameBounds.Y = (Bounds.Height - n) / 2;
|
||||
|
||||
int x = _FrameBounds.X + (int)(_PivotPoint.X * _FrameBounds.Width);
|
||||
int y = _FrameBounds.Y + (int)(_PivotPoint.Y * _FrameBounds.Height);
|
||||
|
||||
_DotBounds = new Rectangle(x - DotRadius, y - DotRadius,
|
||||
DotRadius * 2, DotRadius * 2);
|
||||
|
||||
_Center = new Point(_FrameBounds.X + _FrameBounds.Width / 2,
|
||||
_FrameBounds.Y + _FrameBounds.Height / 2);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Paint support
|
||||
|
||||
#region OnPaint
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
|
||||
RecalcLayout();
|
||||
|
||||
g.DrawLine(Pens.Red, new Point(_FrameBounds.X, _Center.Y),
|
||||
new Point(_FrameBounds.Right, _Center.Y));
|
||||
|
||||
g.DrawLine(Pens.Red, new Point(_Center.X, _FrameBounds.Y),
|
||||
new Point(_Center.X, _FrameBounds.Bottom));
|
||||
|
||||
DrawPivotDot(g);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DrawPivotDot
|
||||
|
||||
private void DrawPivotDot(Graphics g)
|
||||
{
|
||||
g.FillEllipse(Brushes.SkyBlue, _DotBounds);
|
||||
g.DrawEllipse(Pens.DimGray, _DotBounds);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mouse support
|
||||
|
||||
#region OnMouseMove
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
|
||||
_InFrame = (_FrameBounds.Contains(e.Location) == true);
|
||||
|
||||
if (_PivotMoving == true && _InFrame == true)
|
||||
{
|
||||
PivotPoint = new PointF(
|
||||
(float)(e.X - _FrameBounds.X) / _FrameBounds.Width,
|
||||
(float)(e.Y - _FrameBounds.Y) / _FrameBounds.Height);
|
||||
}
|
||||
|
||||
_InPivotDot = (_DotBounds.Contains(e.Location) == true);
|
||||
|
||||
Cursor = (_InPivotDot == true) ? Cursors.Hand : Cursors.Default;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnMouseLeave
|
||||
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
base.OnMouseLeave(e);
|
||||
|
||||
_InFrame = false;
|
||||
_InPivotDot = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnMouseDown
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
if (_InPivotDot == true)
|
||||
_PivotMoving = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnMouseUp
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseUp(e);
|
||||
|
||||
_PivotMoving = false;
|
||||
|
||||
_InFrame = (_FrameBounds.Contains(e.Location) == true);
|
||||
_InPivotDot = (_DotBounds.Contains(e.Location) == true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region PivotPointDropDown_PreviewKeyDown
|
||||
|
||||
private void PivotPointDropDown_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
_EscapePressed = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class LocationEditor : UITypeEditor
|
||||
{
|
||||
#region GetEditStyle
|
||||
|
||||
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
|
||||
{
|
||||
return (UITypeEditorEditStyle.DropDown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetPaintValueSupported
|
||||
|
||||
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return (false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
if (provider != null)
|
||||
{
|
||||
IWindowsFormsEditorService editorService =
|
||||
provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
|
||||
|
||||
if (editorService != null)
|
||||
{
|
||||
LocationDropDown pv = new LocationDropDown((PointF)value, editorService, context);
|
||||
|
||||
pv.EscapePressed = false;
|
||||
|
||||
editorService.DropDownControl(pv);
|
||||
|
||||
if (pv.EscapePressed == true)
|
||||
context.PropertyDescriptor.SetValue(context.Instance, value);
|
||||
else
|
||||
return (pv.PivotPoint);
|
||||
}
|
||||
}
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class PieReferenceCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private SliceVisualLayout _SliceLayout;
|
||||
|
||||
#endregion
|
||||
|
||||
public PieReferenceCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_SliceLayout = context.Instance as SliceVisualLayout;
|
||||
|
||||
IComponentChangeService cs = BeforeEditValue(context);
|
||||
|
||||
object retval = value;
|
||||
|
||||
try
|
||||
{
|
||||
retval = base.EditValue(context, provider, value);
|
||||
}
|
||||
finally
|
||||
{
|
||||
AfterEditValue(context, cs);
|
||||
}
|
||||
|
||||
return (retval);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
if (itemType == typeof(PieReferenceLine))
|
||||
{
|
||||
PieReferenceLine line = (PieReferenceLine)base.CreateInstance(itemType);
|
||||
|
||||
line.Name = _SliceLayout.ReferenceLines.GetUniqueName();
|
||||
|
||||
return (line);
|
||||
}
|
||||
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
PieReferenceLine item = ChartItem as PieReferenceLine;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
ChartVisualElement cve = _SliceLayout.Parent as ChartVisualElement;
|
||||
|
||||
ChartControlDesigner ccd = (cve != null) ? GetDesigner(cve.ChartControl) : null;
|
||||
|
||||
if (ccd != null)
|
||||
ccd.InCopyItem = true;
|
||||
|
||||
try
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
PieReferenceLineCollection rlc = _SliceLayout.ReferenceLines;
|
||||
PieReferenceLine clone = rlc[rlc.Count - 1];
|
||||
|
||||
string name = clone.Name;
|
||||
item.CopyTo(clone);
|
||||
clone.Name = name;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (ccd != null)
|
||||
ccd.InCopyItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(PieReferenceLine);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Design;
|
||||
using DevComponents.DotNetBar;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class PieSeriesPointCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private PieSeries _PieSeries;
|
||||
|
||||
#endregion
|
||||
|
||||
public PieSeriesPointCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_PieSeries = context.Instance as PieSeries;
|
||||
|
||||
if (_PieSeries == null)
|
||||
{
|
||||
PieSeriesPoint psp = context.Instance as PieSeriesPoint;
|
||||
|
||||
if (psp != null)
|
||||
_PieSeries = psp.ChartSeries;
|
||||
}
|
||||
|
||||
if (_PieSeries != null)
|
||||
return (base.EditValue(context, provider, value));
|
||||
|
||||
return (value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
PieSeriesPoint item = ChartItem as PieSeriesPoint;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
ChartControlDesigner ccd = GetDesigner(_PieSeries.ChartControl);
|
||||
|
||||
ccd.InCopyItem = true;
|
||||
|
||||
try
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
PieSeriesPointCollection spc = item.Parent as PieSeriesPointCollection;
|
||||
PieSeriesPoint clone = spc[spc.Count - 1];
|
||||
|
||||
item.CopyTo(clone);
|
||||
}
|
||||
finally
|
||||
{
|
||||
ccd.InCopyItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(PieSeriesPoint);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
48
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/PivotPointDropDown.Designer.cs
generated
Normal file
48
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/PivotPointDropDown.Designer.cs
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
partial class PivotPointDropDown
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PivotPointDropDown
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Name = "PivotPointDropDown";
|
||||
this.Size = new System.Drawing.Size(99, 110);
|
||||
this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.PivotPointDropDown_PreviewKeyDown);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,332 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public partial class PivotPointDropDown : UserControl
|
||||
{
|
||||
#region Constants
|
||||
|
||||
private const int DotRadius = 4;
|
||||
private const int ScaleWidth = 3;
|
||||
private const float BevelInside = .035f;
|
||||
private const float BevelOutside = .05f;
|
||||
private const float RoundRectangleArc = .125f;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private variables
|
||||
|
||||
private PointF _PivotPoint;
|
||||
private Rectangle _DotBounds;
|
||||
private Rectangle _FrameBounds;
|
||||
private Rectangle _ScaleBounds;
|
||||
|
||||
private double _ScaleRadius;
|
||||
private double _StartAngle;
|
||||
private double _SweepAngle;
|
||||
|
||||
private bool _InFrame;
|
||||
private bool _InPivotDot;
|
||||
private bool _PivotMoving;
|
||||
|
||||
private bool _EscapePressed;
|
||||
|
||||
private IWindowsFormsEditorService _EditorService;
|
||||
private ITypeDescriptorContext _Context;
|
||||
|
||||
#endregion
|
||||
|
||||
public PivotPointDropDown(PointF value,
|
||||
double scaleRadius, double startAngle, double sweepAngle,
|
||||
IWindowsFormsEditorService editorService, ITypeDescriptorContext context)
|
||||
{
|
||||
_ScaleRadius = scaleRadius;
|
||||
_StartAngle = startAngle;
|
||||
_SweepAngle = sweepAngle;
|
||||
|
||||
_ScaleRadius = Math.Max(_ScaleRadius, .07f);
|
||||
|
||||
Initialize();
|
||||
|
||||
_EditorService = editorService;
|
||||
_Context = context;
|
||||
|
||||
PivotPoint = value;
|
||||
}
|
||||
|
||||
public PivotPointDropDown()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
#region Initialize
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SetStyle(ControlStyles.UserPaint, true);
|
||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public properties
|
||||
|
||||
#region EditorService
|
||||
|
||||
public IWindowsFormsEditorService EditorService
|
||||
{
|
||||
get { return (_EditorService); }
|
||||
set { _EditorService = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EscapePressed
|
||||
|
||||
public bool EscapePressed
|
||||
{
|
||||
get { return (_EscapePressed); }
|
||||
set { _EscapePressed = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PivotPoint
|
||||
|
||||
public PointF PivotPoint
|
||||
{
|
||||
get { return (_PivotPoint); }
|
||||
|
||||
set
|
||||
{
|
||||
_PivotPoint = value;
|
||||
|
||||
RecalcLayout();
|
||||
Invalidate();
|
||||
|
||||
_Context.OnComponentChanging();
|
||||
_Context.PropertyDescriptor.SetValue(_Context.Instance, value);
|
||||
_Context.OnComponentChanged();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region RecalcLayout
|
||||
|
||||
private void RecalcLayout()
|
||||
{
|
||||
int n = Math.Min(Bounds.Width - 4, Bounds.Height - 4);
|
||||
|
||||
_FrameBounds = new Rectangle(2, 2, n, n);
|
||||
_FrameBounds.X = (Bounds.Width - n) / 2;
|
||||
_FrameBounds.Y = (Bounds.Height - n) / 2;
|
||||
|
||||
int radius = (int)(n * _ScaleRadius);
|
||||
int n2 = n / 2;
|
||||
|
||||
_ScaleBounds.Width = radius * 2;
|
||||
_ScaleBounds.Height = radius * 2;
|
||||
|
||||
int x = _FrameBounds.X + (int)(_PivotPoint.X * _FrameBounds.Width + n2);
|
||||
int y = _FrameBounds.Y + (int)(_PivotPoint.Y * _FrameBounds.Height + n2);
|
||||
|
||||
_ScaleBounds.X = x - radius;
|
||||
_ScaleBounds.Y = y - radius;
|
||||
|
||||
_DotBounds = new Rectangle(x - DotRadius, y - DotRadius, DotRadius * 2, DotRadius * 2);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Paint support
|
||||
|
||||
#region OnPaint
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
|
||||
RecalcLayout();
|
||||
|
||||
DrawFrame(g);
|
||||
DrawScale(g);
|
||||
DrawPivotDot(g);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DrawFrame
|
||||
|
||||
private void DrawFrame(Graphics g)
|
||||
{
|
||||
DrawBlankFrame(g);
|
||||
}
|
||||
|
||||
#region DrawBlankFrame
|
||||
|
||||
private void DrawBlankFrame(Graphics g)
|
||||
{
|
||||
using (Brush br = new SolidBrush(Color.LightGray))
|
||||
g.FillRectangle(br, _FrameBounds);
|
||||
|
||||
g.DrawRectangle(Pens.DimGray, _FrameBounds);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region DrawScale
|
||||
|
||||
private void DrawScale(Graphics g)
|
||||
{
|
||||
using (Brush br = new SolidBrush(Color.CornflowerBlue))
|
||||
{
|
||||
using (Pen pen = new Pen(br, ScaleWidth))
|
||||
g.DrawArc(pen, _ScaleBounds, (float)_StartAngle, (float)_SweepAngle);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DrawPivotDot
|
||||
|
||||
private void DrawPivotDot(Graphics g)
|
||||
{
|
||||
g.FillEllipse(Brushes.SkyBlue, _DotBounds);
|
||||
g.DrawEllipse(Pens.DimGray, _DotBounds);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mouse support
|
||||
|
||||
#region OnMouseMove
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
|
||||
_InFrame = (_FrameBounds.Contains(e.Location) == true);
|
||||
|
||||
if (_PivotMoving == true && _InFrame == true)
|
||||
{
|
||||
int n = Math.Min(Bounds.Width - 4, Bounds.Height - 4);
|
||||
int n2 = n / 2;
|
||||
|
||||
PivotPoint = new PointF(
|
||||
(float)(e.X - _FrameBounds.X - n2) / _FrameBounds.Width,
|
||||
(float)(e.Y - _FrameBounds.Y - n2) / _FrameBounds.Height);
|
||||
}
|
||||
|
||||
_InPivotDot = (_DotBounds.Contains(e.Location) == true);
|
||||
|
||||
Cursor = (_InPivotDot == true) ? Cursors.Hand : Cursors.Default;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnMouseLeave
|
||||
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
base.OnMouseLeave(e);
|
||||
|
||||
_InFrame = false;
|
||||
_InPivotDot = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnMouseDown
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
if (_InPivotDot == true)
|
||||
_PivotMoving = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnMouseUp
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseUp(e);
|
||||
|
||||
_PivotMoving = false;
|
||||
|
||||
_InFrame = (_FrameBounds.Contains(e.Location) == true);
|
||||
_InPivotDot = (_DotBounds.Contains(e.Location) == true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region PivotPointDropDown_PreviewKeyDown
|
||||
|
||||
private void PivotPointDropDown_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
PointF pt = PivotPoint;
|
||||
|
||||
int n = Math.Min(Bounds.Width - 4, Bounds.Height - 4) / 2;
|
||||
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.Escape:
|
||||
_EscapePressed = true;
|
||||
break;
|
||||
|
||||
case Keys.Home:
|
||||
PivotPoint = PointF.Empty;
|
||||
break;
|
||||
|
||||
case Keys.Left:
|
||||
pt.X -= (float)(_ScaleRadius / 20);
|
||||
PivotPoint = pt;
|
||||
break;
|
||||
|
||||
case Keys.Right:
|
||||
pt.X += (float)(_ScaleRadius / 20);
|
||||
PivotPoint = pt;
|
||||
break;
|
||||
|
||||
case Keys.Up:
|
||||
pt.Y -= (float)(_ScaleRadius / 20);
|
||||
PivotPoint = pt;
|
||||
break;
|
||||
|
||||
case Keys.Down:
|
||||
pt.Y += (float)(_ScaleRadius / 20);
|
||||
PivotPoint = pt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class PivotPointEditor : UITypeEditor
|
||||
{
|
||||
#region GetEditStyle
|
||||
|
||||
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
|
||||
{
|
||||
return (UITypeEditorEditStyle.DropDown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetPaintValueSupported
|
||||
|
||||
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return (false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
if (provider != null)
|
||||
{
|
||||
IWindowsFormsEditorService editorService =
|
||||
provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
|
||||
|
||||
if (editorService != null)
|
||||
{
|
||||
PieChart pieChart = context.Instance as PieChart;
|
||||
|
||||
if (pieChart != null)
|
||||
{
|
||||
double scale = pieChart.OuterRadius;
|
||||
|
||||
if (scale >= 1)
|
||||
{
|
||||
int n = Math.Min(pieChart.ContentBounds.Width, pieChart.ContentBounds.Height);
|
||||
scale = (n > 0) ? pieChart.ActualOuterRadius / n : 0;
|
||||
}
|
||||
|
||||
scale /= 2;
|
||||
|
||||
PivotPointDropDown pv = new PivotPointDropDown((PointF) value,
|
||||
scale, pieChart.SubSliceVisualLayout.StartAngle,
|
||||
pieChart.SubSliceVisualLayout.SweepAngle, editorService, context);
|
||||
|
||||
pv.EscapePressed = false;
|
||||
|
||||
editorService.DropDownControl(pv);
|
||||
|
||||
if (pv.EscapePressed == true)
|
||||
context.PropertyDescriptor.SetValue(context.Instance, value);
|
||||
else
|
||||
return (pv.PivotPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents PointValueConverter converter.
|
||||
/// </summary>
|
||||
public class PointValueConverter : TypeConverter
|
||||
{
|
||||
public PointValueConverter()
|
||||
{
|
||||
}
|
||||
|
||||
#region CanConvertTo
|
||||
|
||||
public override bool CanConvertFrom(
|
||||
ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
if (sourceType == typeof(string))
|
||||
return true;
|
||||
|
||||
return base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CanConvertTo
|
||||
|
||||
public override bool CanConvertTo(
|
||||
ITypeDescriptorContext context, Type destinationType)
|
||||
{
|
||||
if (destinationType == typeof(string))
|
||||
return true;
|
||||
|
||||
return base.CanConvertTo(context, destinationType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ConvertFrom
|
||||
|
||||
public override object ConvertFrom(
|
||||
ITypeDescriptorContext context, CultureInfo culture, object value)
|
||||
{
|
||||
if (value is string)
|
||||
return (GetConvertedValue((string)value));
|
||||
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
||||
#region GetConvertedValue
|
||||
|
||||
private object GetConvertedValue(string text)
|
||||
{
|
||||
string s = text.Trim();
|
||||
|
||||
if (text.Length == 0)
|
||||
return (null);
|
||||
|
||||
if (s.StartsWith("\"") && s.EndsWith("\""))
|
||||
return (s.Substring(1, s.Length - 2));
|
||||
|
||||
int intResult;
|
||||
|
||||
if (int.TryParse(text, out intResult) == true)
|
||||
return (intResult);
|
||||
|
||||
double dblResult;
|
||||
|
||||
if (double.TryParse(text, out dblResult) == true)
|
||||
return (dblResult);
|
||||
|
||||
DateTime dtResult;
|
||||
|
||||
if (DateTime.TryParse(text, out dtResult) == true)
|
||||
return (dtResult);
|
||||
|
||||
return (text);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region ConvertTo
|
||||
|
||||
public override object ConvertTo(
|
||||
ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
if (destinationType == typeof(string))
|
||||
{
|
||||
if (value == null)
|
||||
return ("<null>");
|
||||
|
||||
if (value is string)
|
||||
return ("\"" + value + "\"");
|
||||
|
||||
if (value is int)
|
||||
return (value.ToString());
|
||||
|
||||
if (value is DateTime)
|
||||
return (value.ToString());
|
||||
|
||||
return (String.Format("{0:0.0###############}", value));
|
||||
}
|
||||
}
|
||||
|
||||
return (string.Empty);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
73
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/Properties/Resources.Designer.cs
generated
Normal file
73
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34209
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DevComponents.Charts.Design.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DevComponents.Charts.Design.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Copy {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Copy", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
105
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/RangeValueDropDown.Designer.cs
generated
Normal file
105
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/RangeValueDropDown.Designer.cs
generated
Normal file
@@ -0,0 +1,105 @@
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
partial class RangeValueDropDown
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this._TrackBar = new System.Windows.Forms.TrackBar();
|
||||
this._LabelValue = new System.Windows.Forms.Label();
|
||||
this._LabelMin = new System.Windows.Forms.Label();
|
||||
this._LabelMax = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this._TrackBar)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// _TrackBar
|
||||
//
|
||||
this._TrackBar.AutoSize = false;
|
||||
this._TrackBar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this._TrackBar.Location = new System.Drawing.Point(0, 0);
|
||||
this._TrackBar.Name = "_TrackBar";
|
||||
this._TrackBar.Size = new System.Drawing.Size(186, 40);
|
||||
this._TrackBar.TabIndex = 0;
|
||||
this._TrackBar.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this._TrackBar_PreviewKeyDown);
|
||||
this._TrackBar.ValueChanged += new System.EventHandler(this.TrackBar_ValueChanged);
|
||||
//
|
||||
// _LabelValue
|
||||
//
|
||||
this._LabelValue.AutoEllipsis = true;
|
||||
this._LabelValue.Location = new System.Drawing.Point(59, 21);
|
||||
this._LabelValue.Name = "_LabelValue";
|
||||
this._LabelValue.Size = new System.Drawing.Size(69, 16);
|
||||
this._LabelValue.TabIndex = 1;
|
||||
this._LabelValue.Text = "Value";
|
||||
this._LabelValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// _LabelMin
|
||||
//
|
||||
this._LabelMin.AutoEllipsis = true;
|
||||
this._LabelMin.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this._LabelMin.Location = new System.Drawing.Point(3, 21);
|
||||
this._LabelMin.Name = "_LabelMin";
|
||||
this._LabelMin.Size = new System.Drawing.Size(50, 16);
|
||||
this._LabelMin.TabIndex = 2;
|
||||
this._LabelMin.Text = "Min";
|
||||
this._LabelMin.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
|
||||
//
|
||||
// _LabelMax
|
||||
//
|
||||
this._LabelMax.AutoEllipsis = true;
|
||||
this._LabelMax.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this._LabelMax.Location = new System.Drawing.Point(134, 21);
|
||||
this._LabelMax.Name = "_LabelMax";
|
||||
this._LabelMax.Size = new System.Drawing.Size(52, 16);
|
||||
this._LabelMax.TabIndex = 3;
|
||||
this._LabelMax.Text = "Max";
|
||||
this._LabelMax.TextAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
//
|
||||
// RangeValueDropDown
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this._LabelMax);
|
||||
this.Controls.Add(this._LabelMin);
|
||||
this.Controls.Add(this._LabelValue);
|
||||
this.Controls.Add(this._TrackBar);
|
||||
this.Name = "RangeValueDropDown";
|
||||
this.Size = new System.Drawing.Size(186, 40);
|
||||
((System.ComponentModel.ISupportInitialize)(this._TrackBar)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TrackBar _TrackBar;
|
||||
private System.Windows.Forms.Label _LabelValue;
|
||||
private System.Windows.Forms.Label _LabelMin;
|
||||
private System.Windows.Forms.Label _LabelMax;
|
||||
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public partial class RangeValueDropDown : UserControl
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private double _Value;
|
||||
private bool _EscapePressed;
|
||||
|
||||
private IWindowsFormsEditorService _EditorService;
|
||||
private ITypeDescriptorContext _Context;
|
||||
|
||||
#endregion
|
||||
|
||||
public RangeValueDropDown(double value, double minimum, double maximum,
|
||||
IWindowsFormsEditorService editorService, ITypeDescriptorContext context)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_EditorService = editorService;
|
||||
_Context = context;
|
||||
|
||||
if (double.IsNaN(value) == true)
|
||||
value = 0;
|
||||
|
||||
if (value < minimum)
|
||||
{
|
||||
if ((minimum * 1000 > Int16.MinValue) && (minimum * 1000 < Int16.MaxValue))
|
||||
minimum = value;
|
||||
}
|
||||
|
||||
if (value > maximum)
|
||||
{
|
||||
if ((maximum * 1000 > Int16.MinValue) && (maximum * 1000 < Int16.MaxValue))
|
||||
maximum = value;
|
||||
}
|
||||
|
||||
_TrackBar.Minimum = (int)(minimum * 1000);
|
||||
_TrackBar.Maximum = (int)(maximum * 1000);
|
||||
|
||||
_TrackBar.SmallChange = _TrackBar.Maximum / 100;
|
||||
_TrackBar.LargeChange = _TrackBar.Maximum / 10;
|
||||
_TrackBar.TickFrequency = _TrackBar.LargeChange;
|
||||
|
||||
_TrackBar.Value = (int)(value * 1000);
|
||||
|
||||
_LabelMin.Text = String.Format("{0:f}", minimum);
|
||||
_LabelMax.Text = String.Format("{0:f}", maximum);
|
||||
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public RangeValueDropDown()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#region DefaultSize
|
||||
|
||||
protected override Size DefaultSize
|
||||
{
|
||||
get { return new Size(186, 40); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public properties
|
||||
|
||||
#region EditorService
|
||||
|
||||
public IWindowsFormsEditorService EditorService
|
||||
{
|
||||
get { return (_EditorService); }
|
||||
set { _EditorService = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EscapePressed
|
||||
|
||||
public bool EscapePressed
|
||||
{
|
||||
get { return (_EscapePressed); }
|
||||
set { _EscapePressed = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Value
|
||||
|
||||
public double Value
|
||||
{
|
||||
get { return (_Value); }
|
||||
|
||||
set
|
||||
{
|
||||
_Value = value;
|
||||
|
||||
_LabelValue.Text = String.Format("{0:f3}", value);
|
||||
_LabelValue.Update();
|
||||
|
||||
object cvalue = Convert.ChangeType(value, _Context.PropertyDescriptor.PropertyType);
|
||||
|
||||
_Context.OnComponentChanging();
|
||||
_Context.PropertyDescriptor.SetValue(_Context.Instance, cvalue);
|
||||
_Context.OnComponentChanged();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnResize
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
|
||||
int width = _TrackBar.Width;
|
||||
|
||||
int dx = width / 3;
|
||||
|
||||
_LabelMin.Width = dx;
|
||||
_LabelMax.Width = dx;
|
||||
_LabelValue.Width = dx;
|
||||
|
||||
_LabelValue.Location = new Point((width - dx) / 2, _LabelValue.Location.Y);
|
||||
_LabelMax.Location = new Point(width - dx, _LabelMax.Location.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region _TrackBar_ValueChanged
|
||||
|
||||
private void TrackBar_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
Value = ((float)_TrackBar.Value) / 1000;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region _TrackBar_PreviewKeyDown
|
||||
|
||||
private void _TrackBar_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
_EscapePressed = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@@ -0,0 +1,225 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Design;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class RangeValueEditor : UITypeEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private const double MinValue = 0;
|
||||
private const double MaxValue = 1;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public properties
|
||||
|
||||
public virtual double Minimum
|
||||
{
|
||||
get { return (MinValue); }
|
||||
}
|
||||
|
||||
public virtual double Maximum
|
||||
{
|
||||
get { return (MaxValue); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetEditStyle
|
||||
|
||||
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
|
||||
{
|
||||
return (UITypeEditorEditStyle.DropDown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetPaintValueSupported
|
||||
|
||||
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return (false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
if (provider != null)
|
||||
{
|
||||
IWindowsFormsEditorService editorService =
|
||||
provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
|
||||
|
||||
if (editorService != null)
|
||||
{
|
||||
double dvalue = Convert.ToDouble(value);
|
||||
|
||||
RangeValueDropDown rv = new
|
||||
RangeValueDropDown(dvalue, Minimum, Maximum, editorService, context);
|
||||
|
||||
rv.EscapePressed = false;
|
||||
|
||||
editorService.DropDownControl(rv);
|
||||
|
||||
if (rv.EscapePressed == true)
|
||||
{
|
||||
context.PropertyDescriptor.SetValue(context.Instance, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
Type type = value.GetType();
|
||||
|
||||
value = Convert.ChangeType(rv.Value, type);
|
||||
|
||||
return (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region AngleRangeValueEditor
|
||||
|
||||
public class AngleRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (360); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region AngleOffsetRangeValueEditor
|
||||
|
||||
public class AngleOffsetRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (360); }
|
||||
}
|
||||
|
||||
public override double Minimum
|
||||
{
|
||||
get { return (-360); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region AngleMarginRangeValueEditor
|
||||
|
||||
public class AngleMarginRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (10); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region MarginRangeValueEditor
|
||||
|
||||
public class MarginRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (50); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region RadiusRangeValueEditor
|
||||
|
||||
public class RadiusRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (1); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WidthRangeValueEditor
|
||||
|
||||
public class WidthRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (.3); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OffsetRangeValueEditor
|
||||
|
||||
public class OffsetRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (.3); }
|
||||
}
|
||||
|
||||
public override double Minimum
|
||||
{
|
||||
get { return (-.3); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OffsetRangeValueEditor
|
||||
|
||||
public class OffsetPosRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (.9); }
|
||||
}
|
||||
|
||||
public override double Minimum
|
||||
{
|
||||
get { return (0); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WidthMaxRangeValueEditor
|
||||
|
||||
public class WidthMaxRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (1); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region HalfRadiusRangeValueEditor
|
||||
|
||||
public class HalfRadiusRangeValueEditor : RangeValueEditor
|
||||
{
|
||||
public override double Maximum
|
||||
{
|
||||
get { return (.5); }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 663 B |
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using DevComponents.DotNetBar;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class SeriesPointCollectionEditor : BaseCollectionEditor
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private ChartSeries _ChartSeries;
|
||||
private SeriesPointCollection _SavedCollection;
|
||||
|
||||
#endregion
|
||||
|
||||
public SeriesPointCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
_ChartSeries = context.Instance as ChartSeries;
|
||||
|
||||
SeriesPointCollection spc = (SeriesPointCollection)value;
|
||||
|
||||
_SavedCollection = new SeriesPointCollection();
|
||||
|
||||
foreach (SeriesPoint sp in spc)
|
||||
_SavedCollection.Add(sp.Copy());
|
||||
|
||||
try
|
||||
{
|
||||
object evalue = base.EditValue(context, provider, value);
|
||||
|
||||
if (EditCancelled == true)
|
||||
return (_SavedCollection);
|
||||
|
||||
return (evalue);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return (_SavedCollection);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateInstance
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
return (base.CreateInstance(itemType));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CopyButton_Click
|
||||
|
||||
protected override void CopyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
SeriesPoint item = ChartItem as SeriesPoint;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (AddButton != null)
|
||||
{
|
||||
ChartControlDesigner ccd = GetDesigner(_ChartSeries.ChartControl);
|
||||
|
||||
ccd.InCopyItem = true;
|
||||
|
||||
try
|
||||
{
|
||||
AddButton.PerformClick();
|
||||
|
||||
SeriesPointCollection spc = _ChartSeries.SeriesPoints;
|
||||
SeriesPoint clone = spc[spc.Count - 1];
|
||||
|
||||
item.CopyTo(clone);
|
||||
}
|
||||
finally
|
||||
{
|
||||
ccd.InCopyItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateCollectionItemType
|
||||
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(SeriesPoint);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
partial class SeriesPointValueDropDown
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btnCancel = new DevComponents.DotNetBar.ButtonX();
|
||||
this.btnOk = new DevComponents.DotNetBar.ButtonX();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.Blue;
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(48, 29);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(15, 15);
|
||||
this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnCancel.Symbol = "";
|
||||
this.btnCancel.SymbolColor = System.Drawing.Color.DarkRed;
|
||||
this.btnCancel.SymbolSize = 10F;
|
||||
this.btnCancel.TabIndex = 3;
|
||||
this.btnCancel.TextAlignment = DevComponents.DotNetBar.eButtonTextAlignment.Left;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// btnOk
|
||||
//
|
||||
this.btnOk.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOk.ColorTable = DevComponents.DotNetBar.eButtonColor.Blue;
|
||||
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnOk.Location = new System.Drawing.Point(26, 29);
|
||||
this.btnOk.Name = "btnOk";
|
||||
this.btnOk.Size = new System.Drawing.Size(19, 15);
|
||||
this.btnOk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnOk.Symbol = "";
|
||||
this.btnOk.SymbolColor = System.Drawing.SystemColors.ControlText;
|
||||
this.btnOk.SymbolSize = 10F;
|
||||
this.btnOk.TabIndex = 2;
|
||||
this.btnOk.TextAlignment = DevComponents.DotNetBar.eButtonTextAlignment.Left;
|
||||
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
|
||||
//
|
||||
// SeriesPointValueDropDown
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.btnOk);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.MinimumSize = new System.Drawing.Size(45, 45);
|
||||
this.Name = "SeriesPointValueDropDown";
|
||||
this.Size = new System.Drawing.Size(65, 45);
|
||||
this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.MyPreviewKeyDown);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DotNetBar.ButtonX btnCancel;
|
||||
private DotNetBar.ButtonX btnOk;
|
||||
}
|
||||
}
|
@@ -0,0 +1,330 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public partial class SeriesPointValueDropDown : UserControl
|
||||
{
|
||||
#region Private variables
|
||||
|
||||
private object _Value;
|
||||
private bool _EscapePressed;
|
||||
|
||||
private IWindowsFormsEditorService _EditorService;
|
||||
private ITypeDescriptorContext _Context;
|
||||
|
||||
private LabeledTextBoxX[] _TextBoxes;
|
||||
|
||||
#endregion
|
||||
|
||||
public SeriesPointValueDropDown()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public SeriesPointValueDropDown(object value,
|
||||
IWindowsFormsEditorService editorService, ITypeDescriptorContext context)
|
||||
{
|
||||
if (value == null)
|
||||
value = new object[0];
|
||||
|
||||
_Value = value;
|
||||
|
||||
_EditorService = editorService;
|
||||
_Context = context;
|
||||
|
||||
BackColor = SystemColors.Control;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
LayoutMultipleEntry();
|
||||
|
||||
Disposed += SeriesPointValueDropDown_Disposed;
|
||||
}
|
||||
|
||||
#region LayoutMultipleEntry
|
||||
|
||||
private void LayoutMultipleEntry()
|
||||
{
|
||||
if (_Value is object[])
|
||||
{
|
||||
object[] values = (object[])_Value;
|
||||
|
||||
_TextBoxes = GetTextBoxArray(values);
|
||||
|
||||
PositionBtns();
|
||||
}
|
||||
}
|
||||
|
||||
#region GetTextBoxArray
|
||||
|
||||
private LabeledTextBoxX[] GetTextBoxArray(object[] values)
|
||||
{
|
||||
LabeledTextBoxX[] tba = new LabeledTextBoxX[Math.Max(values.Length + 1, 3)];
|
||||
|
||||
for (int i = 0; i < tba.Length; i++)
|
||||
{
|
||||
object value = (i < values.Length) ? values[i] : null;
|
||||
|
||||
tba[i] = GetValueTextBox(value, i);
|
||||
}
|
||||
|
||||
return (tba);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetValueTextBox
|
||||
|
||||
private LabeledTextBoxX GetValueTextBox(object value, int i)
|
||||
{
|
||||
LabeledTextBoxX ltb = new LabeledTextBoxX();
|
||||
|
||||
ltb.EscapeKeyPressed += ltb_EscapeKeyPressed;
|
||||
|
||||
ltb.lbIndex.Text = i.ToString();
|
||||
ltb.tbValue.Tag = (value is string) ? "\"" + value + "\"" : value;
|
||||
ltb.tbValue.Text = FormatToStringValue(value);
|
||||
|
||||
ltb.Location = new Point(0, i * (ltb.Height + 2) + 2);
|
||||
ltb.Width = Width + 6;
|
||||
|
||||
ltb.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
|
||||
Controls.Add(ltb);
|
||||
|
||||
return (ltb);
|
||||
}
|
||||
|
||||
#region FormatToStringValue
|
||||
|
||||
private string FormatToStringValue(object value)
|
||||
{
|
||||
if (value == null)
|
||||
return ("");
|
||||
|
||||
if (value is string)
|
||||
return ("\"" + value + "\"");
|
||||
|
||||
if (value is int)
|
||||
return (value.ToString());
|
||||
|
||||
if (value is DateTime)
|
||||
return (value.ToString());
|
||||
|
||||
return (String.Format("{0:0.0###############}", value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ltb_EscapeKeyPressed
|
||||
|
||||
void ltb_EscapeKeyPressed(object sender, EventArgs e)
|
||||
{
|
||||
btnCancel.PerformClick();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region PositionBtns
|
||||
|
||||
private void PositionBtns()
|
||||
{
|
||||
int y = 2;
|
||||
|
||||
foreach (LabeledTextBoxX ltb in _TextBoxes)
|
||||
y += (ltb.Height + 2);
|
||||
|
||||
Height = y + btnOk.Height;
|
||||
|
||||
int x = Width - btnCancel.Width;
|
||||
|
||||
btnCancel.Location = new Point(x - 3 , y);
|
||||
btnOk.Location = new Point(x - 3 - btnOk.Width, y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public properties
|
||||
|
||||
#region Value
|
||||
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if (EscapePressed == true)
|
||||
return (_Value);
|
||||
|
||||
return (GetTextBoxValues());
|
||||
}
|
||||
}
|
||||
|
||||
#region GetTextBoxValues
|
||||
|
||||
private object[] GetTextBoxValues()
|
||||
{
|
||||
object[] values = new object[_TextBoxes.Length];
|
||||
|
||||
int n = 0;
|
||||
|
||||
for (int i = 0; i < _TextBoxes.Length; i++)
|
||||
{
|
||||
values[i] = GetTextBoxValue(i);
|
||||
|
||||
if (values[i] != null)
|
||||
n++;
|
||||
}
|
||||
|
||||
if (n > 0)
|
||||
{
|
||||
object[] rvalues = new object[n];
|
||||
|
||||
n = 0;
|
||||
|
||||
for (int i = 0; i < values.Length; i++)
|
||||
{
|
||||
if (values[i] != null)
|
||||
rvalues[n++] = values[i];
|
||||
}
|
||||
|
||||
return (rvalues);
|
||||
}
|
||||
|
||||
return (null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetTextBoxValue
|
||||
|
||||
private object GetTextBoxValue(int n)
|
||||
{
|
||||
LabeledTextBoxX ltb = _TextBoxes[n];
|
||||
|
||||
if (string.IsNullOrEmpty(ltb.tbValue.Text) == true)
|
||||
return (null);
|
||||
|
||||
if (ltb.tbValue.Tag != null)
|
||||
{
|
||||
if (ltb.tbValue.Text.Equals(ltb.tbValue.Tag.ToString()) == true)
|
||||
return (ltb.tbValue.Tag);
|
||||
}
|
||||
|
||||
return (GetConvertedValue(ltb.tbValue.Text));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetConvertedValue
|
||||
|
||||
private object GetConvertedValue(string text)
|
||||
{
|
||||
string s = text.Trim();
|
||||
|
||||
if (s.StartsWith("\"") && s.EndsWith("\""))
|
||||
return (s.Substring(1, s.Length - 2));
|
||||
|
||||
if (s.Contains(".") == false)
|
||||
{
|
||||
int iResult;
|
||||
|
||||
if (int.TryParse(text, out iResult) == true)
|
||||
return (iResult);
|
||||
}
|
||||
|
||||
double dblResult;
|
||||
|
||||
if (double.TryParse(text, out dblResult) == true)
|
||||
return (dblResult);
|
||||
|
||||
DateTime dtResult;
|
||||
|
||||
if (DateTime.TryParse(text, out dtResult) == true)
|
||||
return (dtResult);
|
||||
|
||||
return (text);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region EditorService
|
||||
|
||||
public IWindowsFormsEditorService EditorService
|
||||
{
|
||||
get { return (_EditorService); }
|
||||
set { _EditorService = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EscapePressed
|
||||
|
||||
public bool EscapePressed
|
||||
{
|
||||
get { return (_EscapePressed); }
|
||||
set { _EscapePressed = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region MyPreviewKeyDown
|
||||
|
||||
private void MyPreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
_EscapePressed = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region btnOk_Click
|
||||
|
||||
private void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
_EditorService.CloseDropDown();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region btnCancel_Click
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
_EscapePressed = true;
|
||||
|
||||
_EditorService.CloseDropDown();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SeriesPointValueDropDown_Disposed
|
||||
|
||||
void SeriesPointValueDropDown_Disposed(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < _TextBoxes.Length; i++)
|
||||
{
|
||||
LabeledTextBoxX ltb = _TextBoxes[i];
|
||||
|
||||
ltb.EscapeKeyPressed -= ltb_EscapeKeyPressed;
|
||||
ltb.Dispose();
|
||||
|
||||
_TextBoxes[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Design;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class SeriesPointValueEditor : UITypeEditor
|
||||
{
|
||||
#region GetEditStyle
|
||||
|
||||
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
|
||||
{
|
||||
return (UITypeEditorEditStyle.DropDown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetPaintValueSupported
|
||||
|
||||
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return (false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
IWindowsFormsEditorService editorService =
|
||||
provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
|
||||
|
||||
if (editorService != null)
|
||||
{
|
||||
SeriesPointValueDropDown fs = new
|
||||
SeriesPointValueDropDown(value, editorService, context);
|
||||
|
||||
fs.EscapePressed = false;
|
||||
|
||||
editorService.DropDownControl(fs);
|
||||
|
||||
if (fs.EscapePressed == true)
|
||||
return (value);
|
||||
|
||||
context.PropertyDescriptor.SetValue(context.Instance, fs.Value);
|
||||
|
||||
return (fs.Value);
|
||||
}
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
48
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/SizeDropDown.Designer.cs
generated
Normal file
48
PROMS/DotNetBar Source Code/DevComponents.DotNetBar.Charts.Design/SizeDropDown.Designer.cs
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
partial class SizeDropDown
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PivotPointDropDown
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Name = "PivotPointDropDown";
|
||||
this.Size = new System.Drawing.Size(99, 110);
|
||||
this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.PivotPointDropDown_PreviewKeyDown);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,242 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public partial class SizeDropDown : UserControl
|
||||
{
|
||||
#region Constants
|
||||
|
||||
private const int DotRadius = 4;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private variables
|
||||
|
||||
private SizeF _Size;
|
||||
private Rectangle _DotBounds;
|
||||
private Rectangle _FrameBounds;
|
||||
private Rectangle _DotRect;
|
||||
|
||||
private bool _InFrame;
|
||||
private bool _InSizeDot;
|
||||
private bool _PivotMoving;
|
||||
|
||||
private bool _EscapePressed;
|
||||
|
||||
private IWindowsFormsEditorService _EditorService;
|
||||
private ITypeDescriptorContext _Context;
|
||||
|
||||
#endregion
|
||||
|
||||
public SizeDropDown(SizeF value,
|
||||
IWindowsFormsEditorService editorService, ITypeDescriptorContext context)
|
||||
{
|
||||
Initialize();
|
||||
|
||||
_EditorService = editorService;
|
||||
_Context = context;
|
||||
|
||||
_Size = value;
|
||||
}
|
||||
|
||||
public SizeDropDown()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
#region Initialize
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SetStyle(ControlStyles.UserPaint, true);
|
||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public properties
|
||||
|
||||
#region EditorService
|
||||
|
||||
public IWindowsFormsEditorService EditorService
|
||||
{
|
||||
get { return (_EditorService); }
|
||||
set { _EditorService = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EscapePressed
|
||||
|
||||
public bool EscapePressed
|
||||
{
|
||||
get { return (_EscapePressed); }
|
||||
set { _EscapePressed = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PivotPoint
|
||||
|
||||
public SizeF Syze
|
||||
{
|
||||
get { return (_Size); }
|
||||
|
||||
set
|
||||
{
|
||||
_Size = value;
|
||||
|
||||
RecalcLayout();
|
||||
Invalidate();
|
||||
|
||||
_Context.OnComponentChanging();
|
||||
_Context.PropertyDescriptor.SetValue(_Context.Instance, value);
|
||||
_Context.OnComponentChanged();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region RecalcLayout
|
||||
|
||||
private void RecalcLayout()
|
||||
{
|
||||
int n = Math.Min(Bounds.Width - 4, Bounds.Height - 4);
|
||||
|
||||
_FrameBounds = new Rectangle(2, 2, n, n);
|
||||
_FrameBounds.X = (Bounds.Width - n) / 2;
|
||||
_FrameBounds.Y = (Bounds.Height - n) / 2;
|
||||
|
||||
int x = _FrameBounds.X + (int)(_Size.Width * _FrameBounds.Width);
|
||||
int y = _FrameBounds.Y + (int)(_Size.Height * _FrameBounds.Height);
|
||||
|
||||
_DotBounds = new Rectangle(x - DotRadius, y - DotRadius,
|
||||
DotRadius * 2, DotRadius * 2);
|
||||
|
||||
_DotRect = new Rectangle(0, 0, x, y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Paint support
|
||||
|
||||
#region OnPaint
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
|
||||
RecalcLayout();
|
||||
|
||||
g.DrawRectangle(Pens.Red, _DotRect);
|
||||
|
||||
DrawPivotDot(g);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DrawPivotDot
|
||||
|
||||
private void DrawPivotDot(Graphics g)
|
||||
{
|
||||
g.FillEllipse(Brushes.SkyBlue, _DotBounds);
|
||||
g.DrawEllipse(Pens.DimGray, _DotBounds);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mouse support
|
||||
|
||||
#region OnMouseMove
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
|
||||
_InFrame = (_FrameBounds.Contains(e.Location) == true);
|
||||
|
||||
if (_PivotMoving == true && _InFrame == true)
|
||||
{
|
||||
Syze = new SizeF(
|
||||
(float)(e.X - _FrameBounds.X) / _FrameBounds.Width,
|
||||
(float)(e.Y - _FrameBounds.Y) / _FrameBounds.Height);
|
||||
}
|
||||
|
||||
_InSizeDot = (_DotBounds.Contains(e.Location) == true);
|
||||
|
||||
Cursor = (_InSizeDot == true) ? Cursors.Hand : Cursors.Default;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnMouseLeave
|
||||
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
base.OnMouseLeave(e);
|
||||
|
||||
_InFrame = false;
|
||||
_InSizeDot = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnMouseDown
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
if (_InSizeDot == true)
|
||||
_PivotMoving = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnMouseUp
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseUp(e);
|
||||
|
||||
_PivotMoving = false;
|
||||
|
||||
_InFrame = (_FrameBounds.Contains(e.Location) == true);
|
||||
_InSizeDot = (_DotBounds.Contains(e.Location) == true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region PivotPointDropDown_PreviewKeyDown
|
||||
|
||||
private void PivotPointDropDown_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
_EscapePressed = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class SizeEditor : UITypeEditor
|
||||
{
|
||||
#region GetEditStyle
|
||||
|
||||
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
|
||||
{
|
||||
return (UITypeEditorEditStyle.DropDown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetPaintValueSupported
|
||||
|
||||
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return (false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
if (provider != null)
|
||||
{
|
||||
IWindowsFormsEditorService editorService =
|
||||
provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
|
||||
|
||||
if (editorService != null)
|
||||
{
|
||||
SizeDropDown pv = new SizeDropDown((SizeF)value, editorService, context);
|
||||
|
||||
pv.EscapePressed = false;
|
||||
|
||||
editorService.DropDownControl(pv);
|
||||
|
||||
if (pv.EscapePressed == true)
|
||||
context.PropertyDescriptor.SetValue(context.Instance, value);
|
||||
else
|
||||
return (pv.Syze);
|
||||
}
|
||||
}
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user