Beispiel #1
0
        private void Update_Click(object sender, EventArgs e)
        {
            int    errorCount = 0;
            string errorStr   = "Could not update epoch for the following objects: \n";

            foreach (var item in _satelliteUpdateList)
            {
                IAgSatellite sat = CommonData.StkRoot.GetObjectFromPath(item) as IAgSatellite;
                try
                {
                    CreatorFunctions.ChangeSatelliteInterval(sat, dtp_start.Value.ToString("dd MMM yyyy HH:mm:ss.000"), dtp_end.Value.ToString("dd MMM yyyy HH:mm:ss.000"), ASTGRunCheck.Checked);
                }
                catch (Exception)
                {
                    errorCount++;
                    errorStr += item + "\n";
                }
            }
            if (errorCount > 0)
            {
                MessageBox.Show(errorStr);
            }
        }