示例#1
0
        private void StartupConnection(IAsyncResult iAr)
        {
            var client = _tcpListener.EndAcceptSocket(iAr);

            void StartConnection()
            {
                var connectionWindow = new ConnectionWindow(client);

                _connectionWindows.Add(connectionWindow);
                connectionWindow.Show();
            }

            if (!CheckAccess())
            {
                Dispatcher.Invoke(StartConnection);
            }
            else
            {
                StartConnection();
            }

            WaitForDataListener();
        }
示例#2
0
 public void Disconnect(ConnectionWindow connectionWindow)
 {
     _connectionWindows.Remove(connectionWindow);
 }