示例#1
0
        /// <summary>
        /// Saves the config file. This should only be used if <see cref="SetConfigurationValue(string, string, bool)"/> was called with its dontSaveOnWrite parameter set to true. This is automatically called if the parameter is false.
        /// </summary>
        public void SaveConfigurationFile()
        {
            StreamWriter dataStream = BaseHandler.CreateText(ConfigFileName);

            foreach (string key in ConfigValues.Keys)
            {
                string value = ConfigValues[key];
                dataStream.WriteLine(key + " " + value);
            }
            dataStream.Flush();
            dataStream.Close();
            HasUnsavedChanges = false;
        }