Exemplo n.º 1
0
        public static void LoadUIHelperConfig(JsonObjectUIHelper helper)
        {
            JsonObjectTypeAttribute t = helper.GetType().GetCustomAttributes(typeof(JsonObjectTypeAttribute), false)[0] as JsonObjectTypeAttribute;
            string conf = EditorPrefs.GetString(string.Format("{0}{1}", ConfStringInterfaceHelperPrefix, t.Type.ToString().ToUpper()));

            LoadSIConfig(helper, conf);
        }
Exemplo n.º 2
0
 //设置当前StringInterface//
 public void SetCurStringInterface(object si, JsonObjectUIHelper sih)
 {
     if (si != m_CurStringInterface || sih != m_CurStringInterfaceHelper)
     {
         m_CurStringInterface       = si;
         m_CurStringInterfaceHelper = sih;
         m_FoldOutMap.Clear();
     }
 }
Exemplo n.º 3
0
        public static void SaveHelperConfiguration(JsonObjectUIHelper helper)
        {
            JsonObjectHelperTypes       type = ((JsonObjectTypeAttribute)helper.GetType().GetCustomAttributes(typeof(JsonObjectTypeAttribute), false)[0]).Type;
            Dictionary <string, string> dic  = new Dictionary <string, string>();

            helper.OnSaveConfig(dic);
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (KeyValuePair <string, string> i in dic)
            {
                sb.Append(string.Format("{0}|{1}\n", i.Key, i.Value));
            }
            EditorPrefs.SetString(string.Format("{0}{1}", ConfStringInterfaceHelperPrefix, type.ToString().ToUpper()), sb.ToString());
        }
Exemplo n.º 4
0
        public GOEEditorMainWindow()
        {
            Init();
            //mUIHelperMap.Add ("Act", new FireActUIHelper ());
            //选中Pack//
            mCurTypeName = JsonObjectHelperTypes.PackV5;

            JsonObjectUIHelper helper = Helper;

            //搜索//
            //Search(helper.GetSearchDir(), "*" + helper.GetFileExt());
            DoSearch("");
        }
Exemplo n.º 5
0
        void LoadSelectedFiles(JsonObjectHelperTypes type, JsonObjectUIHelper helper, string conf)
        {
            HashSet <string> files = new HashSet <string>();

            string[] f = conf.Split('|');
            foreach (string i in f)
            {
                if (string.IsNullOrEmpty(i))
                {
                    continue;
                }
                files.Add(i);
            }
            mHelperSelectedFiles[type] = files;
        }
Exemplo n.º 6
0
        static void LoadSIConfig(JsonObjectUIHelper helper, string conf)
        {
            string[] lines = conf.Split('\n');
            Dictionary <string, string> dic = new Dictionary <string, string>();

            foreach (string line in lines)
            {
                string[] param = line.Split('|');
                if (param.Length == 2)
                {
                    dic[param[0]] = param[1];
                }
            }
            helper.OnLoadConfig(dic);
        }
Exemplo n.º 7
0
 //设置当前StringInterface//
 public void SetCurStringInterface(object si, JsonObjectUIHelper sih)
 {
     mCurStringInterface       = si;
     mCurStringInterfaceHelper = sih;
 }