Esempio n. 1
0
 /// <summary>
 /// The constructor is private so that only the class itself can create an instance.
 /// </summary>
 private Settings()
 {
     settings = new SCSettings();
     settings.SQLServer = ".";
     settings.SQLLogin = "******";
     settings.SQLPass = String.Empty;
     settings.DataFilesPath = String.Empty;
     settings.MaxDBSize = 0;
     LoadSettings();
 }
Esempio n. 2
0
 /// <summary>
 /// The constructor is private so that only the class itself can create an instance.
 /// </summary>
 private Settings()
 {
     settings               = new SCSettings();
     settings.SQLServer     = ".";
     settings.SQLLogin      = "******";
     settings.SQLPass       = String.Empty;
     settings.DataFilesPath = String.Empty;
     settings.MaxDBSize     = 0;
     LoadSettings();
 }
Esempio n. 3
0
        /// <summary>
        /// Loads the settings of the plugin from the configuration file.
        /// </summary>
        internal void LoadSettings()
        {
            string configFile = GetPath() + "CrawlWave.ServerCommon.Config.xml";

            try
            {
                if (!File.Exists(configFile))
                {
                    //perhaps the file does not exist - probably because it has not been
                    //created yet. In this case just let the class retain default values.
                    return;
                }
                Stream        ReadStream = File.Open(configFile, FileMode.Open);
                XmlSerializer serializer = new XmlSerializer(typeof(SCSettings));
                settings = (SCSettings)serializer.Deserialize(ReadStream);
                ReadStream.Close();
            }
            catch
            {}
        }
Esempio n. 4
0
 /// <summary>
 /// Loads the settings of the plugin from the configuration file.
 /// </summary>
 internal void LoadSettings()
 {
     string configFile = GetPath()+"CrawlWave.ServerCommon.Config.xml";
     try
     {
         if(!File.Exists(configFile))
         {
             //perhaps the file does not exist - probably because it has not been
             //created yet. In this case just let the class retain default values.
             return;
         }
         Stream ReadStream=File.Open(configFile, FileMode.Open);
         XmlSerializer serializer=new XmlSerializer(typeof(SCSettings));
         settings=(SCSettings)serializer.Deserialize(ReadStream);
         ReadStream.Close();
     }
     catch
     {}
 }