static void Output(object senderwhichwedonotcareabout, EventArgs argswecouldntcareevenlessabout) { var output = new TGINI(); var odir = ""; var project = ""; var copy = ""; foreach (string k in Fields.Keys) { var puretxt = Fields[k].Buffer.Text; var txt = puretxt.Replace('\r', ' ').Replace('\n', ' '); // In most fields we do NOT allow 'enters' if (qstr.Left(k, 1) == "*") { switch (k) { case "*KTHURA": odir = txt; break; case "*Project": project = txt; break; case "*Copyright": copy = puretxt; break; case "*Meta": output.CL("GENERALDATA"); foreach (string e in puretxt.Split('\n')) { output.Add("GENERALDATA", e.Trim()); } break; case "*Textures": output.CL("TEXTURESGRABFOLDERSMERGE"); output.Add("TEXTURESGRABFOLDERSMERGE", txt); break; } } else { output.D(k, puretxt); } } // These two lists only have to exist. They are not being altered, because that is the more advance stuff (CSPOTS or Custom Spots most of all). output.CL("CSPOTS"); output.CL("LINES"); var outputscript = output.ToSource(); outputscript = $"[rem]\nThis script was Generated by the Quick Kthura Project Wizard\n\n{project}\n\n{copy}\n\n{outputscript}"; QOpen.SaveString($"Projects/{project}", outputscript); }