Beispiel #1
0
        private void SocketListener_stopStreaming(object sender, string args)
        {
            StationLib.StationSocketListener SocketListener = sender as StationLib.StationSocketListener;
            if (args.Length > 0)
            {
                if (SocketListener != null)
                {
                    ThreadPoolTimer timer = ThreadPoolTimer.CreateTimer((t) =>
                    {
                        SocketListener.stopProcessingPackagesAsync();// Restart Processing Packages
                        SocketListener.startProcessingPackagesAsync();
                        //do some work \ dispatch to UI thread as needed
                    }, TimeSpan.FromSeconds(20));
                }


                if (SocketListener.FailedConnectionCount <= 1)
                {
                    ShowMessage(args);
                    notificationEmail(SocketListener, args);
                }
            }

            ReleaseDisplay(SocketListener);
        }
Beispiel #2
0
 async void stopRecording_Click(Object sender, Windows.UI.Xaml.RoutedEventArgs e)
 {
     StationLib.StationSocketListener plistener = m_SocketStationListeners.getSelectedItem();
     if (plistener != null)
     {
         await plistener.stopProcessingPackagesAsync();
     }
 }
Beispiel #3
0
        private void SocketListener_Failed(object sender, string args)
        { // Failed after Trying Connection
            StationLib.StationSocketListener SocketListener = sender as StationLib.StationSocketListener;
            if (SocketListener.FailedConnectionCount <= 1)
            {
                ShowMessage(args);
                notificationEmail(SocketListener, args);
            }


            if (SocketListener != null)
            {
                ThreadPoolTimer timer = ThreadPoolTimer.CreateTimer((t) =>
                {
                    SocketListener.stopProcessingPackagesAsync();// Restart Processing Packages
                    SocketListener.startProcessingPackagesAsync();
                    //do some work \ dispatch to UI thread as needed
                }, TimeSpan.FromSeconds(5));
            }
        }