예제 #1
0
        /// <summary>
        /// Check if the user has been invited to join any conversations
        /// </summary>
        private void checkPendingConversations()
        {
            if (member != null)
            {
                Invite i = facade.getPendingConversation(member.Id);

                //if a pending conversation exists then invite the member
                if (i != null)
                {
                    if (!this.Visible)
                    {
                        //if app is running in background then notify via the tray
                        trayAlert.Title   = "New Invitation.";
                        trayAlert.Content = "You have just received a new invitation.";
                        trayAlert.Show();
                        doCheckInvites = false;
                        storedInvites.Add(i);                           //add the invite to wait for the user to open the app
                    }
                    else
                    {
                        InviteForm iForm = new InviteForm(this, ref facade);
                        iForm.Invitation = i;
                        iForm.initialise();
                        iForm.Show();
                        currentConversations.Add(iForm);
                    }
                }
            }
        }
예제 #2
0
 private void trayAlert_ActionClick(object sender, EventArgs e)
 {
     this.Show();
     //if a stored invite is waiting then process it
     if (storedInvites.Count > 0)
     {
         InviteForm iForm = new InviteForm(this, ref facade);
         iForm.Invitation = (Invite)storedInvites[0];
         iForm.initialise();
         iForm.Show();
         currentConversations.Add(iForm);
         doCheckInvites = true;
         storedInvites.Clear();
     }
 }