public void OpenChat()
        {
            var chatView = ServiceProvider.Instance.Get <IChatDialog>();

            chatView.BindViewModel(this);
            chatView.ViewClosedEvent += OnViewClosed;
            chatView.Show();
            _view = chatView;
        }
 public void CloseChat()
 {
     if (_view != null)
     {
         _view.Close();
         if (ChatSessionClosed != null)
         {
             ChatSessionClosed(this, new ChatSessionEventArgs(Contact, null));
         }
         _view = null;
     }
 }
Beispiel #3
0
 public ChatClient(IChatDialog inChatDialog)
 {
     this.chatDialog = inChatDialog;
     try
     {
         Configuration config = ConfigurationManager.OpenExeConfiguration(Assembly.GetExecutingAssembly().Location);
         _lastReceived = DateTime.Parse(config.AppSettings.Settings["LastReceived"].Value);
         if (_lastReceived == DateTime.MinValue)
         {
             _lastReceived = DateTime.UtcNow;
         }
     }
     catch (Exception)
     {
         _lastReceived = DateTime.UtcNow;
     }
 }
 public void OpenChat()
 {
     var chatView = ServiceProvider.Instance.Get<IChatDialog>();
     chatView.BindViewModel(this);
     chatView.ViewClosedEvent += OnViewClosed;
     chatView.Show();
     _view = chatView;
 }
 public void CloseChat()
 {
     if (_view != null)
     {
         _view.Close();
         if (ChatSessionClosed != null)
             ChatSessionClosed(this, new ChatSessionEventArgs(Contact, null));
         _view = null;
     }
 }