public void ChatOpen(Chat chat) { using (ISession session = NHibernateHelper.OpenSession()) using (ITransaction transaction = session.BeginTransaction()) { OpenedChat?.Close(OpenedChat); OpenedChat = new ChatViewModel(session.Load <Chat>(chat.Id), this); OpenedChat.Closed += ChatClose; OpenedChat.MessageSended += SendMessage; _dialogManager.Show(OpenedChat); } }
private void NpcOnMouseUp() { // When click npc player open bot selection pannel if (isAlreadyChatOpen) { return; } isAlreadyChatOpen = true; UIManager.Instance.BotSelectionPannel.SetActive(true); if (OpenedChat != null) { OpenedChat.Invoke(); } }