//! ContactWindowsVector constructor. /*! * \param ContactWindowsVector * Creates a new object from a ContactWindowsVector */ public ContactWindowsVector(ContactWindowsVector contacts) { contactsList = new List <ContactWindow>(contacts.getAllContacts()); satelliteNameList = new List <string>(contacts.getSatelliteNames()); stationNameList = new List <string>(contacts.getStationNames()); starttime = new One_Sgp4.EpochTime(contacts.getStartTime()); stoptime = new One_Sgp4.EpochTime(contacts.getStopTime()); calcualteTimesOfAllContacst(); }
//! Load Saved Schedule from File /*! * opens File Dialog and will load a saved schedule from xml file */ private void loadSavedSchedule() { toolStripStatusLabel3.Text = "Status: Opening File"; OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.Filter = "Saved Contacts Files (.xml)|*.xml|All Files (*.*)|*.*"; openFileDialog1.FilterIndex = 1; DialogResult userSelect = openFileDialog1.ShowDialog(); if (userSelect == DialogResult.OK) { string filePath = openFileDialog1.FileName; toolStripStatusLabel3.Text = "Status: Loading SaveFile"; contactsVector = DataBase.SaveLoad.loadFile(filePath, this); UpdateAllLists(); toolStripStatusLabel3.Text = "Status: Updating Data"; //Update selected satellites and Groundstations list foreach (string name in contactsVector.getSatelliteNames()) { int res = checkedSatellites.Items.IndexOf(name); if (res >= 0) { checkedSatellites.SetItemChecked(res, true); } } foreach (string name in contactsVector.getStationNames()) { int res = checkedStations.Items.IndexOf(name); if (res >= 0) { checkedStations.SetItemChecked(res, true); } } startTimePicker.Value = contactsVector.getStartTime().toDateTime(); stopTimePicker.Value = contactsVector.getStopTime().toDateTime(); startDatePicker.Value = startTimePicker.Value; stopDatePicker.Value = stopTimePicker.Value; startTimePicker.Enabled = false; startDatePicker.Enabled = false; stopTimePicker.Enabled = false; stopDatePicker.Enabled = false; checkedSatellites.Enabled = false; checkedStations.Enabled = false; toolStripStatusLabel3.Text = "Status: Done"; } }