Esempio n. 1
0
        public static void LoadConf(string file)
        {
            if (System.IO.Directory.Exists(file))
            {
                file = System.IO.Path.Combine(file, "XProto.proto.conf").Replace('\\', '/');
            }
            if (file.EndsWith(".conf") == false)
            {
                MessageBox.Show("file type need be *.proto.conf \n current is " + file);
                return;
            }
            if (file == EditorConf.singleton.m_conf_file)
            {
                MessageBox.Show("Is same with current conf.");
                return;
            }
            else if (string.IsNullOrEmpty(EditorConf.singleton.m_conf_file) == false)
            {
                if (MessageBox.Show("Save current Data", "Save", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    SaveAllData();
                }
            }

            EditorConf.ReadFromFile(file);

            EditorMessageManager.singleton.ReadFromFile(EditorConf.singleton.m_ProtoBinFilePath);
        }
Esempio n. 2
0
        protected static UnitySerializeWindow ShowDisplay(Type klass, EditorConf editorConf)
        {
            int MAX     = (int)FooterButton.Index.ButtonMax;
            var index   = editorConf.footerButtons.Length > MAX ? MAX : editorConf.footerButtons.Length;
            var display = selectInstanceWindowKinds[index](klass, editorConf);

            display.editorConf = editorConf;
            return(display);
        }