Exemple #1
0
        /// <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();
        });
    }
Exemple #4
0
 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);
 }
Exemple #5
0
 public virtual void Friends_OnFriendshipOffered(object sender, FriendshipOfferedEventArgs e) { OnEvent("On-Friendship-Offered", paramNamesOnFriendshipOffered, paramTypesOnFriendshipOffered, e); }