예제 #1
0
        //function for enabling selected animation track
        public void enableSelectedTrack()
        {
            if (theCamForm.animTracksListBox.SelectedItem != null)
            {
                string selectedTrack = theCamForm.animTracksListBox.SelectedItem.ToString();
                int    animCounter   = 0;
                while (animCounter < animationTracks.AGTracks.Count)
                {
                    animationTrack = (IAGAnimationTrack)animationTracks.AGTracks.get_Element(animCounter);
                    if (animationTrack.Name != selectedTrack)
                    {
                        IAGAnimationTrack trackToDisable;
                        animationTracks.FindTrack(animationTrack.Name, out trackToDisable);
                        trackToDisable.IsEnabled = false;
                    }
                    else if (animationTrack.Name == selectedTrack)
                    {
                        animationTrack.IsEnabled = true;
                    }
                    animCounter = animCounter + 1;
                }
            }

            else if (theCamForm.animTracksListBox.SelectedItem == null)
            {
                MessageBox.Show("No Track Selected - All enabled tracks will be played");
            }
        }
예제 #2
0
        //function for getting camera animation tracks
        public void getCameraAnimationTracksFromGlobe()
        {
            ESRI.ArcGIS.Animation.IAGAnimationType animationType = new AnimationTypeGlobeCameraClass();
            animationTracks = (ESRI.ArcGIS.Animation.IAGAnimationTracks)globe;
            int animCounter = 0;

            while (animCounter < animationTracks.AGTracks.Count)
            {
                animationTrack = (ESRI.ArcGIS.Animation.IAGAnimationTrack)animationTracks.AGTracks.get_Element(animCounter);
                if (animationTrack.AnimationType == animationType)
                {
                    theCamForm.animTracksListBox.Items.Add(animationTrack.Name);
                }
                animCounter = animCounter + 1;
            }
        }
        //function for enabling selected animation track
        public void enableSelectedTrack()
        {
            if (theCamForm.animTracksListBox.SelectedItem != null)
            {
                string selectedTrack = theCamForm.animTracksListBox.SelectedItem.ToString();
                int animCounter = 0;
                while (animCounter < animationTracks.AGTracks.Count)
                {
                    animationTrack = (IAGAnimationTrack)animationTracks.AGTracks.get_Element(animCounter);
                    if (animationTrack.Name != selectedTrack)
                    {
                        IAGAnimationTrack trackToDisable;
                        animationTracks.FindTrack(animationTrack.Name, out trackToDisable);
                        trackToDisable.IsEnabled = false;
                    }
                    else if (animationTrack.Name == selectedTrack)
                    {
                        animationTrack.IsEnabled = true;
                    }
                    animCounter = animCounter + 1;
                }
            }

            else if (theCamForm.animTracksListBox.SelectedItem == null)
            {
                MessageBox.Show("No Track Selected - All enabled tracks will be played");
            }
        }
 //function for getting camera animation tracks
 public void getCameraAnimationTracksFromGlobe()
 {
     ESRI.ArcGIS.Animation.IAGAnimationType animationType = new AnimationTypeGlobeCameraClass();
     animationTracks = (ESRI.ArcGIS.Animation.IAGAnimationTracks)globe;
     int animCounter = 0;
     while (animCounter < animationTracks.AGTracks.Count)
     {
         animationTrack = (ESRI.ArcGIS.Animation.IAGAnimationTrack)animationTracks.AGTracks.get_Element(animCounter);
         if (animationTrack.AnimationType == animationType)
         {
             theCamForm.animTracksListBox.Items.Add(animationTrack.Name);
         }
         animCounter = animCounter + 1;
     }
 }