コード例 #1
0
 public ChatRoom_Window() //constructor
 {
     _chat            = new ObserChatRoomModel();
     this.DataContext = _chat;
     initiatePreferences();
     InitializeComponent();
     _chat.Messages = new ObservableCollection <Message>(MainWindow._chatRoom.Messages);
     editMessage    = new editMessageWindow();
     editMessage.Hide();
     MainWindow._chatRoom.CenterOperation = new SortTime(true);
     editMessage.DataContext = _chat;
     dispatcherTimer         = new DispatcherTimer();
     dispatcherTimer_Tick(null, null);
     playDispatcherTimer();
 }
コード例 #2
0
 /*
  * when a user select a message he wrote an edit button will appear and the user can edit the message
  */
 private void editButtonClick(object sender, RoutedEventArgs e)
 {
     editMessage             = new editMessageWindow();
     editMessage.DataContext = _chat;
     editMessage.Show();
 }