Exemple #1
0
        private void Np_ServiceStatusChanged(object sender, ServiceStatusChangedEventArgs e)
        {
            toolStripServiceStatus.Text = e.Status;

            if (e.ErrorMessage != null)
            {
                toolStripServiceStatus.Text += $" {e.ErrorMessage}";
            }
        }
Exemple #2
0
 private void _monitorService_ServiceStatusChanged(object sender, ServiceStatusChangedEventArgs e)
 {
     try
     {
         UpdateStatus(e.ServiceStatus);
     }
     catch (Exception ex)
     {
         ExceptionHandler("Error updating monitor activity", ex);
     }
 }
Exemple #3
0
        internal void SetStatusChanged(RunningStatus newOne, bool allowErrorTransition)
        {
            Debug.Assert(_status.IsValidTransition(newOne, allowErrorTransition));
            RunningStatus previous = _status;

            _status = newOne;
            ConfigureRawImplFromPlugin();
            var h = ServiceStatusChanged;

            if (h != null)
            {
                ServiceStatusChangedEventArgs ev = new ServiceStatusChangedEventArgs(previous, _status, allowErrorTransition);
                h(this, ev);
            }
        }