Exemple #1
0
        public Options(string OptionsPath)
        {
            Dat  = new OptDat();
            Path = OptionsPath;

            OptFile = OptionsPath + "\\" + Filename;

            if (!File.Exists(OptFile))
            {
                Save();
            }
            Load();
        }
        public Options(string OptionsPath)
        {
            Dat = new OptDat();
              Path = OptionsPath;

              OptFile = OptionsPath + "\\" + Filename;

              if (!File.Exists(OptFile))
              {
            Save();
              }
              Load();
        }
Exemple #3
0
 public void Load()
 {
     try
     {
         XmlSerializer s = new XmlSerializer(typeof(OptDat));
         TextReader    r = new StreamReader(OptFile);
         this.Dat = (OptDat)s.Deserialize(r);
         r.Close();
     }
     catch (Exception ex)
     {
     }
     finally
     {
     }
 }
Exemple #4
0
        public void Load()
        {
            TextReader r = null;

            try
            {
                XmlSerializer s = new XmlSerializer(typeof(OptDat));
                r        = new StreamReader(OptFile);
                this.Dat = (OptDat)s.Deserialize(r);
                r.Close();
            }
            catch (Exception ex)
            {
                ex = ex;
            }
            finally
            {
                if (r != null)
                {
                    r.Close();
                }
            }
        }
        public void Load()
        {
            try
              {
            XmlSerializer s = new XmlSerializer(typeof(OptDat));
            TextReader r = new StreamReader(OptFile);
            this.Dat = (OptDat)s.Deserialize(r);
            r.Close();
              }
              catch(Exception ex)
              {

              }
              finally
              {
              }
        }
 public void Load()
 {
     TextReader r=null;
       try
       {
     XmlSerializer s = new XmlSerializer(typeof(OptDat));
     r = new StreamReader(OptFile);
     this.Dat = (OptDat)s.Deserialize(r);
     r.Close();
       }
       catch(Exception ex)
       {
     ex = ex;
       }
       finally
       {
       if(r != null)
       {
      r.Close();
       }
       }
 }