private void OnGUI_Menu(Rect rect)
        {
            var btnGap = 1;
            var btnWid = 53;
            var index  = 0;

            if (GUI.Button(new Rect(rect.x + (index++) * (btnWid + btnGap), rect.y, btnWid, rect.height), Styles.btnBack))
            {
                if (!m_IsUploaded)
                {
                    RemoteDebugWindow.Instance.ShowNotification(new GUIContent("Operation not allowed: uploading ... "));
                    return;
                }
                m_LocalPath = RemoteDebugUtil.GetParentPath(m_LocalPath);
                RefreshFileList();
            }
            if (GUI.Button(new Rect(rect.x + (index++) * (btnWid + btnGap), rect.y, btnWid, rect.height), Styles.btnUpload))
            {
                if (m_WaitingUploadFileInfos.Count <= 0)
                {
                    RemoteDebugWindow.Instance.ShowNotification(new GUIContent("no selected files."));
                }
                else
                {
                    var files = string.Join("\n", m_WaitingUploadFileInfos);
                    if (EditorUtility.DisplayDialog("Upload selected files", "Upload all selected files?\n" + files, "Sure", "Cancel"))
                    {
                        UploadStart();
                        UploadNextFile();
                    }
                }
            }
            if (GUI.Button(new Rect(rect.x + (index++) * (btnWid + btnGap), rect.y, btnWid, rect.height), Styles.btnCancel))
            {
                foreach (var info in m_FileList)
                {
                    info.itemSelected = false;
                }
                m_FileTree.Repaint();
            }

            var filter = new GUIContent(Styles.iconFilter, "Filter Files:\n" + string.Join("|", m_FilterFiles));

            GUI.Button(new Rect(rect.x + rect.width - 25, rect.y, 25, rect.height), filter);
        }
        private void OnGUI_Menu(Rect rect)
        {
            var btnGap = 1;
            var btnWid = 53;
            var index  = 0;

            if (GUI.Button(new Rect(rect.x + (index++) * (btnWid + btnGap), rect.y, btnWid, rect.height), Styles.btnBack))
            {
                server?.RequestPatchBack(clientIndex);
            }
            if (GUI.Button(new Rect(rect.x + (index++) * (btnWid + btnGap), rect.y, btnWid, rect.height), Styles.btnRefresh))
            {
                server?.RequestPatchFiles(clientIndex);
            }
            if (GUI.Button(new Rect(rect.x + (index++) * (btnWid + btnGap), rect.y, btnWid, rect.height), Styles.btnDelete))
            {
                if (m_SelectedFileInfos.Count <= 0)
                {
                    RemoteDebugWindow.Instance.ShowNotification(new GUIContent("no selected files."));
                }
                else
                {
                    var files = string.Join("\n", m_SelectedFileInfos);
                    if (EditorUtility.DisplayDialog("Delete selected files", "Delete all selected files?\n" + files, "Sure", "Cancel"))
                    {
                        server?.RequestPatchDelete(clientIndex, string.Join("|", m_SelectedFileInfos));
                    }
                }
            }
            if (GUI.Button(new Rect(rect.x + (index++) * (btnWid + btnGap), rect.y, btnWid, rect.height), Styles.btnCancel))
            {
                if (client != null)
                {
                    foreach (var info in client.remotePatchFileList)
                    {
                        info.itemSelected = false;
                    }
                    m_FileTree.Repaint();
                }
            }
        }