void _component_OperationalStateChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { WinFormsHelper.BeginManagedInvoke(this, delegate { labelStatus.Text = UserFriendlyNameAttribute.GetTypeAttributeName(operational.GetType()) + " is " + operational.OperationalState.ToString(); }); }
/// <summary> /// Follow synchrnozation source status. /// </summary> void _statusSynchronizationSource_OperationalStatusChangedEvent(IOperational parameter1, OperationalStateEnum parameter2) { if (StatusSynchronizationEnabled) { #if Matrix_Diagnostics SystemMonitor.Debug(this.GetType().Name + " is following its source " + parameter1.GetType().Name + " to state " + parameter1.OperationalState.ToString()); #endif this.ChangeOperationalState(parameter1.OperationalState); } else { #if Matrix_Diagnostics SystemMonitor.Debug(this.GetType().Name + " is not following its source " + parameter1.GetType().Name + " to new state because synchronization is disabled."); #endif } }
/// <summary> /// Follow synchrnozation source status. /// </summary> void _statusSynchronizationSource_OperationalStatusChangedEvent(IOperational parameter1, OperationalStateEnum parameter2) { if (StatusSynchronizationEnabled) { TracerHelper.Trace(this.GetType().Name + " is following its source " + parameter1.GetType().Name + " to state " + parameter1.OperationalState.ToString()); this.ChangeOperationalState(parameter1.OperationalState); } else { TracerHelper.Trace(this.GetType().Name + " is not following its source " + parameter1.GetType().Name + " to new state because synchronization is disabled."); } }