private void buttonOkay_Click(object sender, EventArgs e)
        {
            //Gather up the information and set it
            output = new glPrimitives();
            output = input;

            switch (_Type)
            {
                case "TRIANGLE":
                    _aTri = (triangle)input;
                    _aTri.showVerts = checkBox_showVerts.Checked;
                    _aTri.lineColor = button_VertexColor.BackColor;
                    _aTri.vertSize = (float)Convert.ToDecimal(UpDown_VertextSize.Text.ToString());

                    _aTri.showLines = checkBox_showLines.Checked;
                    _aTri.lineColor = button_LineColor.BackColor;
                    _aTri.lineWidth = (float)Convert.ToDecimal(UpDown_LineWidth.Text.ToString());
                    output = _aTri;
                    break;
                case "LINE":
                    _aLine = (line)input;
                    _aLine.showVerts = checkBox_showVerts.Checked;
                    _aLine.propColor = button_ObjectColor.BackColor;
                    _aLine.vertColor = button_VertexColor.BackColor;
                    _aLine.vertSize = (float)Convert.ToDecimal(UpDown_VertextSize.Text.ToString());
                    output = _aLine;
                    break;
                case "POINT":
                    _aPoint = (point)input;
                    output = _aPoint;
                    break;
                case "POLYGON":
                    _aPoly = (polygon)input;
                    output = _aPoly;
                    break;
                case "QUAD":
                    _aQuad = (quad)input;
                    _aQuad.showVerts = checkBox_showVerts.Checked;
                    _aQuad.lineColor = button_VertexColor.BackColor;
                    _aQuad.vertSize = (float)Convert.ToDecimal(UpDown_VertextSize.Text.ToString());

                    _aQuad.showLines = checkBox_showLines.Checked;
                    _aQuad.lineColor = button_LineColor.BackColor;
                    _aQuad.lineWidth = (float)Convert.ToDecimal(UpDown_LineWidth.Text.ToString());

                    _aQuad.propColor = button_ObjectColor.BackColor;
                    output = _aQuad;
                    break;
                case "LOOPLINE":
                    _aLoopLine = (loopline)input;
                    output = _aLoopLine;
                    break;
                default:

                    break;
            }

            this.Close();
        }
        private void glPrimitiveDialog_Load(object sender, EventArgs e)
        {
            this.Text = _Type + " properties";
            _isOpen = true;

            switch (_Type)
            {
                case "TRIANGLE":
                    _aTri = (triangle)input;
                    enableControls(true, true, true);

                    checkBox_showVerts.Checked = _aTri.showVerts;
                    button_VertexColor.BackColor = _aTri.lineColor;
                    UpDown_VertextSize.Text = _aTri.vertSize.ToString();

                    checkBox_showLines.Checked = _aTri.showLines;
                    button_LineColor.BackColor = _aTri.lineColor;
                    UpDown_LineWidth.Text = _aTri.lineWidth.ToString();

                    break;
                case "LINE":
                    _aLine = (line)input;
                    enableControls(true, true, false);
                    checkBox_showVerts.Checked = _aLine.showVerts;
                    UpDown_VertextSize.Text = _aLine.vertSize.ToString();
                    break;
                case "POINT":
                    _aPoint = (point)input;
                    enableControls(true, false, false);
                    break;
                case "POLYGON":
                    _aPoly = (polygon)input;
                    enableControls(true, true, true);
                    break;
                case "QUAD":
                    _aQuad = (quad)input;
                    enableControls(true, true, true);
                    checkBox_showVerts.Checked = _aQuad.showVerts;
                    button_VertexColor.BackColor = _aQuad.lineColor;
                    UpDown_VertextSize.Text = _aQuad.vertSize.ToString();

                    checkBox_showLines.Checked = _aQuad.showLines;
                    button_LineColor.BackColor = _aQuad.lineColor;
                    UpDown_LineWidth.Text = _aQuad.lineWidth.ToString();

                    button_ObjectColor.BackColor = _aQuad.propColor;
                    break;
                case "LOOPLINE":
                    _aLoopLine = (loopline)input;
                    enableControls(true, true, true);
                    break;
                default:

                    break;
            }
        }