Exemplo n.º 1
0
 public static void Load()
 {
     XmlSerializer s = new XmlSerializer(typeof(Options));
     FileInfo fi = new FileInfo(new FileInfo(Application.ExecutablePath).Directory.FullName + "\\settings.xml");
     if(fi.Exists)
     {
         TextReader r = new StreamReader(new FileInfo(Application.ExecutablePath).Directory.FullName + "\\settings.xml");
         Instance = (Options)s.Deserialize(r);
         r.Close();
     }
 }
Exemplo n.º 2
0
		public void Load(string applicationExePath)
        {
            XmlSerializer s = new XmlSerializer(typeof(Options));
			FileInfo fi = new FileInfo(new FileInfo(applicationExePath).Directory.FullName + "\\settings.xml");

            if(fi.Exists)
            {
				TextReader r = new StreamReader(new FileInfo(applicationExePath).Directory.FullName + "\\settings.xml");
                instance = (Options)s.Deserialize(r);
                r.Close();
            }

			Project.GetInstance().FileFilter = this.Files;
        }