Ejemplo n.º 1
0
        public static void SaveCurrentConfig()
        {
            if (!currentInterface.Configuable())
            {
                return;
            }
            Dictionary <string, string> newConfig = currentInterface.GrabConfig();

            currentInterface.SaveConfig(newConfig);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Call this manually if you really need to. This is what Save Button does.
        /// </summary>
        /// <param name="silent">Whether to hide indication or not</param>
        public static void SaveCurrentConfig(bool silent = false)
        {
            if (!currentInterface.Configuable())
            {
                return;
            }
            Dictionary <string, string> newConfig = currentInterface.GrabConfig();

            if (!currentInterface.SaveConfig(newConfig))
            {
                alert = InternalTranslator.Translate("<ModID> had an issue with saving its configuration").Replace("<ModID>", currentInterface.rwMod.ModID);
            }
            else if (!silent)
            {
                alert = InternalTranslator.Translate("<ModID> has saved its configuration").Replace("<ModID>", currentInterface.rwMod.ModID);
            }
        }