Exemplo n.º 1
0
		/// <summary>
		/// Listener for the click on the Send Request button.
		/// Will open a new window asking if Send or not the new Request.
		/// </summary>
		/// <param name="sender">The button that trigger the OnClick event</param>
		void buttonSendRequest_Click(object sender, EventArgs e)
		{
			string userID = ((Button)sender).Name;

			// Load the user into the session
			Session.OtherUser = controller.GetUser(userID);

			// Display the Friend Request Manager window for Send the request
			ManageFriendRequest window = new ManageFriendRequest(true);
			window.ShowDialog();
		}
        // *************** //
        // *  LISTENERS  * //
        // *************** //
        /// <summary>
        /// Listener for the click on the Send Request button.
        /// Will open a new window asking if Send or not the new Request.
        /// </summary>
        /// <param name="sender">The button that trigger the OnClick event</param>
        void buttonSendRequest_Click(object sender, EventArgs e)
        {
            string userID = ((Button)sender).Name;

            // Load the user into the session
            Session.OtherUser = controller.GetUser(userID);

            // Display the Friend Request Manager window for Receive the request
            ManageFriendRequest window = new ManageFriendRequest(false);
            window.ShowDialog();

            // Load (again) the pending request
            if (RefreshSearcher(controller.GetUsersSendingRequestForMe(Session.User)) == false)
                this.processed = true;
        }