using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using MhsModelCSharp;

namespace MhsApplication
{
	/// <summary>
	/// Summary description for CygPanel.
	/// </summary>
	public class CygPanel : System.Windows.Forms.UserControl
	{

		private CurrentYearGrowth cyg = null;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.TextBox textBox1;
	
		public CurrentYearGrowth Cyg
		{
			get 
			{
				return cyg;
			}
			set
			{
				cyg = value;
				if( cyg != null )
				{
					textBox1.Text =	"Ref: (" + 
						cyg.ReferencePoint.X.ToString("000.0") + "," + cyg.ReferencePoint.Y.ToString("000.0") + "," + cyg.ReferencePoint.Z.ToString("000.0") + ") " +
						"Base: (" + 
						cyg.BasePoint.X.ToString("000.0") + "," + cyg.BasePoint.Y.ToString("000.0") + "," + cyg.BasePoint.Z.ToString("000.0") + ") " +
						"Tip: (" +
						cyg.TipPoint.X.ToString("000.0") + "," + cyg.TipPoint.Y.ToString("000.0") + "," + cyg.TipPoint.Z.ToString("000.0") + ") " +
						"Diam: " + cyg.BaseDiameter.ToString("00.0") + " " +
						"Length: " + cyg.Length.ToString("00.0");
				}
				else
				{
					textBox1.Clear();
				}
			}
				
		}

		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public CygPanel()
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitializeComponent call

		}

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(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.groupBox1 = new System.Windows.Forms.GroupBox();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.textBox1);
			this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.groupBox1.Location = new System.Drawing.Point(0, 0);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(384, 72);
			this.groupBox1.TabIndex = 2;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Cyg#";
			// 
			// textBox1
			// 
			this.textBox1.BackColor = System.Drawing.SystemColors.Window;
			this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
			this.textBox1.Cursor = System.Windows.Forms.Cursors.Arrow;
			this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.textBox1.ForeColor = System.Drawing.SystemColors.WindowText;
			this.textBox1.Location = new System.Drawing.Point(3, 16);
			this.textBox1.Multiline = true;
			this.textBox1.Name = "textBox1";
			this.textBox1.ReadOnly = true;
			this.textBox1.Size = new System.Drawing.Size(378, 53);
			this.textBox1.TabIndex = 0;
			this.textBox1.Text = "textBox1";
			// 
			// CygPanel
			// 
			this.BackColor = System.Drawing.SystemColors.Window;
			this.Controls.Add(this.groupBox1);
			this.Name = "CygPanel";
			this.Size = new System.Drawing.Size(384, 72);
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion


	}
}
