private void FireStateChanged(PartnershipState newState, PartnershipState oldState) { if (this.StateChanged != null) { this.StateChanged(this, new PartnershipStateChangeEventArgs(newState, oldState)); } }
private void OnStateChanged(PartnershipState oldState) { Trace.WriteLine(string.Concat(new object[] { "---- Partnership switched from ", oldState, " to ", this.CurrentState, " ", this.Device.Name })); this.FireStateChanged(this.CurrentState, oldState); switch (this.CurrentState) { case PartnershipState.LoadingSources: this.ResetSourceErrors(); break; case PartnershipState.PreparingSync: this.ResetSyncErrors(); break; } switch (oldState) { case PartnershipState.VerifyingSources: case PartnershipState.RespondingToChanges: this.FireSourceErrors(); return; } }
public PartnershipStateChangeEventArgs(PartnershipState newState, PartnershipState oldState) { this.NewState = newState; this.OldState = oldState; }