Esempio n. 1
0
 public UserInfo(DockPanel parent, ChatInfoModel model)
 {
     InitializeComponent();
     CurrentUser      = model.ContactMsgGetter;
     this.parent      = parent;
     this.DataContext = model;
 }
Esempio 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();
 }
Esempio 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));
     }
 }