void Model_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == "TraceStates") { switch (Model.TraceStates) { case TraceStates.Running: Running.Begin(cTraceState, true); Starting.Stop(cTraceState); Stopping.Stop(cTraceState); break; case TraceStates.Starting: Starting.Begin(cTraceState, true); Stopping.Stop(cTraceState); Running.Stop(cTraceState); break; case TraceStates.Stopping: Stopping.Begin(cTraceState, true); Running.Stop(cTraceState); Starting.Stop(cTraceState); break; case TraceStates.Stopped: default: Starting.Stop(cTraceState); Stopping.Stop(cTraceState); Running.Stop(cTraceState); break; } } }