private int RaiseContactEvent(MirandaEventHandler<MirandaContactEventArgs> handler, UIntPtr wParam) { if (handler == null) return 0; ContactInfo contactInfo = GetContactInfo(wParam); MirandaContactEventArgs eventArgs = new MirandaContactEventArgs(contactInfo); bool retValue = InvokeChainCancelable<MirandaContactEventArgs>(handler, eventArgs); return Convert.ToInt32(retValue); }
private bool HandleContactChange(object sender, MirandaContactEventArgs e) { if (!e.ContactInfo.DisplayName.Equals(UnknownContact, StringComparison.OrdinalIgnoreCase) && (!ServiceManager.ServiceExists(PhotonService_IsSchemaContact) || MirandaContext.Current.CallService(PhotonService_IsSchemaContact, e.ContactInfo.MirandaHandle, IntPtr.Zero) != 0)) { UnhookDbEvents(); RoamiePlugin.Singleton.RoamingContext.State |= RoamingState.DeltaIncompatibleChangeOccured; NotifyAboutIncompatibleDbChange(); } return EventResult.HonourEventChain; }