c# List.Add() unable to add correct values
<p>Program suppose to draw shapes on panel1.
This is code for my main form:</p>

<pre><code>namespace DrawShapes
{
    public partial class Form1 : Form
    {
        List&lt;Shape&gt; myShapeList;
        Shape shape;

        public Form1()
        {
            InitializeComponent();
        }

        public void AddShape(Shape myshape)
        {
            myShapeList.Add(shape);
        }

        public List&lt;Shape&gt; MyShapeList
        {
            get { return myShapeList; }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            myShapeList = new List&lt;Shape&gt;();
            shape = new Shape();
        }

        private void drawMeButton_Click(object sender, EventArgs e)
        {
            EditShape editShape = new EditShape();
            editShape.Shape = shape;

            if (editShape.ShowDialog() == DialogResult.OK)
            {
                this.shape = editShape.Shape;
                myShapeList.Add(shape);
                panel1.Invalidate();
            }
            editShape.Dispose();
        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {
            int panelWidth = panel1.ClientRectangle.Width;
            int panelHeight = panel1.ClientRectangle.Height;

            Pen penLine = new Pen(Color.Blue, 1);

            Graphics g = e.Graphics;
            if (myShapeList != null)
            {
                foreach (Shape element in myShapeList)
                {
                    label1.Text = element.Width.ToString();
                    g.DrawRectangle(penLine, element.XCordinates, element.XCordinates, 50, 50); 
                }
            }
        } 
    }
}
</code></pre>

<p>and here is code for my edit shape dialog box</p>

<pre><code>namespace DrawShapes
{
    public partial class EditShape : Form
    {
        Shape shape = null;



        public EditShape()
        {
            InitializeComponent();
        }

        public Shape Shape
        {
            get { return shape; }
            set { shape = value; }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            shape.Width = 50;
            shape.Height = 50;
            shape.XCordinates = int.Parse(textBox1.Text);
            shape.YCordinates = int.Parse(textBox2.Text);
            shape.Type = 0;
            DialogResult = DialogResult.OK;

        }
    }
}
</code></pre>

<p>I am having problem assigning shape object(from Edit Shape form) to myShapeList, all properties are set to 0 for some reason. Please help.</p>