Ejemplo n.º 1
0
        private void savePrefs()
        {
            // save favorite terms to a wtf-level text file
            List <string> s = new List <string>();

            for (int i = 0; i < lstSearch.Items.Count; i++)
            {
                s.Add(lstSearch.Items[i].ToString());
            }

            GeneralTools.WriteAnythingToFile(Application.StartupPath, @"\" + "sch.pref", s);

            MessageBox.Show("Preferences saved!", rS.AppTitle);
        }
Ejemplo n.º 2
0
        private void readPrefs()
        {
            // read saved search terms
            List <string> s    = new List <string>();
            string        path = Application.StartupPath + @"\sch.pref";

            GeneralTools.ReadAnythingFromFile(path, ref s);
            if (s.Count == 0)
            {
                return;
            }
            for (int i = 0; i < s.Count; i++)
            {
                lstSearch.Items.Add(s[i]);
            }
        }