private void OnResourceRemoved(Contact contact) { try { ResourceRemoved(contact); } catch { } }
void Roster_ActivityUpdated(nJim.Contact contact, Activity activity) { if ((Settings.notifyOnActivityPlugin && Helper.PLUGIN_WINDOW_ACTIVE) || Settings.notifyOnActivityGlobally && !Helper.PLUGIN_WINDOW_ACTIVE) { NotifyPresMooActTun(contact, null, activity, null); } OnUpdatedPresence(contact); AppendLogEvent(contact.lastUpdated, "Activity", contact.identity.nickname, Translations.GetByName(activity.type.ToString())); }
void Roster_TuneUpdated(nJim.Contact contact, Tune tune) { if ((Settings.notifyOnTunePlugin && Helper.PLUGIN_WINDOW_ACTIVE) || Settings.notifyOnTuneGlobally && !Helper.PLUGIN_WINDOW_ACTIVE) { NotifyPresMooActTun(contact, null, null, tune); } OnUpdatedPresence(contact); AppendLogEvent(contact.lastUpdated, "Tune", contact.identity.nickname, tune.artist + " - " + tune.title); }
void Roster_PresenceUpdated(nJim.Contact contact) { if (((Settings.notifyOnStatusPlugin && Helper.PLUGIN_WINDOW_ACTIVE) || Settings.notifyOnStatusGlobally && !Helper.PLUGIN_WINDOW_ACTIVE) && contact.identity.jabberID.full != Helper.JABBER_CLIENT.MyJabberID.full && contact.status.type != Enums.StatusType.Unavailable) { NotifyPresMooActTun(contact, null, null, null); } AppendLogEvent(contact.lastUpdated, "Status", contact.identity.nickname, Translations.GetByName(contact.status.type.ToString())); OnUpdatedPresence(contact); }
void Roster_MoodUpdated(nJim.Contact contact, Mood mood) { if ((Settings.notifyOnMoodPlugin && Helper.PLUGIN_WINDOW_ACTIVE) || Settings.notifyOnMoodGlobally && !Helper.PLUGIN_WINDOW_ACTIVE) { NotifyPresMooActTun(contact, mood, null, null); } AppendLogEvent(contact.lastUpdated, "Mood", contact.identity.nickname, Translations.GetByName(mood.type.ToString())); OnUpdatedPresence(contact); }
private void NotifyPresMooActTun(nJim.Contact contact, Mood?mood, Activity?activity, Tune?tune) { string message = String.Empty; Helper.PresMooActNotifyInfo notifyInfo = new Helper.PresMooActNotifyInfo(); if (contact.identity.nickname != String.Empty) { notifyInfo.nickname = contact.identity.nickname; } else { notifyInfo.nickname = contact.identity.jabberID.user; } message = notifyInfo.nickname; notifyInfo.resource = contact.identity.jabberID.resource; notifyInfo.stamp = contact.lastUpdated; notifyInfo.status = Translations.GetByName(contact.status.type.ToString()); notifyInfo.message = contact.status.message; notifyInfo.icon = Helper.GetStatusIcon(contact.status.type.ToString()); if (mood.HasValue) { notifyInfo.mood = mood.Value.type.ToString().ToUpperInvariant(); notifyInfo.message = notifyInfo.mood; if (!String.IsNullOrEmpty(mood.Value.text)) { notifyInfo.message += "\n'" + mood.Value.text + "'"; } notifyInfo.icon = Helper.GetMoodIcon(mood.Value.type.ToString()); } if (activity.HasValue) { notifyInfo.activity = activity.Value.type.ToString().ToUpperInvariant(); notifyInfo.message = notifyInfo.activity; if (!String.IsNullOrEmpty(activity.Value.text)) { notifyInfo.message += "\n'" + activity.Value.text + "'"; } notifyInfo.icon = Helper.GetActivityIcon(activity.Value.type.ToString()); } if (tune.HasValue) { notifyInfo.tune = string.Format("{0}\n{1}\n{2}", tune.Value.artist, tune.Value.title, tune.Value.length); notifyInfo.message = notifyInfo.tune; notifyInfo.icon = Helper.GetTuneIcon(tune.Value); } if (!String.IsNullOrEmpty(notifyInfo.message)) { message += "\n" + notifyInfo.message; } notifyInfo.header = string.Format("[{0}] {1} @ {2} ", notifyInfo.stamp.ToShortTimeString(), notifyInfo.status, notifyInfo.resource); Dialog.Instance.ShowNotifyDialog(notifyInfo.header, notifyInfo.icon, message, Settings.notifyWindowType); }
void Roster_ResourceAdded(nJim.Contact contact) { Session newSession = new Session(contact); newSession.OnChatSessionUpdated += new OnChatSessionUpdatedEventHandler(newSession_OnChatSessionUpdated); if (!ChatSessions.Contains(newSession)) { ChatSessions.Add(newSession); OnUpdatedRoster(contact); AppendLogEvent(contact.lastUpdated, "Added", contact.identity.nickname, Translations.GetByName(contact.status.type.ToString())); } }
private void OnUnblocked(Contact contact) { try { Unblocked(contact); } catch (Exception e) { Debug.WriteLine(e.ToString()); } }
private void OnTuneUpdated(Contact contact, Tune tune) { // try { TuneUpdated(contact, tune); // } catch (Exception e) { Debug.WriteLine(e.ToString()); } }
private void OnResourceRemoved(Contact contact) { try { ResourceRemoved(contact); } catch (Exception e) { Debug.WriteLine(e.ToString()); } }
void History_OnRosterUpdated(Contact changedContact) { try { UpdateContactsFacade(); } catch (Exception e) { Debug.WriteLine(e.ToString()); } }
private void OnLocationUpdated(Contact contact, Location location) { try { LocationUpdated(contact, location); } catch { } }
private void OnMoodUpdated(Contact contact, Mood mood) { try { MoodUpdated(contact, mood); } catch { } }
void Roster_ResourceRemoved(nJim.Contact contact) { ChatSessions.Remove(new Session(contact)); OnUpdatedRoster(contact); AppendLogEvent(contact.lastUpdated, "Removed", contact.identity.nickname, Translations.GetByName(contact.status.type.ToString())); }
private void OnBlocked(Contact contact) { try { Blocked(contact); } catch { } }
private void OnActivityUpdated(Contact contact, Activity activity) { //try { ActivityUpdated(contact, activity); //} catch (Exception e) { Debug.WriteLine(e.ToString()); } }
private void OnUnblocked(Contact contact) { try { Unblocked(contact); } catch { } }
private void OnLocationUpdated(Contact contact, Location location) { try { LocationUpdated(contact, location); } catch (Exception e) { Debug.WriteLine(e.ToString()); } }
private void OnActivityUpdated(Contact contact, Activity activity) { try { ActivityUpdated(contact, activity); } catch { } }
private void OnMoodUpdated(Contact contact, Mood mood) { //try { MoodUpdated(contact, mood); // } catch (Exception e) { Debug.WriteLine(e.ToString()); } }
private void OnTuneUpdated(Contact contact, Tune tune) { try { TuneUpdated(contact, tune); } catch { } }
private void OnPresenceUpdated(Contact contact) { try { PresenceUpdated(contact); } catch (Exception e) { Debug.WriteLine(e.ToString()); } }
private void OnPresenceUpdated(Contact contact) { try { PresenceUpdated(contact); } catch { } }
void History_OnContactPresence(Contact updatedContact) { try { UpdateContactsFacade(); UpdateGuiContactProperties(History.Instance.GetSession(updatedContact.identity.jabberID.full)); //if (guiWindowChat.CurrentChatSession != null && updatedContact.identity.jabberID.bare.ToLower() == guiWindowChat.CurrentChatSession.ContactJID.Bare.ToLower()) { // guiWindowChat.UpdateGuiContactProperties(); //} } catch (Exception e) { Debug.WriteLine(e.ToString()); } }