private void BotFirst_Click(object sender, RoutedEventArgs e) { if (Check_Fields()) { ChatWindow chatWindow = new ChatWindow(true); Chat chat = new Chat(chatWindow); ChatBot chatBot = new ChatBot(chatWindow, chat); chatWindow.Init(chat, chatBot); chatBot.CreateChat(NameTb.Text + " " + LastNameTb.Text, NameTb.Text, LastNameTb.Text, PhoneTb.Text, EmailTb.Text, QueueCB.Text); chatWindow.Visibility = Visibility.Visible; this.Close(); } }
public void Init(Chat chat, ChatBot chatBot) { this.chat = chat; this.chatBot = chatBot; }