示例#1
0
        private void btnStop_Click(object sender, EventArgs e)
        {
            if (mf.bnd.bndBeingMadePts.Count > 2)
            {
                mf.bnd.bndArr.Add(new CBoundaryLines());

                for (int i = 0; i < mf.bnd.bndBeingMadePts.Count; i++)
                {
                    mf.bnd.bndArr[mf.bnd.boundarySelected].bndLine.Add(mf.bnd.bndBeingMadePts[i]);
                }

                mf.bnd.bndArr[mf.bnd.boundarySelected].PreCalcBoundaryLines();
                mf.bnd.bndArr[mf.bnd.boundarySelected].FixBoundaryLine(mf.bnd.boundarySelected);
                mf.bnd.bndArr[mf.bnd.boundarySelected].PreCalcBoundaryLines();
                mf.bnd.bndArr[mf.bnd.boundarySelected].isSet = true;
                mf.bnd.bndArr[mf.bnd.boundarySelected].CalculateBoundaryArea();
                mf.fd.UpdateFieldBoundaryGUIAreas();
            }

            //stop it all for adding
            mf.bnd.isOkToAddPoints = false;
            mf.bnd.isBndBeingMade  = false;

            //turn lines made from boundaries
            mf.CalculateMinMax();
            mf.FileSaveBoundary();

            mf.bnd.bndBeingMadePts.Clear();
            //close window
            Close();
        }