Ejemplo n.º 1
0
    public void OpenConversation()
    {
        if (currentConversation != null && currentConversation != this)
        {
            currentConversation.CloseConversation();
        }

        conversationObject.SetActive(true);
        currentConversation = this;
        CurrentState.Open();
    }
Ejemplo n.º 2
0
        private void JoinConversation(object obj)
        {
            var share = new LyncConversation();

            ConversationService.Instance.CreateConversationUseExternalUrl(MeetUrl, share);
            var videoView = new ConversationView();

            videoView.OnNavigateTo(share);
            var window = new Window();

            window.Content = videoView;
            window.Show();
        }
Ejemplo n.º 3
0
        private void CreateConversation(object obj)
        {
            var share = new LyncConversation();

            share.SipUriOfRealPerson = SipUriOfRealPerson;
            ConversationService.Instance.AddConversation(share);
            var videoView = new ConversationView();

            videoView.OnNavigateTo(share);
            var window = new Window();

            window.Content = videoView;
            window.Show();
        }
Ejemplo n.º 4
0
        private void StartSkypeMeetingHander(bool sus, GetSkypeMeetingResult result)
        {
            var share = new LyncConversation();

            share.ExternalId = result.TalkId;
            ConversationService.Instance.CreateConversationUseExternalUrl(result.Url, share);
            var videoView = new ConversationView();

            videoView.OnNavigateTo(share);
            var window = new Window();

            window.Content = videoView;
            window.Show();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Conversation creation requested event handler.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ConversationCreationRequested(object sender, ConversationCreationRequestedEventArgs e)
        {
            //Switch to conversation view.
            string htmlDocUri      = HtmlPage.Document.DocumentUri.GetComponents(UriComponents.HostAndPort, UriFormat.UriEscaped);
            string endpointAddress = String.Format(CultureInfo.CurrentCulture, "http://{0}/{1}", htmlDocUri, App.ServiceName);

            FrameworkElement conversationView;

            conversationView = new ConversationView();
            ConversationViewModel conversationViewModel = new ConversationViewModel(conversationView.Dispatcher, endpointAddress, e.UserName, e.PhoneNumber, e.QueueName, e.ProductId);

            conversationView.DataContext = conversationViewModel;

            Grid rootGrid = Application.Current.RootVisual as Grid;

            rootGrid.Children.Clear();
            rootGrid.Children.Add(conversationView);
        }
Ejemplo n.º 6
0
        private void PromptTextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
        {
            DipMessageFormat format = new DipMessageFormat();

            if (e.Text == "\r")
            {
                int consumed = 0;
                Message msg = format.Decode(Encoding.UTF8.GetBytes(PromptTextBox.Text), out consumed);

                ConversationViewModel convoVm = _consoleVm.StartConversation(msg);
                ConversationView convoView = new ConversationView(convoVm);

                ScrollbackTextBox.Document.Blocks.Add(convoView.View);
                _conversations.Add(convoView);

                ScrollbackTextBox.ScrollToEnd();

                PromptTextBox.Clear();

                e.Handled = true;
            }
        }