Exemple #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);
                    }
                }
            }
        }
Exemple #2
0
        public void joinConversation(InviteForm inv)
        {
            inv.Close();
            ConversationMonitor cm = new ConversationMonitor(this, ref facade, inv.Invitation.InvitedConversation.Id);

            cm.ConversationId = inv.Invitation.InvitedConversation.Id;
            currentConversations.Add(cm);
            cm.Closing   += new CancelEventHandler(cm_Closing);
            cm.Activated += new EventHandler(cm_Activated);
            cm.Show();
            mostRecentlyFocusedMonitor = cm;
        }
Exemple #3
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();
     }
 }