热门文章 | 热门软件| 热门源码 | 热门电影 | 知识库 | 联系我们
软件 源码 教程 影视 健康 招聘
  HTML | JavaScript | ASP | PHP | JSP | NET | VB | VC | VF | Windows | Linux | Mysql | Mssql | Oracle | Struts 
当前位置: 创世纪计算机资源网 -> 文章频道 ->vc 
站内搜索:
用C#创建PDA应用程序的柱形图控件(3)
作者:佚名 来源:天极开发 整理日期:2007-10-19

private string mTitle="统计图";
#if NETCFDESIGNTIME
[System.ComponentModel.Category("PDAChart")]
[System.ComponentModel.DefaultValueAttribute("图表")]
[System.ComponentModel.Description("设置/读取标题")]
#endif
public string Title
{
 get
 {
  return mTitle;
 }
 set
 {
  mTitle=value;
  this.Invalidate();
 }
}


private ArrayList mCubeData;
#if !NETCFDESIGNTIME
//The actual Data used to draw the line on the graph
public ICollection CubeData
{
 get
 {
  return mCubeData;
 }
 set
 {
  mCubeData = new ArrayList(value);
  Rectangle rcClient = this.ClientRectangle;
  Rectangle rcGraphClient = new Rectangle(rcClient.X + 21, rcClient.Y
+ 5, rcClient.Width - 21, rcClient.Height - 21);
  this.Invalidate(rcGraphClient);
 }
}
#endif

private Color mBackColor=System.Drawing.SystemColors.ControlLight;

#if NETCFDESIGNTIME
[System.ComponentModel.Category("PDAChart")]
[System.ComponentModel.DefaultValueAttribute(0)]
[System.ComponentModel.Description("设置/读取背景颜色")]
#endif
public override Color BackColor
{
 get
 {
  return mBackColor;
 }
 set
 {
  mBackColor =value;
  this.Invalidate();
 }
}

private Color mAxesXColor=System.Drawing.SystemColors.HighlightText;

#if NETCFDESIGNTIME
[System.ComponentModel.Category("PDAChart")]
[System.ComponentModel.DefaultValueAttribute(0)]
[System.ComponentModel.Description("设置/读取X轴颜色")]
#endif
public Color AxesXColor
{
 get
 {
  return mAxesXColor;
 }
 set
 {
  mAxesXColor =value;
  this.Invalidate();
 }
}

private Color mAxesYColor=System.Drawing.SystemColors.Info;
#if NETCFDESIGNTIME
[System.ComponentModel.Category("PDAChart")]
[System.ComponentModel.DefaultValueAttribute(0)]
[System.ComponentModel.Description("设置/读取Y轴颜色")]
#endif
public Color AxesYColor
{
 get
 {
  return mAxesYColor;
 }
 set
 {
  mAxesYColor =value;
  this.Invalidate();
 }
}

private int mLenght = 4;
#if NETCFDESIGNTIME
// These design time attributes affect appearance of this property in
the property grid.
[System.ComponentModel.DefaultValueAttribute(5)]
[System.ComponentModel.Description("立体长")]
#endif
//The lower Y bound of the PDAChart
public int Lenght
{
 get
 {
  return mLenght;
 }
 set
 {
  mLenght = value;
  this.Invalidate();
 }
}
private int mMaxYValue ;//图表Y轴最大值
private int mMaxXValue ;//图表X轴最大值

private Color mGridLineColor=System.Drawing.Color.Cyan;
#if NETCFDESIGNTIME
[System.ComponentModel.Category("PDAChart")]
[System.ComponentModel.Description("网格线的颜色.")]
#endif
//The color of the line of the PDAChart.
public Color GridLineColor
{
 get
 {
  return mGridLineColor;
 }
 set
 {
  mGridLineColor =value;
  this.Invalidate();
 }
}
private bool mShowXText = true;
#if NETCFDESIGNTIME
// These design time attributes affect appearance of this property in
the property grid.
[System.ComponentModel.Category("Chart")]
[System.ComponentModel.DefaultValueAttribute(true)]
[System.ComponentModel.Description("是否显示X轴的文本")]
#endif
// If true, shows the Y-Values on the left of the PDAChart
public bool IsShowXText
{
 get
 {
  return mShowXText;
 }
 set
 {
  mShowXText = value;
  this.Invalidate();
 }
}
private bool mShowYText = true;
#if NETCFDESIGNTIME
// These design time attributes affect appearance of this property in
the property grid.
[System.ComponentModel.Category("Chart")]
[System.ComponentModel.DefaultValueAttribute(true)]
[System.ComponentModel.Description("是否显示Y轴的数字")]
#endif
// If true, shows the Y-Values on the left of the PDAChart
public bool IsShowYText
{
 get
 {
  return mShowYText;
 }
 set
 {
  mShowYText = value;
  this.Invalidate();
 }
}
private bool mShowXScale = true;
#if NETCFDESIGNTIME
// These design time attributes affect appearance of this property in
the property grid.
[System.ComponentModel.Category("Chart")]
[System.ComponentModel.DefaultValueAttribute(true)]
[System.ComponentModel.Description("是否显示X轴的刻度.")]
#endif
// If true, shows the X-Values on the bottom of the PDAChart
public bool IsShowXScale
{
 get
 {
  return mShowXScale;
 }
 set
 {
  mShowXScale = value;
  this.Invalidate();
 }  
}

private bool mShowYScale = true;
#if NETCFDESIGNTIME
// These design time attributes affect appearance of this property in
the property grid.
[System.ComponentModel.Category("Chart")]
[System.ComponentModel.DefaultValueAttribute(true)]
[System.ComponentModel.Description("是否显示Y轴的刻度")]
#endif
// If true, shows the Y-Values on the left of the PDAChart
public bool IsShowYScale
{
 get
 {
  return mShowYScale;
 }
 set
 {
  mShowYScale = value;
  this.Invalidate();
 }
}

private bool mShowGrid = true;
#if NETCFDESIGNTIME
// These design time attributes affect appearance of this property in
the property grid.
[System.ComponentModel.Category("Chart")]
[System.ComponentModel.DefaultValueAttribute(false)]
[System.ComponentModel.Description("是否显示网格线")]
#endif
// If true, shows horiztonal grid lines on the PDAChart.
public bool IsShowGrid
{
 get
 {
  return mShowGrid;
 }
 set
 {
  mShowGrid = value;
  this.Invalidate();
 }
}
#endregion
///
/// Clean up any resources being used.
///

protected override void Dispose( bool disposing )
{
 if( disposing )
 {
  if( components != null )
   components.Dispose();
 }
 base.Dispose( disposing );
}
[1]  [2]  [3]  [4]  [5]  [6]  
相关文章