Esempio n. 1
0
        // 允许反复调用
        public static void SaveConfig(delegate_fileCreated func_fileCreated)
        {
            // Save the configuration file.
            if (_config != null && _config.Changed)
            {
                bool exists = string.IsNullOrEmpty(_config.FileName) == false && File.Exists(_config.FileName);

                _config.Save();

                // 首次创建文件
                if (exists == false &&
                    string.IsNullOrEmpty(_config.FileName) == false && File.Exists(_config.FileName))
                {
                    func_fileCreated?.Invoke(_config.FileName);
                }
            }
        }
Esempio n. 2
0
 public static void Finish(delegate_fileCreated func_fileCreated)
 {
     SaveConfig(func_fileCreated);
 }