Пример #1
0
 public SettingsRepository(string file_)
 {
     file = file_;
     current = new Settings();
     if (current.LoadFromFile(file))
     {
         isCorrect = true;
     }
 }
Пример #2
0
        /// <summary>
        /// opens repo
        /// </summary>
        /// <param name="file_">path and file name</param>
        /// <returns>true if new settings are okey (loaded from xml)</returns>
        public bool Open(string file_)
        {
            Settings new_setting = new Settings();

            if (new_setting.LoadFromFile(file_))
            {
                current = new_setting;
                file = file_;
                isCorrect = true;
                
                return true;
            }

            return false;
        }