コード例 #1
0
        private void TypeSelect_SelectedIndexChanged(object sender, EventArgs e)
        {
            WindowSelect.Items.Clear();
            List <string> windowNames = new List <string>();

            if (TypeSelect.SelectedIndex == 0)
            {
                windowNames = SmartViewFunctions.GetWindowNames(1);
                ViewDefinitionBox2D.Enabled = false;
                ViewDefinitionBox2D.Visible = false;
                ViewDefinitionBox3D.Enabled = true;
                ViewDefinitionBox3D.Visible = true;
                UseCurrentViewPoint.Enabled = true;
                UseCurrentViewPoint.Visible = true;
                UseCameraPath.Enabled       = true;
                UseCameraPath.Visible       = true;
                CameraPathName.Enabled      = true;
                CameraPathName.Visible      = true;
                UseVectorHideShow.Visible   = true;
                VectorHideShow.Visible      = true;
            }
            else if (TypeSelect.SelectedIndex == 1)
            {
                windowNames = SmartViewFunctions.GetWindowNames(0);
                ViewDefinitionBox3D.Enabled = false;
                ViewDefinitionBox3D.Visible = false;
                ViewDefinitionBox2D.Enabled = true;
                ViewDefinitionBox2D.Visible = true;
                UseCurrentViewPoint.Enabled = false;
                UseCurrentViewPoint.Visible = false;
                UseCameraPath.Enabled       = false;
                UseCameraPath.Visible       = false;
                CameraPathName.Enabled      = false;
                CameraPathName.Visible      = false;
                UseVectorHideShow.Visible   = false;
                VectorHideShow.Visible      = false;
            }
            foreach (var item in windowNames)
            {
                WindowSelect.Items.Add(item);
            }
            //try/catch for case when no windows of a certain type exist
            try
            {
                WindowSelect.SelectedIndex = 0;
            }
            catch (Exception)
            {
            }
        }
コード例 #2
0
        private void PopulateComboBoxes()
        {
            TTViewName.Text = CommonData.SavedViewList[CommonData.SelectedIndex].Name;
            List <string> windowNames = SmartViewFunctions.GetWindowNames(1);

            foreach (var item in windowNames)
            {
                WindowSelect.Items.Add(item);
                if (item.Contains(CommonData.SavedViewList[CommonData.SelectedIndex].WindowName))
                {
                    WindowSelect.SelectedIndex = WindowSelect.Items.Count - 1;
                }
            }

            foreach (ObjectData item in CommonData.CurrentViewObjectData)
            {
                if (item.ClassName == "Satellite")
                {
                    TargetSatellite.Items.Add(item.SimpleName);
                    if (CommonData.SavedViewList[CommonData.SelectedIndex].TargetSatellite.Contains(item.SimpleName))
                    {
                        TargetSatellite.SelectedItem = item.SimpleName;
                    }
                }
            }
            if (TargetSatellite.SelectedIndex == -1)
            {
                TargetSatellite.SelectedIndex = 0;
            }

            TTDisplayObject.Items.Add("Target Satellite");
            TTDisplayObject.Items.Add("All Threats (Up to 4)");
            if (CommonData.SavedViewList[CommonData.SelectedIndex].TtDataDisplayObject == "AllThreat")
            {
                TTDisplayObject.SelectedIndex = TTDisplayObject.Items.Count - 1;
            }
            foreach (ObjectData item in CommonData.CurrentViewObjectData)
            {
                if (item.ClassName == "Satellite")
                {
                    if (item.SimpleName != TargetSatellite.Text)
                    {
                        TTDisplayObject.Items.Add(item.SimpleName);
                        if (CommonData.SavedViewList[CommonData.SelectedIndex].TtDataDisplayObject.Contains(item.SimpleName))
                        {
                            TTDisplayObject.SelectedIndex = CommonData.CurrentViewObjectData.IndexOf(item);
                        }
                    }
                }
            }
            if (TTDisplayObject.SelectedIndex == -1)
            {
                TTDisplayObject.SelectedIndex = 0;
            }

            ThreatList.Items.Clear();
            foreach (ObjectData item in CommonData.CurrentViewObjectData)
            {
                if (item.ClassName == "Satellite" && item.SimpleName != TargetSatellite.Text)
                {
                    ListViewItem listItem = new ListViewItem();
                    listItem.Text = item.SimpleName;
                    int    index     = ThreatList.Items.IndexOf(listItem);
                    string className = SmartViewFunctions.GetClassName(item.SimpleName);
                    if (index == -1)
                    {
                        if (CommonData.SavedViewList[CommonData.SelectedIndex].ThreatSatNames.Contains(className + "/" + item.SimpleName))
                        {
                            listItem.Font = new Font(listItem.Font, FontStyle.Bold);
                            _threatNames.Add(className + "/" + item.SimpleName);
                        }

                        ThreatList.Items.Add(listItem);
                    }
                }
            }

            TTDisplayLocation.Items.Add("TopLeft");
            TTDisplayLocation.Items.Add("TopCenter");
            TTDisplayLocation.Items.Add("TopRight");
            TTDisplayLocation.Items.Add("CenterLeft");
            TTDisplayLocation.Items.Add("Center");
            TTDisplayLocation.Items.Add("CenterRight");
            TTDisplayLocation.Items.Add("BottomLeft");
            TTDisplayLocation.Items.Add("BottomCenter");
            TTDisplayLocation.Items.Add("BottomRight");
            TTDisplayLocation.SelectedIndex = 0;

            if (CommonData.SavedViewList[CommonData.SelectedIndex].EnableProximityBox)
            {
                UseProxBox.Checked = true;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].TtDataDisplayActive)
            {
                TTDataDisplayOptions.Enabled = true;
                TTUseDataDisplay.Checked     = true;
            }
            else
            {
                TTDataDisplayOptions.Enabled = false;
                TTUseDataDisplay.Checked     = false;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].ObjectHideShow)
            {
                ObjectHideShow.Checked  = true;
                HideShowOptions.Enabled = true;
            }
            else
            {
                HideShowOptions.Enabled = false;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].UseAnimationTime)
            {
                string currentTime = CommonData.SavedViewList[CommonData.SelectedIndex].AnimationTime;
                UseCurrentTime.Checked = true;
                CurrentTime.Text       = currentTime;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].EnableProximityEllipsoid)
            {
                EnableEllipsoid.Checked = true;
                EllipsoidX.Text         = CommonData.SavedViewList[CommonData.SelectedIndex].EllipsoidX;
                EllipsoidY.Text         = CommonData.SavedViewList[CommonData.SelectedIndex].EllipsoidY;
                EllipsoidZ.Text         = CommonData.SavedViewList[CommonData.SelectedIndex].EllipsoidZ;
            }
            else
            {
                EllipsoidDefinition.Enabled = false;
                EllipsoidX.Text             = "100";
                EllipsoidY.Text             = "100";
                EllipsoidZ.Text             = "100";
            }
        }
コード例 #3
0
        private void PopulateComboBoxes()
        {
            ViewName3D.Text = CommonData.SavedViewList[CommonData.SelectedIndex].Name;
            ViewType.Items.Add("Inertial");
            //ViewType.Items.Add("Fixed");
            ViewType.SelectedIndex = 0;

            if (CommonData.SavedViewList[CommonData.SelectedIndex].UseAnimationTime)
            {
                CurrentTime.Text = CommonData.SavedViewList[CommonData.SelectedIndex].AnimationTime;
            }

            DisplayLocation.Items.Add("TopLeft");
            DisplayLocation.Items.Add("TopCenter");
            DisplayLocation.Items.Add("TopRight");
            DisplayLocation.Items.Add("CenterLeft");
            DisplayLocation.Items.Add("Center");
            DisplayLocation.Items.Add("CenterRight");
            DisplayLocation.Items.Add("BottomLeft");
            DisplayLocation.Items.Add("BottomCenter");
            DisplayLocation.Items.Add("BottomRight");
            DisplayLocation.SelectedIndex = 0;
            if (CommonData.SavedViewList[CommonData.SelectedIndex].DataDisplayActive)
            {
                foreach (string item in DisplayLocation.Items)
                {
                    if (CommonData.SavedViewList[CommonData.SelectedIndex].DataDisplayLocation.Contains(item))
                    {
                        DisplayLocation.SelectedItem = item;
                    }
                }
            }
            OrbitTrackBox.Enabled = false;
            if (CommonData.SavedViewList[CommonData.SelectedIndex].EnableUniversalOrbitTrack)
            {
                EnableUniversalOrbitTrack.Checked = true;
            }
            LeadType3D.Items.Add("OnePass");
            LeadType3D.Items.Add("All");
            LeadType3D.Items.Add("Full");
            LeadType3D.Items.Add("Half");
            LeadType3D.Items.Add("Quarter");
            LeadType3D.Items.Add("None");
            LeadType3D.Items.Add("Time");
            LeadType3D.SelectedIndex = 0;
            foreach (string item in LeadType3D.Items)
            {
                if (CommonData.SavedViewList[CommonData.SelectedIndex].LeadType.Contains(item))
                {
                    LeadType3D.SelectedItem = item;
                    if (item == "Time")
                    {
                        OrbitLeadTime.Text = CommonData.SavedViewList[CommonData.SelectedIndex].LeadTime;
                    }
                }
            }

            TrailType3D.Items.Add("SameAsLead");
            TrailType3D.Items.Add("OnePass");
            TrailType3D.Items.Add("All");
            TrailType3D.Items.Add("Full");
            TrailType3D.Items.Add("Half");
            TrailType3D.Items.Add("Quarter");
            TrailType3D.Items.Add("None");
            TrailType3D.Items.Add("Time");
            TrailType3D.SelectedIndex = 0;
            foreach (string item in TrailType3D.Items)
            {
                if (CommonData.SavedViewList[CommonData.SelectedIndex].TrailType.Contains(item))
                {
                    TrailType3D.SelectedItem = item;
                    if (item == "Time")
                    {
                        OrbitTrailTime.Text = CommonData.SavedViewList[CommonData.SelectedIndex].TrailTime;
                    }
                }
            }

            List <string> windowNames = SmartViewFunctions.GetWindowNames(1);

            foreach (var item in windowNames)
            {
                WindowSelect.Items.Add(item);
                if (item.Contains(CommonData.SavedViewList[CommonData.SelectedIndex].WindowName))
                {
                    WindowSelect.SelectedIndex = WindowSelect.Items.Count - 1;
                }
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].ObjectHideShow)
            {
                ObjectHideShow.Checked  = true;
                HideShowOptions.Enabled = true;
            }
            else
            {
                HideShowOptions.Enabled = false;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].DataDisplayActive)
            {
                UseDataDisplay.Checked     = true;
                DataDisplayOptions.Enabled = true;
            }
            else
            {
                DataDisplayOptions.Enabled = false;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].UseAnimationTime)
            {
                string currentTime = CommonData.SavedViewList[CommonData.SelectedIndex].AnimationTime;
                UseCurrentTime.Checked = true;
                CurrentTime.Text       = currentTime;
            }
            if (CommonData.SavedViewList[CommonData.SelectedIndex].UseStoredView)
            {
                UseCurrentViewPoint.Checked = true;
            }
        }
コード例 #4
0
        private void PopulateBoxes()
        {
            if (CommonData.SavedViewList[CommonData.SelectedIndex].UseAnimationTime)
            {
                CurrentTime.Text = CommonData.SavedViewList[CommonData.SelectedIndex].AnimationTime;
            }

            TypeSelect2D.Items.Add("ZoomedOut");
            TypeSelect2D.Items.Add("SpecifyCenter");
            TypeSelect2D.Items.Add("ObjectCenter");
            foreach (string item in TypeSelect2D.Items)
            {
                if (item == CommonData.SavedViewList[CommonData.SelectedIndex].ViewType2D)
                {
                    TypeSelect2D.SelectedItem = item;
                }
            }

            GroundTrackBox.Enabled = false;
            if (CommonData.SavedViewList[CommonData.SelectedIndex].EnableUniversalGroundTrack)
            {
                EnableUniversalGroundTrack.Checked = true;
            }
            LeadType2D.Items.Add("OnePass");
            LeadType2D.Items.Add("All");
            LeadType2D.Items.Add("Full");
            LeadType2D.Items.Add("Half");
            LeadType2D.Items.Add("Quarter");
            LeadType2D.Items.Add("None");
            LeadType2D.Items.Add("Time");
            foreach (string item in LeadType2D.Items)
            {
                if (CommonData.SavedViewList[CommonData.SelectedIndex].LeadType.Contains(item))
                {
                    LeadType2D.SelectedItem = item;
                    if (item == "Time")
                    {
                        GroundLeadTime.Text = CommonData.SavedViewList[CommonData.SelectedIndex].LeadTime;
                    }
                }
            }

            TrailType2D.Items.Add("SameAsLead");
            TrailType2D.Items.Add("OnePass");
            TrailType2D.Items.Add("All");
            TrailType2D.Items.Add("Full");
            TrailType2D.Items.Add("Half");
            TrailType2D.Items.Add("Quarter");
            TrailType2D.Items.Add("None");
            TrailType2D.Items.Add("Time");
            foreach (string item in TrailType2D.Items)
            {
                if (CommonData.SavedViewList[CommonData.SelectedIndex].TrailType.Contains(item))
                {
                    TrailType2D.SelectedItem = item;
                    if (item == "Time")
                    {
                        GroundTrailTime.Text = CommonData.SavedViewList[CommonData.SelectedIndex].TrailTime;
                    }
                }
            }

            ViewName2D.Text     = CommonData.SavedViewList[CommonData.SelectedIndex].Name;
            ZoomCenterLong.Text = CommonData.SavedViewList[CommonData.SelectedIndex].ZoomCenterLong;
            ZoomCenterLat.Text  = CommonData.SavedViewList[CommonData.SelectedIndex].ZoomCenterLat;
            ZoomDelta.Text      = CommonData.SavedViewList[CommonData.SelectedIndex].ZoomCenterDelta;

            List <string> windowNames = SmartViewFunctions.GetWindowNames(0);

            foreach (var item in windowNames)
            {
                WindowSelect.Items.Add(item);
                if (item.Contains(CommonData.SavedViewList[CommonData.SelectedIndex].WindowName))
                {
                    WindowSelect.SelectedIndex = WindowSelect.Items.Count - 1;
                }
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].ObjectHideShow)
            {
                ObjectHideShow.Checked  = true;
                HideShowOptions.Enabled = true;
            }
            else
            {
                HideShowOptions.Enabled = false;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].UseAnimationTime)
            {
                string currentTime = CommonData.SavedViewList[CommonData.SelectedIndex].AnimationTime;
                UseCurrentTime.Checked = true;
                CurrentTime.Text       = currentTime;
            }
        }
コード例 #5
0
        private void PopulateComboBoxes()
        {
            GEOViewName.Text = CommonData.SavedViewList[CommonData.SelectedIndex].Name;
            List <string> windowNames = SmartViewFunctions.GetWindowNames(1);

            foreach (var item in windowNames)
            {
                WindowSelect.Items.Add(item);
                if (item.Contains(CommonData.SavedViewList[CommonData.SelectedIndex].WindowName))
                {
                    WindowSelect.SelectedIndex = WindowSelect.Items.Count - 1;
                }
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].UseAnimationTime)
            {
                CurrentTime.Text = CommonData.SavedViewList[CommonData.SelectedIndex].AnimationTime;
            }

            GEOLongitude.Text  = CommonData.SavedViewList[CommonData.SelectedIndex].GeoLongitude;
            GEORadius.Text     = CommonData.SavedViewList[CommonData.SelectedIndex].GeoRadius;
            GeoNorthSouth.Text = CommonData.SavedViewList[CommonData.SelectedIndex].GeoNorthSouth;
            GEOEastWest.Text   = CommonData.SavedViewList[CommonData.SelectedIndex].GeoEastWest;

            GEODisplayLocation.Items.Add("TopLeft");
            GEODisplayLocation.Items.Add("TopCenter");
            GEODisplayLocation.Items.Add("TopRight");
            GEODisplayLocation.Items.Add("CenterLeft");
            GEODisplayLocation.Items.Add("Center");
            GEODisplayLocation.Items.Add("CenterRight");
            GEODisplayLocation.Items.Add("BottomLeft");
            GEODisplayLocation.Items.Add("BottomCenter");
            GEODisplayLocation.Items.Add("BottomRight");
            GEODisplayLocation.SelectedIndex = 0;
            if (CommonData.SavedViewList[CommonData.SelectedIndex].GeoDataDisplayActive)
            {
                foreach (string item in GEODisplayLocation.Items)
                {
                    if (CommonData.SavedViewList[CommonData.SelectedIndex].GeoDataDisplayLocation.Contains(item))
                    {
                        GEODisplayLocation.SelectedItem = item;
                    }
                }
            }

            foreach (ObjectData item in CommonData.CurrentViewObjectData)
            {
                if (item.ClassName == "Satellite")
                {
                    GEOViewTarget.Items.Add(item.SimpleName);
                    GEODisplayObject.Items.Add(item.SimpleName);
                    if (CommonData.SavedViewList[CommonData.SelectedIndex].GeoDataDisplayObject.Contains(item.SimpleName))
                    {
                        GEODisplayObject.SelectedIndex = GEODisplayObject.Items.Count - 1;
                    }

                    if (CommonData.SavedViewList[CommonData.SelectedIndex].ViewTarget.Contains(item.SimpleName))
                    {
                        GEOViewTarget.SelectedIndex = GEOViewTarget.Items.Count - 1;
                    }
                }
            }
            if (GEOViewTarget.SelectedIndex == -1)
            {
                GEOViewTarget.SelectedIndex = 0;
            }
            if (GEODisplayObject.SelectedIndex == -1)
            {
                GEODisplayObject.SelectedIndex = 0;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].ObjectHideShow)
            {
                ObjectHideShow.Checked  = true;
                HideShowOptions.Enabled = true;
            }
            else
            {
                HideShowOptions.Enabled = false;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].GeoDataDisplayActive)
            {
                GEOUseDataDisplay.Checked     = true;
                GEODataDisplayOptions.Enabled = true;
            }
            else
            {
                GEODataDisplayOptions.Enabled = false;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].EnableGeoBox)
            {
                UseGEOBox.Checked     = true;
                GeoBoxOptions.Enabled = true;
            }
            else
            {
                GeoBoxOptions.Enabled = true;
            }

            if (CommonData.SavedViewList[CommonData.SelectedIndex].UseAnimationTime)
            {
                string currentTime = CommonData.SavedViewList[CommonData.SelectedIndex].AnimationTime;
                UseCurrentTime.Checked = true;
                CurrentTime.Text       = currentTime;
            }
        }