コード例 #1
0
 public CoverageData(CoverageData data)
 {
     CdName           = data.CdName;
     FomType          = data.FomType;
     ContourStart     = data.ContourStart;
     ContourStop      = data.ContourStop;
     ContourStep      = data.ContourStep;
     Country          = data.Country;
     AssetList        = new List <string>(data.AssetList);
     TargetList       = new List <string>(data.TargetList);
     Type             = data.Type;
     TargetName       = data.TargetName;
     Latitude         = data.Latitude;
     Longitude        = data.Longitude;
     CoverageShape    = data.CoverageShape;
     ObjectName       = data.ObjectName;
     Country          = data.Country;
     StartTime        = data.StartTime;
     StopTime         = data.StopTime;
     IsEllipse        = data.IsEllipse;
     BoundSize        = data.BoundSize;
     MajorAxis        = data.MajorAxis;
     MinorAxis        = data.MinorAxis;
     PointGran        = data.PointGran;
     IsCustom         = data.IsCustom;
     UseConstraint    = data.UseConstraint;
     ConstraintObject = data.ConstraintObject;
 }
コード例 #2
0
        private void PopulateCoverageList()
        {
            CoverageList.Items.Clear();
            CommonData.CoverageList.Clear();
            List <CoverageData> savedData = new List <CoverageData>();
            int index = -1;

            if (File.Exists(CommonData.DirectoryStr + "\\CoverageData.txt"))
            {
                savedData = ReadWrite.ReadCoverageData(CommonData.DirectoryStr + "\\CoverageData.txt");
            }
            IAgExecCmdResult result;

            result = CommonData.StkRoot.ExecuteCommand("ShowNames * Class CoverageDefinition");
            if (result[0] != "None")
            {
                string[] constArray = result[0].Split(null);
                foreach (var item in constArray)
                {
                    string newItem  = item.Split('/').Last();
                    var    listItem = new ListViewItem();
                    if (newItem != "" && newItem != null)
                    {
                        index = savedData.FindIndex(p => p.CdName.Equals(newItem));
                        if (index != -1)
                        {
                            savedData[index].IsCustom = false;
                            CommonData.CoverageList.Add(savedData[index]);
                        }
                        else
                        {
                            CoverageData newCoverage = new CoverageData();
                            newCoverage.CdName   = newItem;
                            newCoverage.IsCustom = true;
                            CommonData.CoverageList.Add(newCoverage);
                        }
                        listItem.SubItems[0].Text = newItem;
                        CoverageList.Items.Add(listItem);
                    }
                }
            }
        }