예제 #1
0
        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
            {
            }
        }
예제 #2
0
 void SaveConfig()
 {
     PersistSettings.Save(LiveCollection);
 }