public void OpenConversation() { if (currentConversation != null && currentConversation != this) { currentConversation.CloseConversation(); } conversationObject.SetActive(true); currentConversation = this; CurrentState.Open(); }
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(); }
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(); }
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(); }
/// <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); }
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; } }