void LoadPersistedConfig() { try { if (String.IsNullOrEmpty(PersistFilename)) { //Console.WriteLine("trying to load the persisted file"); PersistFilename = Utils.GetFile(); } if (PersistFilename == null) { return; } object loadedobject = PersistSettings.Load(PersistFilename); if (loadedobject != null) { LiveCollection = (ObservableCollection <ISessionColumn>)loadedobject; } else { PersistFilename = string.Empty; return; } } catch (Exception e) { MessageBox.Show("There was a problem loadeing the configuration: " + e.Message); } finally { } }
void SaveConfig() { PersistSettings.Save(LiveCollection); }