Beispiel #1
0
        public static List <double> GetGroundLocation(string path)
        {
            List <double> location = new List <double>();
            object        lat      = 0.0;
            object        longi    = 0.0;
            double        alt      = 0.0;

            if (path.Contains("Place"))
            {
                IAgPlace place = CommonData.StkRoot.GetObjectFromPath(path) as IAgPlace;
                place.Position.QueryPlanetodetic(out lat, out longi, out alt);
            }
            else if (path.Contains("Facility"))
            {
                IAgFacility place = CommonData.StkRoot.GetObjectFromPath(path) as IAgFacility;
                place.Position.QueryPlanetodetic(out lat, out longi, out alt);
            }
            else if (path.Contains("Target"))
            {
                IAgTarget place = CommonData.StkRoot.GetObjectFromPath(path) as IAgTarget;
                place.Position.QueryPlanetodetic(out lat, out longi, out alt);
            }
            location.Add(Double.Parse(lat.ToString()));
            location.Add(Double.Parse(longi.ToString()));
            location.Add(alt);
            return(location);
        }
 private void PopulateDisplayReports(ComboBox box, ComboBox ddObject)
 {
     if (ddObject.SelectedIndex != -1)
     {
         string className = SmartViewFunctions.GetClassName(ddObject.Text);
         IAgVODataDisplayCollection ddCollection = null;
         if (className == "Satellite")
         {
             IAgSatellite myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgSatellite;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Aircraft")
         {
             IAgAircraft myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgAircraft;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Facility")
         {
             IAgFacility myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgFacility;
             ddCollection = myObject.VO.DataDisplays;
         }
         else if (className == "Missile")
         {
             IAgMissile myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgMissile;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "GroundVehicle")
         {
             IAgGroundVehicle myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgGroundVehicle;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "LaunchVehicle")
         {
             IAgLaunchVehicle myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgLaunchVehicle;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Place")
         {
             IAgPlace myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgPlace;
             ddCollection = myObject.VO.DataDisplays;
         }
         else if (className == "Target")
         {
             IAgTarget myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgTarget;
             ddCollection = myObject.VO.DataDisplays;
         }
         box.Items.Clear();
         Array reportNames = ddCollection.AvailableData;
         foreach (var name in reportNames)
         {
             box.Items.Add(name);
         }
         box.SelectedIndex = 0;
     }
 }
Beispiel #3
0
        public static IAgVORefCrdnCollection GetRefCrdns(IAgStkObject stkObject)
        {
            switch (stkObject.ClassType)
            {
            case AgESTKObjectType.eAircraft:
                IAgAircraft _aircraft = stkObject as IAgAircraft;
                return(_aircraft.VO.Vector.RefCrdns);

            case AgESTKObjectType.eFacility:
                IAgFacility fac = stkObject as IAgFacility;
                return(fac.VO.Vector.RefCrdns);

            case AgESTKObjectType.eGroundVehicle:
                IAgGroundVehicle gv = stkObject as IAgGroundVehicle;
                return(gv.VO.Vector.RefCrdns);

            case AgESTKObjectType.eMissile:
                IAgMissile miss = stkObject as IAgMissile;
                return(miss.VO.Vector.RefCrdns);

            case AgESTKObjectType.ePlace:
                IAgPlace place = stkObject as IAgPlace;
                return(place.VO.Vector.RefCrdns);

            case AgESTKObjectType.eSatellite:
                IAgSatellite sat = stkObject as IAgSatellite;
                return(sat.VO.Vector.RefCrdns);

            case AgESTKObjectType.eSensor:
                IAgSensor sensor = stkObject as IAgSensor;
                return(sensor.VO.Vector.RefCrdns);

            case AgESTKObjectType.eShip:
                IAgShip ship = stkObject as IAgShip;
                return(ship.VO.Vector.RefCrdns);

            case AgESTKObjectType.eTarget:
                IAgTarget target = stkObject as IAgTarget;
                return(target.VO.Vector.RefCrdns);

            default:
                return(null);
            }
        }
Beispiel #4
0
 private void DisplayObject_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DisplayObject.SelectedIndex != -1)
     {
         string className = SmartViewFunctions.GetClassName(DisplayObject.Text);
         IAgVODataDisplayCollection ddCollection = null;
         if (className == "Satellite")
         {
             IAgSatellite myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgSatellite;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Aircraft")
         {
             IAgAircraft myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgAircraft;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Facility")
         {
             IAgFacility myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgFacility;
             ddCollection = myObject.VO.DataDisplays;
         }
         else if (className == "Missile")
         {
             IAgMissile myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgMissile;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "GroundVehicle")
         {
             IAgGroundVehicle myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgGroundVehicle;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "LaunchVehicle")
         {
             IAgLaunchVehicle myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgLaunchVehicle;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Place")
         {
             IAgPlace myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgPlace;
             ddCollection = myObject.VO.DataDisplays;
         }
         else if (className == "Target")
         {
             IAgTarget myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgTarget;
             ddCollection = myObject.VO.DataDisplays;
         }
         DisplayReport.Items.Clear();
         if (ddCollection != null)
         {
             Array reportNames = ddCollection.AvailableData;
             foreach (var name in reportNames)
             {
                 DisplayReport.Items.Add(name);
                 if (name.ToString() == CommonData.SavedViewList[CommonData.SelectedIndex].PrimaryDataDisplay.DataDisplayReportName)
                 {
                     DisplayReport.SelectedIndex = DisplayReport.Items.Count - 1;
                 }
             }
             if (DisplayReport.SelectedIndex == -1)
             {
                 DisplayReport.SelectedIndex = 0;
             }
         }
     }
 }
Beispiel #5
0
        private void Apply_Click(object sender, EventArgs e)
        {
            int fieldCheck = FieldCheck();

            if (fieldCheck == 0)
            {
                //Assign new data
                string placeName = CommonData.CurrentEvents[CommonData.EventSelectedIndex].Id + "-" + CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].Name;

                string path        = "*/Place/" + placeName;
                string currentType = CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].Type;
                SubObjectList.SmallImageList = imageList1;

                CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].Latitude  = LatitudeValue.Text;
                CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].Longitude = LongitudeValue.Text;
                CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].Name      = NameValue.Text;
                CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].ZoomLevel = GetZoomLevelFromIndex();
                CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].Type      = SubObjectType.Text;
                //Set interface values
                int index = GroundEventFunctions.GetSubObjectImageIndex(CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex]);
                SubObjectList.Items[CommonData.SubObjectIndex].ImageIndex       = index;
                SubObjectList.Items[CommonData.SubObjectIndex].SubItems[0].Text = NameValue.Text;
                SubObjectList.Refresh();
                //Rename STK object
                string cmd;
                try
                {
                    cmd = "Rename " + path + " " + CommonData.CurrentEvents[CommonData.EventSelectedIndex].Id + "-" + NameValue.Text;
                    CommonData.StkRoot.ExecuteCommand(cmd);
                }
                catch (Exception)
                {
                    //MessageBox.Show("Error renaming object");
                }

                //Reassign position. Check is for when the renaming is not successful
                placeName = CommonData.CurrentEvents[CommonData.EventSelectedIndex].Id + "-" + CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].Name;
                path      = "Place/" + placeName;
                if (CommonData.StkRoot.ObjectExists(path))
                {
                    IAgPlace place = CommonData.StkRoot.GetObjectFromPath(path) as IAgPlace;
                    place.Position.AssignGeodetic(Double.Parse(LatitudeValue.Text), Double.Parse(LongitudeValue.Text), 0);
                }

                //Change object marker if type changed
                if (currentType != SubObjectType.Text)
                {
                    string filePath = GroundEventFunctions.GetImagePath(CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].Type);
                    try
                    {
                        cmd = "VO */Place/" + placeName + " marker show on markertype imagefile imagefile \"" + filePath + "\" Size 32";
                        CommonData.StkRoot.ExecuteCommand(cmd);
                    }
                    catch (Exception)
                    {
                    }
                }
                else
                {
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].Type = SubObjectType.Text;
                }
                //Apply zoom level
                string zoom = CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects[CommonData.SubObjectIndex].ZoomLevel + "000";
                try
                {
                    cmd = "VO */Place/" + placeName + " ModelDetail Set ModelLabel " + zoom + " MarkerLabel " + zoom + " Marker " + zoom + " Point " + zoom;
                    CommonData.StkRoot.ExecuteCommand(cmd);
                }
                catch (Exception)
                {
                    string mes = "Could not Modify Zoom for SubObject";
                    MessageBox.Show(mes);
                }
                //Rewrite output file to reflect changes
                ReadWrite.WriteEventFile(CommonData.EventFileStr);
            }
        }
Beispiel #6
0
        public static void SetObjectVisibility(ObjectData objectData)
        {
            string className  = objectData.ClassName;
            string simplePath = objectData.SimplePath;

            if (className == "Satellite")
            {
                IAgSatellite myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgSatellite;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "Aircraft")
            {
                IAgAircraft myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgAircraft;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "Facility")
            {
                IAgFacility myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgFacility;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "Missile")
            {
                IAgMissile myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgMissile;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "GroundVehicle")
            {
                IAgGroundVehicle myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgGroundVehicle;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "Sensor")
            {
                IAgSensor myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgSensor;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "Transmitter")
            {
                IAgTransmitter myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgTransmitter;
                //Try/Catch for when object above it is already turned off
                try
                {
                    if (objectData.HideShow)
                    {
                        myObject.Graphics.Show = true;
                    }
                    else
                    {
                        myObject.Graphics.Show = false;
                    }
                }
                catch (Exception e)
                {
                }
            }
            else if (className == "Receiver")
            {
                IAgReceiver myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgReceiver;
                //Try/Catch for when object above it is already turned off
                try
                {
                    if (objectData.HideShow)
                    {
                        myObject.Graphics.Show = true;
                    }
                    else
                    {
                        myObject.Graphics.Show = false;
                    }
                }
                catch (Exception e)
                {
                }
            }
            else if (className == "CoverageDefinition")
            {
                IAgCoverageDefinition myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgCoverageDefinition;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "FigureOfMerit")
            {
                IAgFigureOfMerit myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgFigureOfMerit;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "CommSystem")
            {
                IAgCommSystem myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgCommSystem;
                if (objectData.HideShow)
                {
                    myObject.Graphics.Show = true;
                }
                else
                {
                    myObject.Graphics.Show = false;
                }
            }
            else if (className == "Chain")
            {
                IAgChain myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgChain;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "Place")
            {
                IAgPlace myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgPlace;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
            else if (className == "AreaTarget")
            {
                IAgAreaTarget myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgAreaTarget;
                if (objectData.HideShow)
                {
                    myObject.Graphics.IsObjectGraphicsVisible = true;
                }
                else
                {
                    myObject.Graphics.IsObjectGraphicsVisible = false;
                }
            }
        }
Beispiel #7
0
        public static bool GetObjectVisibility(string className, string simplePath)
        {
            bool visible = false;

            if (className == "Satellite")
            {
                IAgSatellite myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgSatellite;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "Aircraft")
            {
                IAgAircraft myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgAircraft;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "Facility")
            {
                IAgFacility myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgFacility;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "Missile")
            {
                IAgMissile myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgMissile;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "GroundVehicle")
            {
                IAgGroundVehicle myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgGroundVehicle;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "Sensor")
            {
                IAgSensor myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgSensor;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "Transmitter")
            {
                IAgTransmitter myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgTransmitter;
                visible = myObject.Graphics.Show;
            }
            else if (className == "Receiver")
            {
                IAgReceiver myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgReceiver;
                visible = myObject.Graphics.Show;
            }
            else if (className == "CoverageDefinition")
            {
                IAgCoverageDefinition myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgCoverageDefinition;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "FigureOfMerit")
            {
                IAgFigureOfMerit myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgFigureOfMerit;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "CommSystem")
            {
                IAgCommSystem myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgCommSystem;
                visible = myObject.Graphics.Show;
            }
            else if (className == "Chain")
            {
                IAgChain myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgChain;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "Place")
            {
                IAgPlace myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgPlace;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }
            else if (className == "AreaTarget")
            {
                IAgAreaTarget myObject = CommonData.StkRoot.GetObjectFromPath(simplePath) as IAgAreaTarget;
                visible = myObject.Graphics.IsObjectGraphicsVisible;
            }

            return(visible);
        }
Beispiel #8
0
        private void Apply_Click(object sender, EventArgs e)
        {
            CommonData.TypeChanged = false;
            int check = FieldCheck();

            if (check == 0)
            {
                string path = "*/Place/" + CommonData.CurrentEvents[CommonData.EventSelectedIndex].Id;
                GroundEventFunctions.RemoveTimelineComponent(CommonData.CurrentEvents[CommonData.EventSelectedIndex]);
                CommonData.CurrentEvents[CommonData.EventSelectedIndex].Id        = IDText.Text;
                CommonData.CurrentEvents[CommonData.EventSelectedIndex].Country   = CountryText.Text;
                CommonData.CurrentEvents[CommonData.EventSelectedIndex].Latitude  = Latitude.Text;
                CommonData.CurrentEvents[CommonData.EventSelectedIndex].Longitude = Longitude.Text;
                string start = GroundEventFunctions.ConvertMilTime(StartTimeText.Text);
                if (start == "Unspecified")
                {
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].StartTime    = "Unspecified";
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].MilStartTime = "Unspecified";
                }
                else
                {
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].MilStartTime = StartTimeText.Text;
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].StartTime    = StartTimeText.Text;
                }

                string stop = ReadWrite.CheckTimeCell(StopTimeText.Text);
                if (stop == "Unspecified")
                {
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].StopTime    = "Unspecified";
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].MilStopTime = "Unspecified";
                }
                else
                {
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].MilStopTime = StopTimeText.Text;
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].StopTime    = StopTimeText.Text;
                }
                CommonData.CurrentEvents[CommonData.EventSelectedIndex].Description = DesciptionText.Text;

                //Rename Object/sub-objects
                string cmd = "Rename " + path + " " + CommonData.CurrentEvents[CommonData.EventSelectedIndex].Id;
                CommonData.StkRoot.ExecuteCommand(cmd);
                if (CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects != null)
                {
                    foreach (SubObject item in CommonData.CurrentEvents[CommonData.EventSelectedIndex].SubObjects)
                    {
                        cmd = "Rename " + path + "-" + item.Name + " " + CommonData.CurrentEvents[CommonData.EventSelectedIndex].Id + "-" + item.Name;
                        CommonData.StkRoot.ExecuteCommand(cmd);
                    }
                }


                //Reassign position
                path = "Place/" + CommonData.CurrentEvents[CommonData.EventSelectedIndex].Id;
                IAgPlace place = CommonData.StkRoot.GetObjectFromPath(path) as IAgPlace;
                place.Position.AssignGeodetic(Double.Parse(Latitude.Text), Double.Parse(Longitude.Text), 0);

                //Change object marker if type changed
                string currentType = CommonData.CurrentEvents[CommonData.EventSelectedIndex].SsrType;
                if (currentType != TypeSelect.Text)
                {
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].SsrType = TypeSelect.Text;
                    CommonData.TypeChanged = true;

                    string filePath = GroundEventFunctions.GetImagePath(CommonData.CurrentEvents[CommonData.EventSelectedIndex].SsrType);

                    cmd = "VO */Place/" + CommonData.CurrentEvents[CommonData.EventSelectedIndex].Id + " marker show on markertype imagefile imagefile \"" + filePath + "\" Size 32";
                    CommonData.StkRoot.ExecuteCommand(cmd);
                }
                else
                {
                    CommonData.CurrentEvents[CommonData.EventSelectedIndex].SsrType = TypeSelect.Text;
                }
                ReadWrite.WriteEventFile(CommonData.EventFileStr);
                this.Close();
            }
        }