Пример #1
0
        private void cboTurn_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            ComboBox cbo = (ComboBox)sender;

            switch(cbo.Text.ToLower())
            {
                case "left":
                    m_turnDirec = esriTurnDirection.esriTDLeft;
                    break;
                case "right":
                    m_turnDirec = esriTurnDirection.esriTDRight;
                    break;
            }
        }
Пример #2
0
        // starts the build process and stores local variables for curve construction
        public bool BuildCurve(double chordlength, double numchords, double tangentangle, esriTurnDirection turndirec, enumSpiralTransition spiraltrans)
        {
            m_chordLength = chordlength;
            m_numChords = numchords;
            m_tangentAngle = tangentangle; //in radians
            m_turnDirec = turndirec;
            m_spiralTrans = spiraltrans;
            m_coursecount = (int)Math.Ceiling(m_numChords);

            try
            {
                switch (m_spiralTrans)
                {
                    case enumSpiralTransition.entry:
                        BuildCurveEntry();
                        break;
                    case enumSpiralTransition.exit:
                        BuildCurveExit();
                        break;
                }

                return true;
            }
            catch(Exception ex)
            {

                Debug.WriteLine(ex.Message);
                return false;
            }
        }