Exemple #1
0
 void OnVoiceInvite(IVoiceChatHandler invitation)
 {
     Dispatcher.Invoke(() =>
     {
         FlashWindow();
         if (invitation == null)
         {
             chatTextBox.AddInfo(Translation.Instance.ChatWindow_VoiceChatInviteNotSupported);
             return;
         }
         chatTextBox.AddVoiceChatReceivedRequest(context, invitation, PrimaryBuddy.DisplayName, context.IsVoiceChatActive);
         voiceController.VoiceChatContext = invitation;
         invitation.Dispatcher            = Dispatcher;
     });
     chatState.ChatStarted = true;
 }
        internal VoiceChatControl(SquiggleContext context, IVoiceChatHandler voiceChat, string buddyName, bool sending, bool alreadyInChat) : this()
        {
            this.voiceChat     = voiceChat;
            this.sending       = sending;
            this.buddyName     = buddyName;
            this.alreadyInChat = alreadyInChat;
            this.context       = context;

            this.voiceChat.TransferCancelled += voiceChat_TransferCancelled;
            this.voiceChat.TransferCompleted += voiceChat_TransferCompleted;
            this.voiceChat.TransferStarted   += voiceChat_TransferStarted;
            this.voiceChat.TransferFinished  += voiceChat_TransferFinished;


            ShowWaiting();
        }
Exemple #3
0
        public static void AddVoiceChatReceivedRequest(this ChatTextBox textbox, SquiggleContext context, IVoiceChatHandler session, string buddyName, bool alreadyInChat)
        {
            var item = new VoiceChatItem(context, session, buddyName, false, alreadyInChat);

            textbox.AddItem(item);
        }
Exemple #4
0
        public static void AddVoiceChatSentRequest(this ChatTextBox textbox, SquiggleContext context, IVoiceChatHandler session, string buddyName)
        {
            var item = new VoiceChatItem(context, session, buddyName, true, false);

            textbox.AddItem(item);
        }
 public void EndChat()
 {
     VoiceChatContext = null;
 }
Exemple #6
0
        private void VoiceChatToolbarControl_StartChat(object sender, EventArgs e)
        {
            IVoiceChatHandler voiceChat = StartVoiceChat();

            ((VoiceChatToolbarControl)sender).VoiceChatContext = voiceChat;
        }