Пример #1
0
        private void Apply_Click(object sender, EventArgs e)
        {
            List <ObjectData> data = CommonData.CurrentViewObjectData;

            for (int i = 0; i < ObjectGrid.Rows.Count; i++)
            {
                int index = data.IndexOf(data.Where(p => p.SimpleName == (string)ObjectGrid.Rows[i].Cells[1].Value).FirstOrDefault());
                data[index].ModifyLeadTrail = (bool)ObjectGrid.Rows[i].Cells[0].Value;
                data[index].LeadSetting3D   = SmartViewFunctions.GetLeadTrailObject(ObjectGrid.Rows[i].Cells[2].Value.ToString());
                if (SmartViewFunctions.GetLeadTrailObject(ObjectGrid.Rows[i].Cells[3].Value.ToString()) != AgELeadTrailData.eDataUnknown)
                {
                    data[index].TrailSetting3D = SmartViewFunctions.GetLeadTrailObject(ObjectGrid.Rows[i].Cells[3].Value.ToString());
                }
                else
                {
                    data[index].TrailSetting3D = SmartViewFunctions.GetLeadTrailObject(ObjectGrid.Rows[i].Cells[2].Value.ToString());
                }
                if (data[index].SimplePath.Contains("Satellite"))
                {
                    if (ObjectGrid.Rows[i].Cells[4].Value.ToString().Contains("Inertial"))
                    {
                        data[index].CoordSys = "Inertial";
                    }
                    else if (ObjectGrid.Rows[i].Cells[4].Value.ToString().Contains("Fixed"))
                    {
                        data[index].CoordSys = "Fixed";
                    }
                    else if (ObjectGrid.Rows[i].Cells[4].Value.ToString().Contains("VVLH"))
                    {
                        data[index].CoordSys = "Satellite/" + ObjectGrid.Rows[i].Cells[5].Value.ToString() + " VVLH System";
                    }
                }
            }
            CommonData.CurrentViewObjectData = data;
            this.Close();
        }