static void ShowLogList()
    {
        scrollPos = GUILayout.BeginScrollView(scrollPos);

        for (int i = 0; i < FileNameList.Length; i++)
        {
            if (GUILayout.Button(FileNameList[i]))
            {
                isShowLog   = true;
                scrollPos   = Vector2.zero;
                showContent = LogOutPutThread.LoadLogContent(FileNameList[i]);
                LogPath     = LogOutPutThread.GetPath(FileNameList[i]);
            }
        }

        GUILayout.EndScrollView();

        if (GUILayout.Button("清除日志"))
        {
            OpenWarnWindow("确定要删除所有日志吗?", () =>
            {
                Debug.Log("已删除所有日志");
                FileTool.SafeDeleteDirectory(PathTool.GetAbsolutePath(ResLoadLocation.Persistent, LogOutPutThread.LogPath));
                FileNameList = new string[0];
            });
        }

        if (GUILayout.Button("返回上层"))
        {
            MenuStatus = DevMenuEnum.MainMenu;
        }
    }
示例#2
0
    static void ShowLogList()
    {
        scrollPos = GUILayout.BeginScrollView(scrollPos);

        for (int i = 0; i < FileNameList.Length; i++)
        {
            LogName = FileNameList[i];
            if (GUILayout.Button(LogName))
            {
                isShowLog   = true;
                scrollPos   = Vector2.zero;
                showContent = LogOutPutThread.LoadLogContent(FileNameList[i]);
                LogPath     = LogOutPutThread.GetPath(FileNameList[i]);
            }
        }

        GUILayout.EndScrollView();
        if (GUILayout.Button("复制到设备"))
        {
            for (int i = 0; i < FileNameList.Length; i++)
            {
                string name    = FileNameList[i];
                string path    = phonePath + name + ".txt";
                string LogPath = LogOutPutThread.GetPath(name);

                FileTool.CreatFilePath(path);
                File.Copy(LogPath, path, true);
            }
            GUIUtil.ShowTips("复制成功");
        }

        if (GUILayout.Button("清除日志"))
        {
            OpenWarnWindow("确定要删除所有日志吗?", () =>
            {
                Debug.Log("已删除所有日志");
                FileTool.SafeDeleteDirectory(PathTool.GetAbsolutePath(ResLoadLocation.Persistent, LogOutPutThread.LogPath));
                FileNameList = new string[0];
            });
        }

        if (GUILayout.Button("返回上层"))
        {
            MenuStatus = DevMenuEnum.MainMenu;
        }
    }
    static void ShowLogList()
    {
        scrollPos = GUILayout.BeginScrollView(scrollPos);

        for (int i = 0; i < FileNameList.Length; i++)
        {
            if (GUILayout.Button(FileNameList[i]))
            {
                isShowLog  = true;
                scrollPos  = Vector2.zero;
                LogContent = LogOutPutThread.LoadLogContent(FileNameList[i]);
            }
        }

        GUILayout.EndScrollView();

        if (GUILayout.Button("返回上层"))
        {
            MenuStatus = DevMenuEnum.MainMenu;
        }
    }