public void DeleteChatWindow(int index)
        {
            UiWindow.Window.UIThread(() =>
            {
                int ind = index;
                if (ind < ChatWindows.Count && ind >= 0)
                {
                    var wnd = ChatWindows[ind];

                    ChatWindows.RemoveAt(ind);

                    wnd.Dispose();
                }
            });
        }
        private void DeleteChatWindow()
        {
            UiWindow.Window.UIThread(() =>
            {
                int ind = SelectedTabIndex;
                if (ind < ChatWindows.Count && ind >= 0)
                {
                    var wnd = ChatWindows[ind];

                    ChatWindows.RemoveAt(ind);

                    wnd.Dispose();
                }
            });
        }