예제 #1
0
 void Utilities_OnMonitorStopped(object sender, ServiceStoppedEventArgs e)
 {
     if (e.Exception != null)
     {
         OnError(e.Message, e.Exception);
     }
 }
예제 #2
0
        private void m_messageUtilities_OnReaderStopped(object sender, ServiceStoppedEventArgs e)
        {
            IsSubscribed = false;
            if (e.Exception == null)
            {
                PositionMonitorUtilities.Info(e.Message);
            }
            else
            {
                PositionMonitorUtilities.Error(e.Message, e.Exception);
            }

            lock (m_portfolioLock)
            {
                foreach (HugoDataSet.PortfolioRow row in m_portfolio.Rows)
                {
                    row.SubscriptionStatus = SubscriptionStatus.Unsubscribed.ToString();
                    row.UpdateTime         = DateTime.Now - DateTime.Today;
                }
            }

            if (m_refreshEventHandler != null)
            {
                m_refreshEventHandler(this, new EventArgs());
            }
        }
예제 #3
0
 private void Utilities_OnMonitorStopped(object sender, ServiceStoppedEventArgs eventArgs)
 {
     OnError(eventArgs.Message, eventArgs.Exception);
     OnInfo("Monitor stopped");
     if (m_monitor != null)
     {
         m_monitor.Close();
     }
 }
예제 #4
0
        private void ReportListenerLib_OnReaderStopped(object sender, ServiceStoppedEventArgs e)
        {
            LogInfoMessage(e.Message, true);

            m_readerStarted = false;
            if (m_reader.HadError)
            {
                m_taskFailed       = true;
                m_lastErrorMessage = m_reader.LastErrorMessage;
            }
        }
        /// <summary>
        /// Handles service stopped event.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">Event data.</param>
        /// <exception cref="ArgumentNullException">e is null.</exception>
        protected void OnServiceStopped(object sender,
                                        ServiceStoppedEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e",
                                                Resources.ArgumentNullException);
            }

            StopAllFileWatchers();
            WaitForControllerStopped();
            base.WriteApplicationStoppedMessage();
            Dispose();
        }
예제 #6
0
        private void ReportListenerLib_OnReaderStopped(object sender, ServiceStoppedEventArgs e)
        {
            LogInfoMessage(e.Message);

            m_bReaderStarted = false;
            if (m_reader.HadError)
            {
                m_bTaskFailed      = true;
                m_lastErrorMessage = m_reader.LastErrorMessage;
            }
            if (m_bWaiting)
            {
                m_waitHandle.Set();
            }
        }
예제 #7
0
        void m_messageUtilities_OnReaderStopped(object sender, ServiceStoppedEventArgs e)
        {
            OnError(e.Message, e.Exception);

            Action a = delegate
            {
                EnableControls();
            };

            if (InvokeRequired)
            {
                BeginInvoke(a);
            }
            else
            {
                a.Invoke();
            }
        }
        private void m_messageUtilities_OnReaderStopped(object sender, ServiceStoppedEventArgs e)
        {
            if (e.Exception == null)
            {
                PositionMonitorUtilities.Info(e.Message);
            }
            else
            {
                PositionMonitorUtilities.Error(e.Message, e.Exception);
            }

            StopSubscriber();

            if (m_refreshEventHandler != null)
            {
                m_refreshEventHandler(this, new EventArgs());
            }
        }
예제 #9
0
 void m_utilities_OnMonitorStopped(object sender, ServiceStoppedEventArgs e)
 {
     OnError(e.Message, e.Exception);
     EnableControls();
 }
예제 #10
0
 void m_reader_OnReaderStopped(object sender, ServiceStoppedEventArgs e)
 {
     m_bReaderStarted = false;
     StopListener();
 }
예제 #11
0
 void GargoyleMessageUtilities_OnPublisherStopped(object sender, ServiceStoppedEventArgs e)
 {
     m_bWriterStarted = false;
     StopListener();
 }
 private void OnServiceStopped(object sender, ServiceStoppedEventArgs e)
 {
     m_bConnected = false;
 }