Esempio n. 1
0
        public static void Load()
        {
            Main main = Main.Get();

            // try to load the config
            try
            {
                Config c = Deserialize(Program.BasePath + "/config/studio.xml");

                main.config = c;

                main.LoadInterfaceSettings();
            }
            // something went wrong -> create a new config file
            catch (System.Exception)
            {
                main.WriteToConsole("Could not open config file, falling back to defaults.");

                Config c = new Config();

                main.config = c;

                // save the newly created cofig
                c.Serialize(Program.BasePath + "/config/studio.xml", c);
            }
        }