示例#1
0
 public void openInCallWindow(Call c)
 {
     if (callingStatusLabel.InvokeRequired)
     {
         callingStatusLabel.Invoke(new MethodInvoker(() => { openInCallWindow(c); }));
     }
     else
     {
         NoneCallback ncb = updateFriendViewOnCallClosing;
         InCallForm   icf = new InCallForm(c, ncb);
         icf.Show();
     }
 }
示例#2
0
 public void callUserReplyFromUser(Boolean reply)
 {
     if (callingStatusLabel.InvokeRequired)
     {
         callingStatusLabel.Invoke(new MethodInvoker(() => { callUserReplyFromUser(reply); }));
     }
     else
     {
         callingStatusLabel.Visible = true;
         if (reply == true)
         {
             callUser.Enabled             = false;
             callingStatusLabel.Text      = "";
             callingStatusLabel.ForeColor = Color.Green;
             if (lastCallId != null && lastCallUsername != null)
             {
                 Call c = new Call(lastCallId.id, new List <string> {
                     lastCallUsername.username
                 });
                 NoneCallback ncb = updateFriendViewOnCallClosing;
                 InCallForm   icf = new InCallForm(c, ncb);
                 icf.Show();
                 updateCallStatus(new Friend(lastCallUsername, 1));
             }
         }
         else
         {
             callUser.Enabled             = true;
             callingStatusLabel.Text      = "Odrzucono połączenie!";
             callingStatusLabel.ForeColor = Color.Red;
             if (!Program.isInCall)
             {
                 LoggedInService.declineCall(lastCallId);
             }
         }
     }
 }