private static void SaveFile() { KSP.IO.TextWriter tw = KSP.IO.TextWriter.CreateForType <EvaSettings>(String.Format("Evas-{0}.txt", HighLogic.CurrentGame.Title)); foreach (var item in collection) { tw.Write("[" + item.Value + "]"); } tw.Close(); collection.Clear(); }
public static void SaveConfiguration() { KSP.IO.TextWriter tr = KSP.IO.TextWriter.CreateForType <EvaSettings>("Config.cfg"); tr.Write("ShowDebugLines = false"); tr.Write("# 0 = left, 1 = right, 2 = middle mouse button."); tr.Write("SelectMouseButton = 0"); tr.Write("DispatchMouseButton = 2"); tr.Write("# Lookup Unity Keybinding for different options"); tr.Write("# use lower case or eat exception sandwich. "); tr.Write("SelectKey = o"); tr.Write("DispatchKey = p"); tr.Write(""); tr.Write("ShowLoadingKerbals = false"); tr.Write("EnableHelmetToggle = true"); tr.Close(); }