Example #1
0
		public static void CopyTo(BarCollection collection, Int32 index)
		{
			if (collection == null)
			{
				throw new ArgumentNullException("collection");
			}

			if (index < 0 || index >= collection.Count)
			{
				throw new ArgumentOutOfRangeException("index");
			}

			// TODO: Implement this later
			throw new InvalidOperationException();
		}
Example #2
0
		/// <summary>
		/// Creates a stacked bar graph user control with default properties
		/// </summary>
		public StackedBarGraph()
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitComponent call
			basicBar = new BasicBar();
			basicBar.ShowRangeLines = false;
			basicBar.ShowRangeValues = false;
			basicBar.BarGraduation = Graduation.None;

			gridline = new Gridline(this);
			axisLineXandY = new AxisLine(this);

			barCollection = new BarCollection();

			for (int i = 0;i < BarCount;i ++)
			{
				Bars.Add(new Bar(i.ToString(CultureInfo.CurrentUICulture), 50));
			}

			SetStyle(
					ControlStyles.DoubleBuffer | ControlStyles.UserPaint |
					ControlStyles.AllPaintingInWmPaint,
					true);
			UpdateStyles();

			GraphArea = new Rectangle(ClientRectangle.Left + graphMarginLeft,
									  ClientRectangle.Top + graphMarginTop,
									  ClientRectangle.Width - graphMarginRight - graphMarginLeft,
									  ClientRectangle.Height - graphMarginBottom - graphMarginTop);

			Debug.Assert(GraphArea.Height == (GraphArea.Bottom - GraphArea.Top), "Problem Ctor");
		}