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

            switch(cbo.Text.ToLower())
            {
                case "entry":
                    m_spiralTrans = enumSpiralTransition.entry;
                    m_lastExitBearing = txtBearing.Text;
                    lblBearing.Text = "Start Bearing:";
                    txtBearing.Text = RadiansToAngularDefaultUnits(m_pLine.Angle);
                    break;
                case "exit":
                    m_spiralTrans = enumSpiralTransition.exit;
                    lblBearing.Text = "End Bearing:";
                    txtBearing.Text = m_lastExitBearing;
                    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;
            }
        }