/// <summary>Raises the FriendshipOffered event</summary> /// <param name="e">A FriendshipOfferedEventArgs object containing the /// data returned from the data server</param> protected virtual void OnFriendshipOffered(FriendshipOfferedEventArgs e) { EventHandler <FriendshipOfferedEventArgs> handler = m_FriendshipOffered; if (handler != null) { handler(this, e); } }
/// <summary>Raises the FriendshipOffered event</summary> /// <param name="e">A FriendshipOfferedEventArgs object containing the /// data returned from the data server</param> protected virtual void OnFriendshipOffered(FriendshipOfferedEventArgs e) { EventHandler<FriendshipOfferedEventArgs> handler = m_FriendshipOffered; if (handler != null) handler(this, e); }
void Friends_FriendshipOffered(object sender, FriendshipOfferedEventArgs e) { Gtk.Application.Invoke(delegate { string msg; msg="You have recieved a friendship request from "+e.AgentName+"\n They would like to become your friend \n do you want to accept?"; MessageDialog md= new Gtk.MessageDialog(this,DialogFlags.DestroyWithParent,MessageType.Question,ButtonsType.YesNo,true,msg); md.Response += delegate(object o, ResponseArgs args) { if (args.ResponseId == ResponseType.Yes) { MainClass.client.Friends.AcceptFriendship(e.AgentID, e.SessionID); } else { MainClass.client.Friends.DeclineFriendship(e.AgentID, e.SessionID); } md.Destroy(); }; md.ShowAll(); }); }
public void Friends_FriendshipOffered(object sender, FriendshipOfferedEventArgs e) { Hashtable hash = new Hashtable(); hash.Add("MessageType", "FriendshipOffered"); hash.Add("AgentID", e.AgentID); hash.Add("AgentName", e.AgentName); hash.Add("IMSessionID", e.SessionID); enqueue(hash); }
public virtual void Friends_OnFriendshipOffered(object sender, FriendshipOfferedEventArgs e) { OnEvent("On-Friendship-Offered", paramNamesOnFriendshipOffered, paramTypesOnFriendshipOffered, e); }