public InterlocutorChatViewModel(IFrameViewModel frame, Interlocutor interlocutor) { _frame = frame; _interlocutor = interlocutor; var chatDocument = new FlowDocument(); ChatTextBox = new RichTextBox(chatDocument); ChatTextBox.IsDocumentEnabled = true; ChatTextBox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; ChatTextBox.Background = Brushes.Transparent; ChatTextBox.IsReadOnly = true; _conversationThread = CreateThread(chatDocument); MessageTextBox = new RichTextBox(new FlowDocument()); MessageTextBox.IsDocumentEnabled = true; MessageTextBox.Background = Brushes.Transparent; MessageTextBox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; ParseCurrentHistory(); SetTheme(ThemeManager.ActiveTheme); SetCommands(); _historyLoader = CreateHistoryLoader(); }
public RoomChatViewModel(IFrameViewModel frame, Room room) { _frame = frame; _room = room; var chatDocument = new FlowDocument(); ChatTextBox = new RichTextBox(chatDocument); ChatTextBox.IsDocumentEnabled = true; ChatTextBox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; ChatTextBox.Background = System.Windows.Media.Brushes.Transparent; ChatTextBox.IsReadOnly = true; _conversationThread = CreateThread(chatDocument); MessageTextBox = new RichTextBox(new FlowDocument()); MessageTextBox.IsDocumentEnabled = true; MessageTextBox.Background = System.Windows.Media.Brushes.Transparent; MessageTextBox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; ParseCurrentHistory(); SetTheme(ThemeManager.ActiveTheme); _historyLoader = CreateHistoryLoader(); }
private ConversationThread CreateThread(FlowDocument document) { _thread = new ConversationThread(document); return _thread; }
public HistoryLoaderViewModel(Guid clientId, Jid withEntity, ConversationThread conversationThread) { _clientId = clientId; _withEntity = withEntity; _conversationThread = conversationThread; }