Ejemplo n.º 1
0
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="root"></param>
        /// <returns></returns>
        public BDEditorConfig Load()
        {
            BDEditorConfig editorConfig = null;

            if (File.Exists(savepath))
            {
                var content = File.ReadAllText(savepath);
                editorConfig          = JsonMapper.ToObject <BDEditorConfig>(content);
                editorConfig.savepath = savepath;
                return(editorConfig);
            }
            else
            {
                return(this);
            }
        }
        /// <summary>
        /// 初始化
        /// </summary>
        static public void Init()
        {
            var config = new BDEditorConfig(BDApplication.ProjectRoot);

            EditorConfig = config.Load();
        }