Ejemplo n.º 1
0
    /// <summary>
    /// DrawAssetNodes
    /// </summary>
    private void DrawAssetNodes()
    {
        mScrollViewPosition = EditorGUILayout.BeginScrollView(mScrollViewPosition);
        for (int i = 0; i < mXlsTableSchemas.Count; i++)
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField(string.Format("{0}. 【{1}】{2}", (i + 1).PadLeft(mXlsTableSchemas.Count), mXlsTableSchemas[i].dbName, mXlsTableSchemas[i].tableName));

            if (GUILayout.Button("Setting"))
            {
                EditorStrayFogApplication.PingObject(mXlsTableSchemas[i].tableSchemaAssetPath);
            }

            mXlsTableSchemas[i].isDeterminant = EditorGUILayout.ToggleLeft("是否是行列式表", mXlsTableSchemas[i].isDeterminant);
            mXlsTableSchemas[i].canModifyData = EditorGUILayout.ToggleLeft("是否可修改数据", mXlsTableSchemas[i].canModifyData);

            EditorUtility.SetDirty(mXlsTableSchemas[i]);
            if (GUILayout.Button("Brower"))
            {
                EditorStrayFogApplication.PingObject(mXlsTableSchemas[i].fileName);
            }
            if (GUILayout.Button("Reveal"))
            {
                EditorStrayFogApplication.RevealInFinder(mXlsTableSchemas[i].fileName);
            }
            if (GUILayout.Button("Open"))
            {
                EditorStrayFogApplication.OpenFile(Path.GetFullPath(mXlsTableSchemas[i].fileName));
            }
            if (GUILayout.Button("Script"))
            {
                EditorStrayFogApplication.RevealInFinder(mXlsTableSchemas[i].scriptSqliteEntityFolder);
            }
            EditorGUILayout.EndHorizontal();
        }
        EditorGUILayout.EndScrollView();

        if (GUILayout.Button("Export Xls Schema To Sqlite"))
        {
            EditorStrayFogExecute.ExecuteExportXlsSchemaToSqlite();
            EditorUtility.DisplayDialog("XlsSchema", "ExecuteExportXlsSchemaToSqlite successed.", "OK");
        }
    }