void _ApplyTemplates() { for (int i = 0; i < _templCustomText.Length; i++) { string text = _templCustomText[i]; if (text == null) { continue; } var tt = (FileNode.ETempl)(1 << i); var file = FileNode.Templates.FilePathRaw(tt, true); try { if (text == FileNode.Templates.Load(tt, false)) { AFile.Delete(file); } else { AFile.SaveText(file, text); } } catch (Exception ex) { AOutput.Write(ex.ToStringWithoutStack()); } } Program.Settings.templ_use = _templUseCustom; }