Ejemplo n.º 1
0
        private void SelectView_Click(object sender, EventArgs e)
        {
            if (StoredViewList.SelectedItems != null && StoredViewList.SelectedItems.Count > 0)
            {
                _selectedView = StoredViewList.FocusedItem.Index;
                RemovePlanes();
                CommonData.StkRoot.ExecuteCommand("BatchGraphics * On");

                StoredViewList.Items[StoredViewList.FocusedItem.Index].Selected = true;
                CommonData.SelectedIndex = StoredViewList.FocusedItem.Index;
                if (CommonData.SavedViewList[StoredViewList.FocusedItem.Index].ViewType == "2D")
                {
                    SmartViewFunctions.Change2DView(CommonData.SavedViewList[StoredViewList.FocusedItem.Index]);
                }
                else if (CommonData.SavedViewList[StoredViewList.FocusedItem.Index].ViewType == "3D")
                {
                    SmartViewFunctions.Change3DView(CommonData.SavedViewList[StoredViewList.FocusedItem.Index]);
                }
                else if (CommonData.SavedViewList[StoredViewList.FocusedItem.Index].ViewType == "Target/Threat")
                {
                    SmartViewFunctions.ChangeTargetThreatView(CommonData.SavedViewList[StoredViewList.FocusedItem.Index]);
                }
                else if (CommonData.SavedViewList[StoredViewList.FocusedItem.Index].ViewType == "GEODrift")
                {
                    SmartViewFunctions.ChangeGeoDriftView(CommonData.SavedViewList[StoredViewList.FocusedItem.Index]);
                }

                CommonData.StkRoot.ExecuteCommand("BatchGraphics * Off");
            }
        }
Ejemplo n.º 2
0
 private void Refresh_Click(object sender, EventArgs e)
 {
     if (_selectedView != -1)
     {
         if (StoredViewList.SelectedItems != null && StoredViewList.SelectedItems.Count > 0)
         {
             RemovePlanes();
             if (CommonData.SavedViewList[_selectedView].ViewType == "2D")
             {
                 SmartViewFunctions.Change2DView(CommonData.SavedViewList[_selectedView]);
             }
             else if (CommonData.SavedViewList[_selectedView].ViewType == "3D")
             {
                 SmartViewFunctions.Change3DView(CommonData.SavedViewList[_selectedView]);
             }
             else if (CommonData.SavedViewList[_selectedView].ViewType == "Target/Threat")
             {
                 SmartViewFunctions.ChangeTargetThreatView(CommonData.SavedViewList[_selectedView]);
             }
             else if (CommonData.SavedViewList[_selectedView].ViewType == "GEODrift")
             {
                 SmartViewFunctions.ChangeGeoDriftView(CommonData.SavedViewList[_selectedView]);
             }
         }
     }
 }