예제 #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);
        }
예제 #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();
     }
 }
예제 #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());
        }
예제 #4
0
        public GOEEditorMainWindow()
        {
            Init();
            //mUIHelperMap.Add ("Act", new FireActUIHelper ());
            //选中Pack//
            mCurTypeName = JsonObjectHelperTypes.PackV5;

            JsonObjectUIHelper helper = Helper;

            //搜索//
            //Search(helper.GetSearchDir(), "*" + helper.GetFileExt());
            DoSearch("");
        }
예제 #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;
        }
예제 #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);
        }
예제 #7
0
 //设置当前StringInterface//
 public void SetCurStringInterface(object si, JsonObjectUIHelper sih)
 {
     mCurStringInterface       = si;
     mCurStringInterfaceHelper = sih;
 }