Ejemplo n.º 1
0
 public UserInfo(DockPanel parent, ChatInfoModel model)
 {
     InitializeComponent();
     CurrentUser      = model.ContactMsgGetter;
     this.parent      = parent;
     this.DataContext = model;
 }
Ejemplo n.º 2
0
 public ChatWindow(ChatInfoModel chatInfoModel, ZaolisServiceClient.ZaolisServiceClient client, DockPanel dockPanel)
 {
     InitializeComponent();
     this.ChatInfo    = chatInfoModel;
     this.DataContext = ChatInfo;
     this.client      = client;
     OverlayDockPanel = dockPanel;
     ScrollViewer.ScrollToBottom();
 }
Ejemplo n.º 3
0
 public void LoadChat(ChatInfoModel chatInfoModel, ZaolisServiceClient.ZaolisServiceClient client, DockPanel OverlayDockPanel)
 {
     if (IsLoadedChat(chatInfoModel.Chat))
     {
         var chatwindow = chatWindows.FirstOrDefault(c => c.Chat.Id == chatInfoModel.Chat.Id);
         chatWindows.Remove(chatwindow);
         chatWindows.Insert(0, chatwindow);
     }
     else
     {
         if (chatWindows.Count == MaxCount)
         {
             chatWindows.RemoveAt(MaxCount - 1);
         }
         chatWindows.Insert(0, new ChatWindow(chatInfoModel, client, OverlayDockPanel));
     }
 }