private void populateCallDataGrid(List <MWCadNameSpace.DeconstructedCallString> deconstructedCallList)
        {
            callDataGrid.Rows.Clear();
            callDataGrid.ColumnCount = 6;

            callDataGrid.Columns[0].Name = "Start Index";
            callDataGrid.Columns[1].Name = "End Index";
            callDataGrid.Columns[2].Name = "Bearing";
            callDataGrid.Columns[3].Name = "Dist";
            callDataGrid.Columns[4].Name = "Curve Dir";
            callDataGrid.Columns[5].Name = "Rad";

            callDataGrid.Columns[0].Width = 50;
            callDataGrid.Columns[1].Width = 50;


            for (int i = 0; i < deconstructedCallList.Count; ++i)
            {
                MWCadNameSpace.DeconstructedCallString dCallString = deconstructedCallList[i];

                if (dCallString.getCurveLeftRight().Value == "NA")
                {
                    string[] rowData = new string[] { Convert.ToString(dCallString.getStart()),
                                                      Convert.ToString(dCallString.getEnd()),
                                                      dCallString.getBearingAsString(),
                                                      Convert.ToString(dCallString.getLength()),
                                                      "-", "-" };
                    callDataGrid.Rows.Add(rowData);
                }
                else //we  have a curve
                {
                    string[] rowData = new string[] { Convert.ToString(dCallString.getStart()),
                                                      Convert.ToString(dCallString.getEnd()),
                                                      dCallString.getBearingAsString(),
                                                      Convert.ToString(dCallString.getLength()),
                                                      dCallString.getCurveLeftRight().Value,
                                                      Convert.ToString(dCallString.getRadius()), };
                    callDataGrid.Rows.Add(rowData);
                }
                //string[] rowData =
            }
        }
        private void button4_Click(object sender, EventArgs e)
        {
            //change all of the text to a light color
            rich1.SelectAll();
            rich1.SelectionColor = Color.MediumPurple;
            rich1.DeselectAll();


            MWCadNameSpace.LegalDescriptionStringUtility sUtil = new MWCadNameSpace.LegalDescriptionStringUtility(rich1.Text);

            //get the call list
            List <MWCadNameSpace.MWSelection> callList = new List <MWCadNameSpace.MWSelection>();
            int i = 0;
            int k = 0;

            do
            {
                MWCadNameSpace.MWSelection call = sUtil.findNextPotentialCall(i);
                if (call.getStartIndex() > 0)
                {
                    i = call.getEndIndex() + 1;
                    callList.Add(call);
                    k = 0;
                }
                else
                {
                    //if call is not found, advance the search start location by 1 and repeat the search
                    ++k;
                    if (callList.Count > 0)
                    {
                        i = callList[callList.Count - 1].getEndIndex() + k;
                    }
                    else
                    {
                        i = k;
                    }
                }
            } while (i < rich1.Text.Length);

            //find any potential curves
            List <MWCadNameSpace.MWSelection> curveLocationList = sUtil.checkForPotentialCurveData();


            //modify the call list items if there are any curve keywords
            List <MWCadNameSpace.MWSelection> modifiedCallList = new List <MWCadNameSpace.MWSelection>();

            if (curveLocationList.Count > 0)
            {
                modifiedCallList = sUtil.mergeCurveDataWithCallList(curveLocationList, callList);
            }
            else
            {
                modifiedCallList = callList;
            }


            //List<MWCadNameSpace.DeconstructedCallString> deconstructedCallList = new List<MWCadNameSpace.DeconstructedCallString>();

            deconstructedCallList.Clear();

            //now we need to get the information our of the courses.
            for (int j = 0; j < callList.Count; ++j)
            {
                string stringCallValue = rich1.Text.Substring(modifiedCallList[j].getStartIndex(), modifiedCallList[j].length());
                MWCadNameSpace.DeconstructedCallString aCallString = new MWCadNameSpace.DeconstructedCallString(stringCallValue, callList[j].getStartIndex(), callList[j].getEndIndex());
                deconstructedCallList.Add(aCallString);
                Console.WriteLine("Stopper");
            }

            populateCallDataGrid(deconstructedCallList);


            for (int f = 0; f < callList.Count; ++f)
            {
                rich1.Select(callList[f].getStartIndex(), callList[f].length());
                rich1.SelectionColor = Color.Black;
            }
        }